Search code examples
linuxembedded-linuxyocto

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


I just started understanding Yocto. I didn't find much information about classes (.bbclass) files . I know a .bb file is a recipe, which contains the instruction to build a package.

When do we have to write a recipe and when a class? What is the difference between both?


Solution

  • Yocto classes (.bbclass) are used to factorise recipe's code, to handle some general problems. For instance, handling CMake in recipes is made in cmake.bbclass so that when you add inherit cmake, your recipe will manage CMake specifics.

    You can look at class list in manual too.