Forums » Software Development »
Does yocto support multiple config fragments?
Added by Nathan Wright 5 months ago
We got kernel config fragments working, then we set about making more of them.
We made small fragments that were named with their purpose, like "disable-fb-console.cfg", "set-cpu-scaling-to-performance.cfg", "set-timer-hz-to-1000.cfg".
If we run 'bitbake linux-cl-ti -e > what-will-it-do.txt' and review it, we can see the fragments get picked up, we can see where there is code looking for the fragments, we can see code where the fragments are merged.
If we remove the fragments the bake complains about their absence.
However when we run the kernel on target and we grep the kernel config, not all the fragments are there. It seems like only the last fragment file is there.
As a workaround we have combined all of our fragments in to one file, rebuilt, and run on target... all of the fragments made it in to the kernel config.
Is it supposed to only support one fragment file? The bash code bitbake generates tells me it was intended to support more than one, but it appears to be broken.
Replies (2)
RE: Does yocto support multiple config fragments? - Added by Jonathan Cormier 5 months ago
Hi Nathan, the config fragments are handled by a TI recipe located at sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc
though we copied it to sources/meta-mitysom/recipes-kernel/linux/setup-defconfig.inc incase TI removes it.
It looks like its supposed to handle multiple configs, though we can look into it when we have time.
RE: Does yocto support multiple config fragments? - Added by Joshua Bourgeot 5 months ago
Hi Nathan,
I just tested multiple config fragments, and everything worked for me. Here is part of the simple config file I tested.
linux-cl-ti_6.1.bbappend:
FILESEXTRAPATHS:append:mitysom-am62x-boardname := "${THISDIR}/${PN}:" # Copies config fragment into $WORKDIR SRC_URI:append:mitysom-am62x-boardname = " file://ads1015.cfg" SRC_URI:append:mitysom-am62x-boardname = " file://ads7828.cfg" KERNEL_CONFIG_FRAGMENTS:append:mitysom-am62x-boardname = " ${WORKDIR}/ads1015.cfg" KERNEL_CONFIG_FRAGMENTS:append:mitysom-am62x-boardname = " ${WORKDIR}/ads7828.cfg"
linux-cl-ti/ads1015.cfg:
CONFIG_TI_ADS1015=y
linux-cl-ti/ads7828.cfg:
CONFIG_SENSORS_ADS7828=y
Would you be able to share a snipit from you are trying to do for us to test?
Thank you,
Joshua Bourgeot