From: Saul Wold <saul.wold@intel.com>
To: "Daniel." <danielhilst@gmail.com>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: One kernel tree, two BSP layers, two defconfigs. How to pickup the right one based on MACHINE value?
Date: Mon, 30 Nov 2015 15:29:12 -0800 [thread overview]
Message-ID: <1448926152.12905.55.camel@intel.com> (raw)
In-Reply-To: <CAF3SDA531vpWpfiSuKSr8FhbdMdt=1ma8LMhG55_uTia=E7q2A@mail.gmail.com>
On Mon, 2015-11-30 at 17:25 -0200, Daniel. wrote:
> Hi,
>
> I have one kernel tree where I keep all my modules in-tree. Inside
> kernel I have two FOO_defconfig and BAR_defconfig which are
> configurations for FOO-board and BAR-board. On Yocto I have
> core-layer, FOO-bsp layer and BAR-bsp layer. At core-layer I have
> linux-custom.bb file which has the URI for kernel tree with a dummy
> defconfig. At FOO-bsp and BAR-bsp a have a .bbappend that adds a
> folder with the right defconfig for each board.
>
> My doubt is: I have two .bbappends, on two distinct layers being
> applied at same time? Both layers are pointed at
> build/conf/bblayers.conf.
>
So you are including both your BSP Layers in the bblayers, that will
probably cause problems based on your description above.
Another option is to look at using overrides and have 1 layer that
supports both boards if they are similar and share other items.
> How can I have sure to pick up the right defconfig at build time?
>
> I've tried to delete core-layer and have two kernel recipes with
> distinct names, but Yocto complains about two recipes being selected
> at same time for build (because of virtual/kernel feature or
> something
> alike). So I want to keep one kernel recipe and select the right
> defconfig based on MACHINE value.
>
You can use PREFERRED_PROVIDER_virtual/kernel to have multiple
alternate kernel present and set it in your <machine>.conf to select
the kernel you want.
If your kernel recipe does not inherit kernel.bbclass you will need to
set PROVIDES
You should also be sure to set COMPATIBLE_MACHINE for each machine
> Both defconfig are present on arch/arm/configs. Can I overwrite
> do_config()? Is that safe? About the .bbappends: Should be two
> .bbappends on same .bb file be avoided?
>
You can use a do_config_prepend() to deal with moving the correct
defconfig.
Honestly there are many ways you can make this work and even more to
make is fail!
Sau!
>
> Regards,
> - dhs
> --
> "Do or do not. There is no try"
> Yoda Master
next prev parent reply other threads:[~2015-11-30 23:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 19:25 One kernel tree, two BSP layers, two defconfigs. How to pickup the right one based on MACHINE value? Daniel.
2015-11-30 23:29 ` Saul Wold [this message]
2015-12-01 13:27 ` Daniel.
2015-12-01 19:30 ` Paul Eggleton
2015-12-01 19:48 ` Daniel.
2015-12-01 19:59 ` Paul Eggleton
2015-12-01 20:17 ` Daniel.
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=1448926152.12905.55.camel@intel.com \
--to=saul.wold@intel.com \
--cc=danielhilst@gmail.com \
--cc=yocto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.