ERROR: Kernel configuration is invalid
Hi All ,
I am trying to build an out-of-tree hello-world module using the XEN + RPI4 setup.
1) Compilation of kernel-modules with this setup shows below error:
*/home/ashish/yocto-default/build-xenimage/tmp/work-shared/raspberrypi4-64/kernel-source/Makefile:609: include/config/auto.conf: No such file or directory*
*ERROR: Kernel configuration is invalid.* *include/generated/autoconf.h or include/config/auto.conf are missing.* *Run 'make oldconfig && make prepare' on kernel src to fix it.*
2) Please find that just to ensure if the procedure to compile an external modules is correct , i tried setting *MACHINE ?= "qemuarm64" ,* and reported same steps .
I was able to compile the kernel module properly & ran on qemu to confirm the module is proper.
3) Steps followed :
1) Create an basic hello-world-module.c & Makefile in any known location ( say custom layer )
2) $ bitbake -c devshell virtual/kernel
$ make M=<Location of module created in step 1 above> modules
I was under expectation that the config file would be proper as we are able to generate xen-image-minimal.
Any pointers or suggestion will be helpful.
[13:29:33]:~/yocto-default/build-xenimage/tmp/work-shared/raspberrypi4-64/kernel-source (rpi-5.4.y) : make M=/home/ashish/yocto-default/layer/meta-krnl/recipes-krnl/my_module/ modules make[1]: Entering directory '/home/ashish/yocto-default/build-xenimage/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.4.51+gitAUTOINC+aafb8f095e_machine-r0/linux-raspberrypi4_64-standard-build' /home/ashish/yocto-default/build-xenimage/tmp/work-shared/raspberrypi4-64/kernel-source/Makefile:609: include/config/auto.conf: No such file or directory
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.
/home/ashish/yocto-default/build-xenimage/tmp/work-shared/raspberrypi4-64/kernel-source/Makefile:681: recipe for target 'include/config/auto.conf' failed
make[1]: *** [include/config/auto.conf] Error 1
make[1]: Leaving directory '/home/ashish/yocto-default/build-xenimage/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.4.51+gitAUTOINC+aafb8f095e_machine-r0/linux-raspberrypi4_64-standard-build' Makefile:179: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
[13:29:43]:~/yocto-default/build-xenimage/tmp/work-shared/raspberrypi4-64/kernel-source (rpi-5.4.y) :
Futher debugging , i can observe that .config is present & i can execute $ bitbake -c menuconfig virtual/kernel
1) With RPI4
Observation : Error of kernel_configuration
Config file : Is present at /home/ashish/yocto-default/build-xenimage/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.4.51+gitAUTOINC+aafb8f095e_machine-r0/linux-raspberrypi4_64-standard-build/.config
2) With Qemu
Observation: No Error for configuration
Config file : Is present at /home/ashish/yocto-default/build-qemu/tmp/work/qemuarm64-poky-linux/linux-yocto/5.4.49+gitAUTOINC+30814016b3_ec485bd4af-r0/linux-qemuarm64-standard-build/.config
Any pointers as to why error even though we have an config file being present or i am missing any thing here