Re: On managing debug and production builds

Alexander Kanavin

If you can't do what you need with only image recipes, then the only
option is to create an additional DISTRO config I'm afraid. Putting
these tweaks into machine config or local.conf is not correct.


On Tue, 1 Mar 2022 at 09:52, Vinayak Menon <menon.vinayak@...> wrote:

On Tue, Mar 1, 2022 at 12:34 PM tomzy <tomasz.zyjewski@...> wrote:

Hi Vinayak

I believe that the best way to prepare debug and prod images is to create
include file (.inc) with base set of packages and features and then add two
.bb recipes, one for prod and one for debug - every of this recipes will need
to include the `.inc` file. You could name them `` and
``. This way you could run either prod or debug builds
by running `bitbake base-image-debug` or `bitbake base-image-prod`.

As for the machine, this would need to be set in local.conf every time you want
to switch the machine.To simplify this process, for the management of the
configuration of the entire build (including the selection of debug / prod image
or machine configuration), I recommend the kas[1] project with the very helpful
kas-container tool.

Thanks Tomasz. I will check kas.
Yes, for selecting some of the packages I have created prod and debug
image recipes.
But this did not work for the kernel as the kernel recipe is picked as
part of PROVIDER
in machine conf. SoI had to use 2 conf to have the IMAGE_FEATURES (or
any other var)
set differently for prod and debug. This is for building the kernel
recipie differently for prod
and debug. Setting the IMAGE_FEATURES in the image recipe (and not in
conf) causes
2 problems. One is that kernel and other bootloaders recipes are
picked early via PROVIDER
in conf and not as packages included in image recipe. Secondly,
setting the var in the image
recipe breaks this command for e.g. "bitbake".
Since the command parses the recipes only once for both image creation.


Tomasz ┼╗yjewski
Embedded Systems Engineer
GPG: 5C495EA3EBEECA59 | @3mdeb_com


Join { to automatically receive all group messages.