Defconfig patch is not getting applied

Hello Again,

after successfully solving my .patch format problem in: Defconfig change - Toradex Community

Im now still facing the issue to actually get the patch applied. The .patch file gets copied to /build/tmp-glibc/work/colibri_imx7_emmc-angstrom-linux-gnueabi/linux-toradex/4.9-1.0.x+gitAUTOINC+07d40f6ffc-r0 but is never applied to the defconfig file in this directory.

Did I miss something? Shouldn’t this be the way to patch the kernel configuration?

recipes-kernel

Thank you very much,
Pascal

Hi

For all NXP based modules the kernel defconfig is taken out of the OE meta data, not from the kernel source tree.

So to change the defconfig you have to inject your full defconfig file with a bbappend to the kernel.

Have a look here to see how this is done for the Toradex Easy Installer. Note that in addition to the defconfig injection some patches are applied and the git hash of the kernel is changed.

Max

Hi Max,

Thank you for providing this very interesting piece of information.

Regarding the example you posted: Which part of the recipe tells Yocto to use the defconfig provided by linux/linux-toradex-4.1-2.0.x/colibri-imx7?

Pascal

Hi Pascal

I think this line makes the kernel use the defconfig file to generate the final .config.

Which defconfig the fetcher takes depends on the MACHINEOVERRIDES and FILESPATH/FILESEXTRAPATHS variables.

The fetcher takes the first ‘defconfig’ file it finds when going trough the list of directories formed by appending each value in MACHINEOVERRIDES to each value in FILESPATH.

So the following eventually sets the first entry in FILESPATH to …/linux-toradex-4.1-2.0.x/

FILESEXTRAPATHS_prepend := “${THISDIR}/${PN}-${PV}:”

By using ‘MACHINE=colibri-imx7’ colibri-imx7 automatically becomes the highest priority value in the MACHINEOVERRIDES list.

Max