Page 1 of 1

Compiling ko Driver Module

Posted: 2024-10-31 6:34
by robit
Hi,

I tried to compile your sample file of Load.ko-driver.zip available on
https://wiki.luckfox.com/Luckfox-Pico/L ... x-Pico-SDK
for Luckfox pico mini B with buildroot SDK1.4

It gaves me this error:

lll@lll-VB:~/luckfox-work/ko-driver$ export ARCH=arm

lll@lll-VB:~/luckfox-work/ko-driver$ export CROSS_COMPILE=/home/lll/Luckfox-Pico/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-

lll@lll-VB:~/luckfox-work/ko-driver$ make
make -C /home/lll/luckfox-pico/sysdrv/source/kernel M=/home/lll/luckfox-work/ko-driver modules
make[1]: Entering directory '/home/lll/luckfox-pico/sysdrv/source/kernel'

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.

Makefile:672: include/config/auto.conf: No such file or directory
make[1]: *** [Makefile:758: include/config/auto.conf] Error 1
make[1]: Leaving directory '/home/lll/luckfox-pico/sysdrv/source/kernel'
make: *** [Makefile:5: all] Error 2

Please help me to solve this problem.

Thanks

Re: Compiling ko Driver Module

Posted: 2024-10-31 8:32
by Luckfox Taylor

Re: Compiling ko Driver Module

Posted: 2024-10-31 17:06
by robit
That did not help.
I recompiled the kernel of the latest 1.4 SDK using ./build.sh and the errpr still persists

....
********rkImageMaker ver 2.2********
Generating new image, please wait...
Writing head info...
Writing boot file...
Writing firmware...
Generating MD5 data...
MD5 data generated successfully!
New image generated successfully!
[mk-update_pack.sh:info] Making -RK1106 update.img OK.
[build.sh:info] Running build_updateimg succeeded.
[build.sh:info] MEDIUM SPI_NAND relink Image
[build.sh:info] Running build_firmware succeeded.
[build.sh:info] Running build_all succeeded.
'uboot.debug.tar.bz2' -> '/home/lll/luckfox-pico/IMAGE/IPC_SPI_NAND_BUILDROOT_RV1103_LUCKFOX_PICO_MINI_B_20241031.1728_RELEASE_TEST/DEBUG_FILES/uboot/uboot.debug.tar.bz2'
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
save to /home/lll/luckfox-pico/IMAGE/IPC_SPI_NAND_BUILDROOT_RV1103_LUCKFOX_PICO_MINI_B_20241031.1728_RELEASE_TEST
[build.sh:info] Running build_save succeeded.
[build.sh:info] Running build_allsave succeeded.

lll@lll-VB:~/luckfox-work/ko-driver$ make ARCH=arm CROSS_COMPILE=/home/lll/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc
make -C /home/lll/luckfox-pico/sysdrv/source/kernel M=/home/lll/luckfox-work/ko-driver modules
make[1]: Entering directory '/home/lll/luckfox-pico/sysdrv/source/kernel'
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.
Makefile:672: include/config/auto.conf: No such file or directory
make[1]: *** [Makefile:758: include/config/auto.conf] Error 1
make[1]: Leaving directory '/home/lll/luckfox-pico/sysdrv/source/kernel'
make: *** [Makefile:5: all] Error 2
lll@lll-VB:~/luckfox-work/ko-driver$

Re: Compiling ko Driver Module

Posted: 2024-11-03 14:02
by robit
Hi,

Has anyone succeed in compiling the "helloword" kernel sample module from the website?

The Faq 19 does not help.

Even if I rebuild the kernel using "./builds kernel" those include/generated/autoconf.h or include/config/auto.conf files which the ../source/kernel/Makefile looks for in the 757.line exists only during the build process.
How can we make them permanent after building the kernel?

Any ideas would be appreciated.
Thanks