yocto.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: Vinayak Menon <menon.vinayak@gmail.com>
Cc: tomzy <tomasz.zyjewski@3mdeb.com>,
	Yocto-mailing-list <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] On managing debug and production builds
Date: Tue, 1 Mar 2022 09:58:02 +0100	[thread overview]
Message-ID: <CANNYZj_g0CTeoXOrSSXEXLuenL-UhSFQ=GVCbnX8XMbFvWdDBA@mail.gmail.com> (raw)
In-Reply-To: <CAH9dsRjncTUY9gwRHr_=-+ShHAxiRS-YqSz8W7_eNyWypWKCkw@mail.gmail.com>

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.

Alex

On Tue, 1 Mar 2022 at 09:52, Vinayak Menon <menon.vinayak@gmail.com> wrote:
>
> On Tue, Mar 1, 2022 at 12:34 PM tomzy <tomasz.zyjewski@3mdeb.com> 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 `base-image-prod.bb` and
> > `base-image-debug.bb`. 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 base-image-prod.bb
> base-image-debug.bb".
> Since the command parses the recipes only once for both image creation.
>
>
>
> >
> > [1] https://github.com/siemens/kas
> >
> > Regards,
> > Tomasz Żyjewski
> > Embedded Systems Engineer
> > GPG: 5C495EA3EBEECA59
> > https://3mdeb.com | @3mdeb_com
> >
> >
> >
> >
>
>
> --
> vinayak
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#56333): https://lists.yoctoproject.org/g/yocto/message/56333
> Mute This Topic: https://lists.yoctoproject.org/mt/89469781/1686489
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


  reply	other threads:[~2022-03-01  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01  5:06 On managing debug and production builds Vinayak Menon
2022-03-01  7:04 ` tomzy
2022-03-01  8:52   ` [yocto] " Vinayak Menon
2022-03-01  8:58     ` Alexander Kanavin [this message]
2022-03-01  9:26     ` tomzy
2022-03-02  3:22       ` [yocto] " Karthik Poduval
2022-03-02  6:50         ` Josef Holzmayr
     [not found]       ` <CAH9dsRgmBt-Y-P0P+1o1u6RC2WqFXH03nURMnaDpZJjNH_nE0Q@mail.gmail.com>
2022-03-02  6:29         ` Vinayak Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANNYZj_g0CTeoXOrSSXEXLuenL-UhSFQ=GVCbnX8XMbFvWdDBA@mail.gmail.com' \
    --to=alex.kanavin@gmail.com \
    --cc=menon.vinayak@gmail.com \
    --cc=tomasz.zyjewski@3mdeb.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).