Hi Rolf,
Take a look in: /setup-scripts/sources/meta-ti/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/…
There is a ‘defconfig’ file in there that copied to the ‘…/git/.config’ when you run ‘bitbake virtual/kernel -configure’.
This shouldn’t happen when you just run compile - as far as I know, but maybe there is something else in the recipe that checks if patches have been applied and defconfig copied etc.
Overwrite the defconfig file in the above directory with your modified .config, re-run the -configure and -compile steps and you should have an updated modified kernel uImage in …/git/arch/arm/boot/…
Regards,
Andrew.
Hi Andrew
thanks for answer! However, this is unfortunately not working. I studied the scripts a bit and here is what I found:
The copy mentioned below is happening apparently in kernel_do_configure coded in “kernel.bbclass” However, it copies only if there isn’t already a …/git/.config And if it does, it does not copy …/linux-ti33x-psp-3.2/beaglebone/defconfig but from …/linux-ti33x-psp-3.2/deconfig (which isn’t existing BTW).
However, do_configure_prepend() in “linux.inc” already creates a .config such that the mentioned copy does not happen at all.
Now I tried to be clever and put some code into do_configure_append() in same file to modify the .config This worked fine for the “bitbake virtual/kernel -c configure” step. But the following “-c compile” run another “make oldconfig” which removed my changes again.
So, I would like to find out from where “oldconfig” takes its defaults and why it removed my changes which are simply some modified “CONFIG_SND_SOC_…” settings.
Any help again is more than welcome!
Best
Rolf
Ok, I found the spot where in “-c compile” the .config is again rebuilt:
In multi-kernel.inc there is a “do_preparekernel()” which gets called and which runs a “make prepare” which in turn runs “scripts/kconfig/conf --silentoldconfig Kconfig” which seems to rebuild the .config from the various Kconfigs. At least for me a workaround now is to modify the Kconfigs between bitbake configure and compile, but there may be a more clean solution for this.
Have you commented out ‘INHERIT += "rm_work’ in your conf/local.conf?
It’s not commented right now. Should I disable it? What does it do?
Good point Stan, I should have remembered to mention that!
If ‘INHERIT += rm_work’ isn’t commented out bitbake will remove all of the intermediate files from the build - including all of the kernel source files, and, I think, the .config file - so if you want to be able to change anything you should definitely comment this out. And it should allow you to confirm that your modified .config file is being used.
Alternately, after the configure step, you could modify the .config file manually and build the kernel with make. Go to the the …/git/ repository, which should have a .config file present and run ‘make ARCH=arm menuconfig’ and modify the config this way, or just by editing the file directly. Then run something like ‘make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage’ (making sure to have added the cross-compiler directory to PATH - which should be done when you call ‘. ~/.oe/environment-angstrom2012.05’).
It would be better to figure out how to use a modified defconfig with bitbake - sorry my initial descrpition didn’t work - I will retry when I get back to automating my kernel build.
Regards,
Andrew.