Search code examples
linux-kernelyoctoxilinxbitbakezynq

Add kernel configuration options using configuration fragments in custom YOCTO layer


I am currently trying to modify the kernel configuration (overwrite default xilinx-linux layer configs) by adding configuration fragments to my custom layer like this :

.bbappend file:

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}"
SRC_URI =+ "file://fragments.cfg"

fragments.cfg:

CONFIG_I2C_SLAVE = y

Then I run "bitbake \my-image\" and it parses the fragment perfectly, but it doesn't look like it ends up in the final config.

mismatch-all.txt:

Config: CONFIG_I2C_SLAVE
From: <path-to>/poky/build/tmp/work-shared/zedboard-zynq7/kernel-source/.kernel-meta/configs/fragments.cfg
Requested value:  CONFIG_I2C_SLAVE = y
Actual value:     # CONFIG_I2C_SLAVE is not set

How to tell bitbake to use my config parameters over the default ones? Actually, there are a lot of parameters in the "mismatch-all" from different config files scattered all across "kernel-source" directory. What is the priority?


Solution

  • After updating layers to the latest versions, I discovered "cfg/fragment_errors.txt" file with lines like "Ignoring "CONFIG_I2C_SLAVE = y" -- spaces around equals are invalid". After removing spaces it worked like a charm.