[meta-xilinx] Board specific kernel config not applied correctly
Nathan Rossi
nathan.rossi at xilinx.com
Mon Apr 14 01:26:49 PDT 2014
> -----Original Message-----
> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
> bounces at yoctoproject.org] On Behalf Of Andreas Galauner
> Sent: Sunday, April 06, 2014 1:54 PM
> To: meta-xilinx at yoctoproject.org
> Subject: [meta-xilinx] Board specific kernel config not applied correctly
>
> Hello everbody,
> I created another meta layer for my own purposes on top of meta-xilinx
> and added a board (two actually, based on microzed and zedboard) for
> myself. There, I have my own kernel config which aims to change the
> linux-xlnx-3.10 defconfig from meta-xilinx by specifying this file in
> the MACHINE_KCONFIG variable like it's done in meta-xilinx itself with
> the kc705 board for example:
>
> > CONFIG_VIRTIO_NET=m
> > CONFIG_KEYBOARD_GPIO=y
> > CONFIG_NEW_LEDS=y
> > CONFIG_LEDS_CLASS=y
> > CONFIG_LEDS_GPIO=y
> > CONFIG_LEDS_TRIGGERS=y
> > CONFIG_LEDS_TRIGGER_TIMER=y
> > CONFIG_LEDS_TRIGGER_ONESHOT=y
> > CONFIG_LEDS_TRIGGER_HEARTBEAT=y
> > CONFIG_LEDS_TRIGGER_CPU=y
> > CONFIG_LEDS_TRIGGER_GPIO=y
> > CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
> > CONFIG_LEDS_TRIGGER_TRANSIENT=y
>
>
> The problem I have is, that my changes never end up in the final kernel
> config, because they get overwritten by kconfig as you can see in the
> logfile of the configure step here:
>
> > DEBUG: Executing shell function do_configure
> > Joining configuration file /media/andy/Data/Zedboard/openembedded/meta-
> copter/conf/machine/boards/copter/00000_copter_microzed.kconfig.cfg
> > Joining configuration file /media/andy/Data/Zedboard/openembedded/meta-
> xilinx/conf/machine/boards/common/linux/zynq/defconfig_3.10.cfg
> > NOTE: make oldnoconfig
> > HOSTCC scripts/basic/fixdep
> > HOSTCC scripts/kconfig/conf.o
> > SHIPPED scripts/kconfig/zconf.tab.c
> > SHIPPED scripts/kconfig/zconf.lex.c
> > SHIPPED scripts/kconfig/zconf.hash.c
> > HOSTCC scripts/kconfig/zconf.tab.o
> > HOSTLD scripts/kconfig/conf
> > scripts/kconfig/conf --olddefconfig Kconfig
> > .config:1039:warning: override: reassigning to symbol VIRTIO_NET
> > .config:1214:warning: override: reassigning to symbol KEYBOARD_GPIO
> > .config:1278:warning: override: reassigning to symbol LEGACY_PTYS
> > .config:2180:warning: override: reassigning to symbol NEW_LEDS
> > #
> > # configuration written to .config
>
> As you can see, I already tried to prefix the file with zeros to get it
> applied first because of file ordering and so on but it all didn't help.
> The kernel config ends up with all my enabled features disabled.
>
> Any ideas why this is the case and how to fix that?
>
Hi Andreas,
The issues you are having are due to the scripting of how the configs are merged, and how the kernel processes the .config. Essentially the kernel parses .configs reverse ordered (to what you mentioned above), the configs that are set first are overridden by configs that are set later. The other problem here is that because the MACHINE_KCONFIG variable is set with _append, it is hard to get it to remove or place your own cfg fragments ordered after the defconfig.
The reason the microblaze configs get away with this is that they override configs which are not set in the defconfig.
I have pushed some changes which should resolve these issues, and should allow you to set MACHINE_KCONFIG += "copter_microzed.kconfig.cfg" in your machine.conf, and give precedence to your cfg fragment. Also this should work for linux-xlnx and linux-yocto recipes. You should also now be able to completely control the MACHINE_KCONFIG variable, as the setting is now completely done at the machine level, look at machine-xilinx-default.inc.
(also on a side note, make sure your cfg fragments have an empty newline at the end of the file)
Regards,
Nathan
More information about the meta-xilinx
mailing list