Support for fragment.cfg in custom layers

I am fairly new to Toradex devices.
However, I have done a bit of yocto work in the past.
I remember being able to add fragment.cfg file in order to append/modify the kernel config, however this doesn’t seem possible with the toradex layers.
Will this ever be supported? As I have several projects that work around the same family of SoM, but require different devices.

Currently my setup is that for each possible device addition I have a layer that includes the relevant driver (or patches if already available), device-tree includes. I also have layers that include the carrier specific device tree source files and images.
What I am missing is an easy way to add the kernel config additions (in most cases it is just enabling a module or two) for each of the device specific layers (without having to resort to patch files which would potentially be brittle for the automated build system I have in place).

Any help/ideas appreciated.

I believe I have found a way to patch my changes (following another toradex community link which I don’t have to hand). Essentially doing a cat of all .cfg files into defconfig with do_configure:prepend.
This appears to work, but is there a way I can get the final .config file that is used to check what the actual configuration is? where would that be before the compile task?

Hi @izzy_building!

Sorry for the delay.

This is something that OpenEmbedded/Yocto supports and works on Toradex BSP. You can follow Yocto’s documentation to execute the necessary steps:

You can find the .config in build/tmp/work-shared/<machine>/kernel-build-artifacts/.config.

Best regards,

@henrique.tx - Brilliant, thanks. I can confirm that it appears the fragment *.cfg file stuff is already working and I can confirm the file you mentioned is present and looks correct to me. I have now removed my custom changes and am just using *.cfg files now for the modifications I need.

Hi @izzy_building !

Nice! Thanks for the reply!

Have a nice day :slight_smile:

Best regards,