I've recently made a foray into building Linux-based embedded systems, a far cry from my usual embedded stuff where I have total control over everything.
As part of that, I'm looking into the Yocto/bitbake/OpenEmbedded build system.
There's one thing I'm grappling with and that's the layering concept, so I'm trying to both figure out the way in which layers use/affect other layers.
From my understanding to date, a .bb
recipe file uses require
to simply include another file, similar to C's #include "myheader.h"
which generally looks locally.
A .bbappend
file in an "upper" layer will auto-magically include the base file then make changes to it, sort of an inherent require
.
In contrast, the inherit
keyword looks for a .bbclass
class file in much the same way as it locates the .bb
files, and inherits all the detials from them (sort of like #include <stdio.h>
which, again generally, looks in the system area(a)).
So the first part of my question is: is my understanding correct? Or am I being too simplistic?
The second part of my question then involves the use of BBEXTENDS
in the light of my current understanding. If we already have the ability to extend a recipe by using require
, what is the purpose of listing said recipes in a BBEXTENDS
variable?
(a) Yes, I'm aware they're both totally implementation dependent in terms of where the headers come from, I'm simply talking about their common use.