compulab-yokneam / meta-bsp-imx9

0 stars 1 forks source link

Kernel fragments are ignored #1

Closed koansoftware closed 1 day ago

koansoftware commented 7 months ago

The recipe linux-compulab.main is ignoring kernel fragments.

You are adding fragments to a temporary compulab.config in do_configure:prepend() but configuring the kernel with oe_runmake ${MACHINE}_defconfig or oe_runmake ${KERNEL_CONFIG} in do_configure:append().

You should use the proper features like scripts/kconfig/merge_config.sh in the kernel.

See meta-imx

vraevsky commented 6 months ago

Hi @koansoftware,

Thanks for pointing us out to this merge-config script. This method was ruled out intentionally. It caused a lot of problems and corrupted the .config. That is why we decided using the scriptless method that works much better.

I’d appreciate it if you could show a scenario when the “do_configure:prepend” skips || ignores a .cfg fragment. https://github.com/compulab-yokneam/meta-bsp-imx9/blob/kirkstone-2.2.0-yocto-r1.1/recipes-kernel/linux/linux-compulab.main#L44

koansoftware commented 6 months ago

Hi @koansoftware,

Thanks for pointing us out to this merge-config script. This method was ruled out intentionally. It caused a lot of problems and corrupted the .config. That is why we decided using the scriptless method that works much better.

I’d appreciate it if you could show a scenario when the “do_configure:prepend” skips || ignores a .cfg fragment. https://github.com/compulab-yokneam/meta-bsp-imx9/blob/kirkstone-2.2.0-yocto-r1.1/recipes-kernel/linux/linux-compulab.main#L44

Hi @vraevsky please find this trivial example. Create a new bbappend for your kernel recipe.

File linux-compulab_%.bbappend

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://add-tux-logo.cfg"

File add-tux-logo.cfg

CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

Marco Cavallini | KOAN sas Bergamo - Italia embedded software engineering https://KoanSoftware.com

vraevsky commented 5 months ago

Hi @koansoftware,

Please have a look at the attached log. Works as expected.

user-linux-config-fragment.log

koansoftware commented 5 months ago

Hi @vraevsky it works because CONFIG_LOGO is enabled in the NXP kernel. I wanted to provide a trivial example, but it doesn't demonstrate the issue, sorry, I over-simplified the example.

Please proceed with the following test:

File linux-compulab_%.bbappend

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://fragment-ad7606-spi.cfg"

File fragment-ad7606-spi.cfg

CONFIG_AD7606=m
CONFIG_AD7606_IFACE_SPI=m

Result

$ awk '/CONFIG_AD7606/' tmp/work/ucm_imx93-poky-linux/linux-compulab/6.1.1-r0/build/.config
# CONFIG_AD7606_IFACE_PARALLEL is not set
# CONFIG_AD7606_IFACE_SPI is not set
vraevsky commented 5 months ago

@koansoftware,

Fixed by https://github.com/compulab-yokneam/meta-bsp-imx9/commit/a5d755710d05eb300e202754efe68ceeae865dd6