[Error]Kernel configuration is invalid

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Error]Kernel configuration is invalid

Jump to solution
7,081 Views
yusufalti333
Contributor IV
I am trying to build a specific driver with an out-of-tree module. I created my own meta layer. But it did not work. Can anyone help me ?.
I declared module init module exit functions inside driver module (sample.c) and I prepared a Makefile according to yocto project Out-Of-Tree modules section. I added this folder to bblayers.conf file under build directory.
This is the file structure.
/my_meta_layer
|_ conf
    |__layer.conf
|_recipes-kernel
   |_files
       |_Makefile
       |_sample.c
       |_COPYING
and this is the error I got:

|   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.
|
| make[2]: *** [include/config/auto.conf] Error 1
| make[2]: Leaving directory `/home/hwlab/Desktop/Yocto2.7/build_t1042d4rdb-64b/tmp/work-shared/t1042d4rdb-64b/kernel-build-artifacts'
| make[1]: *** [sub-make] Error 2
| make[1]: Leaving directory `/home/hwlab/Desktop/Yocto2.7/build_t1042d4rdb-64b/tmp/work-shared/t1042d4rdb-64b/kernel-source'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/hwlab/Desktop/Yocto2.7/build_t1042d4rdb-64b/tmp/work/t1042d4rdb_64b-fsl-linux/kernel-module-sample/1.0-r0/temp/log.do_compile.1133)

ERROR: Task (/home/hwlab/Desktop/Yocto2.7/sources/meta-yusuf/recipes-kernel/sample/kernel-module-sample.bb:do_compile) failed with exit code '1'
 
.bb file is like this:
 
SUMMARY = "Example of how to build an external Linux kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
inherit module
PR = "r0"
SRC_URI = "file://Makefile \
file://sample.c \
file://COPYING \
"
S = "${WORKDIR}"
RPROVIDES_${PN} += "kernel-module-sample"
0 Kudos
1 Solution
6,436 Views
yusufalti333
Contributor IV

Problem solved by using default kernel menuconfig settings ( I was using a modified kernel .config)

View solution in original post

0 Kudos
1 Reply
6,437 Views
yusufalti333
Contributor IV

Problem solved by using default kernel menuconfig settings ( I was using a modified kernel .config)

0 Kudos