[solved] Kernel configuration fragment application


#1

Hi

We are trying to merge in our yocto layer into the source code for the 16.1 yocto build for the wp750x platform. In doing this I have some problems getting my kernel configuration fragment .cfg file applied to the kernel build. I have previously (version 15) been able to simply add a .cfg file to an linux-yocto_3.14.bbappend file and thereby edit the kernel .config file before building the kernel and thus been able to enable some kernel drivers that were otherwise disabled. Has this process been changed in the new 16.1 build setup?

Kind regards

Andreas


#2

We checked in R16.1 and enabled drivers in menuconfig and checked in .config file to verify drivers enabled in menuconfig. drivers enabled is present in .config file.
Please provide the steps followed and logs if any.


#3

The process is to make the changes in the menuconfig, then run a bitbake linux-yocto -c diffconfig and take the resulting fragment and add it to a new layer linux-yocto_3.14.bbappend recipe. This should be the correct way to add the changes in the menuconfig to the layer description, but it does not seem to be taken into account when actually building the kernel.


#4

Hi @andcor,

that process has changed a bit because kernels for our other products (wp76xx, …) are not forks of ‘linux-yocto’, but instead forks of ‘linux-quic’, which has a configuration process that is similar to the linux from kernel.org.

So in a sense, our Yocto configuration is not really ‘the yocto way’ anymore but closer to ‘the kernel.org way’.

To patch the configuration on wp75/wp85, I would recommend that you create a patch for the arch/arm/configs/mdm9615_defconfig file, that you add in a linux-yocto_3.14.bbappend.


#5

Makes sense and it close to what I ended up doing. I have just modified the recipe to overwrite the .config file with one of my own. But I see that the patch approach is much cleaner (Why didn’t I think of that).


#6

How do you do a patch to that file? I have a couple of patches in my build recipe which I have just now discovered is not applied to the kernel tree before building.


#7

You would need to apply the configuration to arch/arm/configs/mdm9615_defconfig, create a git commit with your change and then do a git format-patch -1.
If you apply multiple fragments, you can create as many commits as you want and run git format-patch -n with n=<nb of patches>.
Then add the .patch to yocto.


#8

The thing is, I already have quite a lot of patches to the kernel that I have just know discovered were not applied. Is there any special tricks to make the .patch file actally get taken into account when building the kernel?


#9

If we are talking about patches that are not just for the configuration but also the source code, and you’re adding these patches through SRC_URI, they should be applied to the kernel as extracted in build_bin. If that’s not the case I think that’s a bug.


#10

It does, infact, not seem to work. At least for me.