简体   繁体   English

yocto中.bb(配方)和.bbclass(类)之间的区别是什么

[英]What is difference between .bb ( recipe ) and .bbclass ( class ) in yocto

I just started understanding Yocto. 我刚开始了解Yocto。 I have not find much information about classes ( .bbclass ) files . 我没有找到有关类(.bbclass)文件的更多信息。 I know .bb file is a recipe which contains the instruction to build a package. 我知道.bb文件是一个包含构建包的指令的配方。 When do we have to write a recipe and when a class or what is the difference between both 什么时候我们必须写一个食谱,何时一个类或两者之间有什么区别

Yocto classes (.bbclass) are used to factorise recipe's code, to handle some general problems. Yocto类(.bbclass)用于分解配方的代码,以处理一些常见问题。 For instance, handling CMake in recipes is made in cmake.bbclass so that when you add inherit cmake , your recipe will manage CMake specifics. 例如,在camake.bbclass中处理配方中的CMake,这样当您添加inherit cmake ,您的配方将管理CMake细节。

You can look at class list in manual too. 您也可以在手册中查看课程列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM