On managing debug and production builds

Vinayak Menon

I have a requirement to create production and release builds for the
same machine. Debug build would use most of the production recipes,
except few images like Linux kernel that will have debug configs
enabled and a separate debug image is created. Also debug images will
have few extra debug packages and image features like debug-tweaks
enabled. What is the standard way of managing this ?
One other requirement is that for e.g. I do not want both debug and
production linux images to be created in one build. That increases the
build time. i.e. just adding debug variant recipes alone does not
Also the debug and production variants are not specific to a machine,
i.e. tomorrow if I add another machine, I should be able to generate
both variants for that machine too without any machine conf changes.

What I have tried right now is to create 2 local.conf, one in
meta/conf and other in meta/conf/debug. The debug conf has an
IMAGE_FEATURE indicating that it is a debug variant. I am using the
debug-tweaks image feature as of now. And then I switch the confs with
TEMPLATECONF. Now, for recipes, I have not created separate debug
recipes. For e.g. in the linux recipe I am just looking for the
debug-tweaks feature to pick the right config fragments.


Join yocto@lists.yoctoproject.org to automatically receive all group messages.