Page 1 of 1

Luckfox pico mini - error in cross-compilation (missing autoconf in kernel)

Posted: 2025-01-04 10:18
by Zemtriz
Hello everyone,

I'm trying to cross-compile realtek driver for wifi to buildroot.
RTL8812AU driver (https://github.com/svpcom/rtl8812au)
Compiling on Ubuntu 24.04.1 LTS

Command to cross-compile:

Code: Select all

make ARCH=arm KSRC=/home/marek/Downloads/luckfox-pico/sysdrv/source/kernel CROSS_COMPILE=/home/marek/Downloads/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf- -C /home/marek/Downloads/luckfox-pico/sysdrv/source/kernel/ O=/home/marek/Downloads/source/objs_kernel M=/home/marek/Downloads/rtl8812au modules
ERROR:

Code: Select all

make: Entering directory '/home/marek/Downloads/luckfox-pico/sysdrv/source/kernel'
make[1]: Entering directory '/home/marek/Downloads/source/objs_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.

/home/marek/Downloads/luckfox-pico/sysdrv/source/kernel/Makefile:672: include/config/auto.conf: No such file or directory
make[1]: *** [/home/marek/Downloads/luckfox-pico/sysdrv/source/kernel/Makefile:758: include/config/auto.conf] Error 1
make[1]: Leaving directory '/home/marek/Downloads/source/objs_kernel'
make: *** [Makefile:185: __sub-make] Error 2
make: Leaving directory '/home/marek/Downloads/luckfox-pico/sysdrv/source/kernel'
I've tried other variations of the command but faild in any way.
Can anyone help me to identify why do I get this error and where should I point for autoconf files in kernel?

BTW I also found this FAQ link:
https://wiki.luckfox.com/Luckfox-Pico/Luckfox-Pico-FAQ/
In point 19. there is the same error discussed. But solution doesn't work.

Thank you for any help.

Re: Luckfox pico mini - error in cross-compilation (missing autoconf in kernel)

Posted: 2025-01-06 11:55
by Ryand
You can refer to the linkļ¼ˆhttps://wiki.luckfox.com/zh/Luckfox-Pic ... E4% BB% 8B). I think the key point is that the directory you specified with "O=" may be incorrect.

In external builds, make will search for and generate necessary files in the directory specified by O=, including kernel configuration files (such as autocnf. h and autoconf).

Here is the result of my compilation:
image-20250106194434743.png

I specified KSRC and KBULLD_OUTPUT in the Makefile file, and the KBULLD_OUTPUT directory contains the include/generated/autoconf. h file.

Re: Luckfox pico mini - error in cross-compilation (missing autoconf in kernel)

Posted: 2025-01-15 16:21
by Zemtriz
Thank you so much. Everything seems to be working!