Yocto - Change Kernel Configuration through defconfig

Hello everyone.

Quick question: If i change the .config file in /meta-toradex-nxp/recipes-kernel/linux/linux-toradex-4.1-2.0.x/apalis-imx6 and build kernel from scratch (from fetch onwards), do those changes apply into my kernel?

I want to make sure to avoid the fact of a clean build and having to menuconfig my kernel modifications and then rebuild the image because of those said changes.

Best Regards!

Hi

Yes, its the idea that you inject a defconfig file with your changes.

  • Note that the filename is not .config
  • Note that you can create a ‘minimal’ defconfig file with make savedefconfig
  • Note that there is a ‘bbappend’ mechanism in yocto, so that you can inject such a file from your own yocto layer.

Max

Hi Max,

Thank you for your help. That confirms it.

Yes I just noticed the filename is defconfig. I was using the name used by the kernel files. Is there an example on how to bbappend? I have some modifications in various sections of the kernel and I want to do them properly.

Also, can I add with that appending mechanism some extra kernel features?

When I do a clean yocto envvironment, I have to compile the kernel, then add to the source code the NFC driver, add in menuconfig and then recompile the image. This does not feel right at all. I know I can compile the kernel outside of yocto but I really would like to get everything done in yocto I don’t mind creating recipes / layers for it. Can you provide some insights on that too?

Best regards

Have a look here. While it is written against an older BSP the basic principles apply. Also the used Colibri T30 in the article has its kernel configuration taken from the kernel sources, so also there are differences.

Note that at the end of our Openembedded article is a list of recommended reading and Brandon’s webinars which have further information on the subject.

Ok Max, thanks again, I will dig into it, thank you.