On Wed, Jun 6, 2018 at 9:03 AM, Jakob Hasse <jakob.ha...@qiio.com> wrote:
> Hello,
>
> we would like to have different images with different kernel configs/device
> trees. E.g., we would like to have systemA with uart2 and systemB without
> uart2 but spi1 instead, with all the different configurations and device
> trees. The hardware does not change in this case.
>
> How can I make such kernel changes depending on the currently used image?

You can't. The kernel build can be influenced by global config files
such as the distro config, the machine config, local.conf, etc, but
it's not influenced by the image you choose to build.

> My first trail was  to make different machine configs anyway although
> technically the hardware doesn't change.

That's OK. There's no rule that says machine config files can only
contain HW related options. You can think of the machine config files
as just being a place to put global build configuration which is one
level below the distro configuration.

> Then I can append different kernel
> configs in the kernel recipe like this:
> SRC_URI_append_systemA = " file://defconfig"
> SRC_URI_append_systemB = " file://defconfig"
> ...with the corresponding defconfigs in their machine specific subdir.

Putting the machine specific defconfig files into machine specific
subdirectories is enough - you don't need to use machine specific
appends to SRC_URI. For reference, see "log.do_patch" in the kernel
working directory to see the file search paths. The machine specific
paths will be checked first for every file in SRC_URI automatically.

> But maybe there is a better way to reflect these kind of changes?

There are other ways, but the way you have chosen is a good one.

>
> All the Best,
> Jakob
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to