Re: On managing debug and production builds

Vinayak Menon

Add list. missed earlier.

On Wed, Mar 2, 2022 at 8:11 AM Vinayak Menon <menon.vinayak@...> wrote:

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

Thanks Tomasz. I will check kas.

No problem

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 PROVIDERin machine conf.

What are the difference there? You want to use different config on prod and debug images?
Maybe add it as config fragments? Then you would need to add some global variable to
distinguish when use given .cfg file.
Ya, and I am using exisitng IMAGE_FEATURE instead of the global var. I
can use global var too.
The only thing is that I am setting the global var from a conf and not
image recipe.


SoI had to use 2 conf to have the
IMAGE_FEATURES (orany other var)set differently for prod and debug. This is for
building the kernelrecipie differently for prodand debug. Setting the
IMAGE_FEATURES in the image recipe (and not inconf) causes2 problems. One is
that kernel and other bootloaders recipes are picked early via PROVIDER in conf
and not as packages included in image recipe.

Is that a problem?
Ya you are right, that is not a problem as such. But I have seen in the yocto
documentation that IMAGE_FEATURES are recommended to be set from conf.
Is there any reason for such a recommendation ?

Secondly,setting the var in the
image recipe breaks this command for e.g.

Didn't you want to distinguish this to builds to be able to run `bitbake base-image-prod` or
`bitbake base-image-debug`?
Yes I want to distinguish, and as a developer I can give separate
bitbake commands. But the
thought was that later the user can issue commands the way they want.
And if they use it in
combined manner described above, expecting 2 images with different
kernels, it does not work.

Since the command parses the recipes only once for both image creation.

Nevertheless I would greatly recommend you to use kas. In simple .yml file you
could prepare different `local.conf` per configuration prod/debug.
Sure, I will explore this.


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


Join { to automatically receive all group messages.