[yocto] Kernel configuration patches not persisting?
Stephano Cetola
stephano.cetola at linux.intel.com
Wed Apr 4 09:00:21 PDT 2018
On 4/4/18 8:39 AM, Giordon Stark wrote:
> Hi Stephano,
>
> I see. A large part of this confusion probably comes from the fact that
> they're both using kconfig indeed. ARCH_ZYNQMP is actually used by the
> u-boot-xlnx as well (maybe that makes things even more confusing).
>
> Do both u-boot and linux-yocto accept kernel fragments? Is a kernel
> config fragment detected by bitbake as a file ending in *.cfg and a full
> config as a file called "defconfig"? This distinction isn't super clear
> in the manual.
linux-yocto supports using the .cfg to add configuration fragments for
different targets or for multiple configurations on the same target. You
can check out meta/classes/kernel-yocto.bbclass to see how this is done.
The u-boot recipe is much simpler and any changes to the configuration
is probably going to be added in your u-boot tree
(configs/[MACHINE]_defconfig). At least that's how I've done it in the past.
I know that Freescale uses UBOOT_CONFIG for their boards, but I've never
looked into doing this for a custom board.
>
> In the meantime, I will add a bbappend and a kernel config fragment to
> recipes-kernel/linux/ and report back.
Sounds good!
--S
>
> G
>
> On Wed, Apr 4, 2018 at 10:32 AM Stephano Cetola
> <stephano.cetola at linux.intel.com
> <mailto:stephano.cetola at linux.intel.com>> wrote:
>
> On 4/4/18 7:48 AM, Giordon Stark wrote:
> > Hi all,
> >
> > I have a custom board with custom kernel config changes. Because of
> > that, I append the u-boot recipe as well:
> >
> >
> https://github.com/kratsg/meta-l1calo/blob/master/recipes-bsp/u-boot/u-boot-xlnx_%25.bbappend
> >
> > with my machine.h and defconfig files
> >
> here: https://github.com/kratsg/meta-l1calo/tree/master/recipes-bsp/u-boot/files/gfex-prototype4
> >
> > I find that when I make a change in the defconfig, such as
> > "CONFIG_CPU_IDLE=n", bitbake properly recompiles all the necessary
> > components... however, when I look at the running kernel
> configuration:
> >
> > root at gfex-prototype4:~# cat /proc/config.gz | gunzip > run.config
> > root at gfex-prototype4:~# vi run.config
> > root at gfex-prototype4:~# cat run.config | grep CONFIG_CPU_IDLE
> > CONFIG_CPU_IDLE=y
> > # CONFIG_CPU_IDLE_GOV_LADDER is not set
> > CONFIG_CPU_IDLE_GOV_MENU=y
> >
> > it seems my change still wasn't propagated? I looked at the
> instructions
> > here
> >
> (https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#changing-the-configuration)
> > but I'm not sure I want to duplicate my defconfig file into a second
> > location to bbappend the linux-yocto.
> >
> > Have I done something wrong? Am I missing something else?
> >
> > Giordon
> > --
> > Giordon Stark
>
> Hey Giordon,
>
> It looks like you're confusing two topics: u-boot and kernel
> configuration.
>
> Both u-boot and the kernel use kconfig. This can confuse folks that are
> new to bootloader/kernel work.
>
> Looking at your layer, you're actually interested in changing the
> kernel's configuration rather than u-boot. For example, on the
> gfex-prototype4 defconfig, you set ARCH_ZYNQMP, which is a kernel config
> for the Xilinx Zynq boards. You probably want to add a bbappend for your
> kernel and add the defconfig to that recipe.
>
> Cheers,
> Stephano
>
> --
> Giordon Stark
More information about the yocto
mailing list