Bitbake not using custom defconfig file

Hi,

I’m having an issue with my Yocto build for the iMX8QM. I’ve previously built custom Yocto-based images for an iMX6Q without problem, but for some reason I’m running into this issue, despite following the (seemingly) exact same process I documented for the iMX6Q.

I’ve cloned the linux-toradex kernel source and have made some file changes (touchscreen Kconfig file, touchscreen Makefile, etc.), and produced their respective patch files. I’ve included each of the patch files in a recipes-kernel/linux/linux-toradex-4.14-2.3.x directory in my custom meta layer, and have added each to the SRC_URI entry of the linux-toradex_4.14-2.3.x.bbappend file in the recipes-kernel/linux/ directory. Tree representation as follows:

/home/path/meta-mylayer/
├── conf
│   ├── layer.conf
│   └── machine
│       └── mymachine.conf
├── recipes-bsp
│   └── u-boot
│       └── u-boot-toradex
├── recipes-images
│   └── images
│       ├── mylayer-image.bb
│       └── tdx-extra.inc
└── recipes-kernel
    └── linux
        ├── linux-toradex-4.14-2.3.x
        │   ├── 0001-TouchscreenKconfig.patch
        │   ├── 0002-TouchscreenMakefile.patch
        │   ├── 0003-DeviceTree.patch
        │   ├── mylayer_defconfig
        │   ├── logo_custom_clut224.ppm
        └── linux-toradex_4.14-2.3.x.bbappend

My linux-toradex_4.14-2.3.x.bbappend file is as follows:

FILESEXTRAPATHS_prepend := "${THISDIR}/linux-toradex-4.14-2.3.x:"

SUMMARY = "Mylayer Configuration"

SRC_URI += " \
	file://0001-TouchscreenKconfig.patch \
	file://0002-TouchscreenMakefile.patch \
	file://0003-DeviceTree.patch \
	file://mylayer_defconfig \
    file://logo_custom_clut224.ppm \
"

do_unpack_append() {

    import os

    os.system("cp ${PWD}/logo_custom_clut224.ppm ${PWD}/git/drivers/video/logo/")
}

COMPATIBLE_MACHINE = "(mx6|mx7|mx8|mymachine)"

As per my earlier comment, the above approach is how I’ve setup my previous iMX6Q-based builds which have worked as expected. The issue I’m having at the moment, is that despite bitbake virtual/kernel compiling without error, the build process always uses the default ‘defconfig’ file, not my mylayer_defconfig file as per the .bbappend file. The other aspects of the .bbappend appear to work (the logo_custom_clu224.ppm file is integrated into the video/logo drivers, and elements of the device tree patch appear to be included in the final output as well (I haven’t tested/review this exhaustively though).

My custom meta layer has the highest priority, so my understanding was that the mylayer_defconfig file would be used? I’ve seen some other similar questions where people had to move the custom defconfig file to other locations within the build process from within their .bbappend file (e.g. from within a do_preconfigure_prepend() command), but I didn’t have to do this with my iMX6Q process so don’t feel like that’s the right answer. I feel like I’m missing something more obvious here. Any guidance would be greatly appreciated!

Hi

The configuration file which gets used is named ‘defconfig’. So if you add a file ‘xy_defconfig’ to SRC_URI that has no effect on the build.

If that is the issue, rename your file to defconfig. In the *bbappend it is then not necessary to add that to SRC_URI as defconfig is already part that list.
(You could of course keep your filename but copy your file over the defconfig file before do_configure, e.g. add it to your existing do_unpack_append().)


If the filename is not the issue, do you find anything special in the resulting OE variables?

bitbake virtual/kernel -e > kernel.txt

The FILESEXTRAPATHS, SRC_URI, FILESPATH variables I’d look at first.

Does it help to put your ‘defconfig’ file in a sub-directory named after a fileoveride as it is done for our default ‘defconfig’? I.e. into recipes-kernel/linux/linux-toradex-4.14-2.3.x/mx8/defconfig.

Max