Page 1 of 1

Cross-Compiling Kernel 5.3 - recipe for target 'scripts' failed

Posted: Tue Oct 08, 2019 7:42 pm
by phofman
Hi,

I am working on improving the USB audio gadget for RPi 4, and need the latest kernel with all (most) latest patches so that testing/patching makes sense.

I am cross-compiling branch 5.3.y using steps in https://www.raspberrypi.org/documentati ... uilding.md . For the stable branch (4.19) the procedure was flawless. For cloned branch 5.3.y ( git clone --depth=1 --branch rpi-5.3.y https://github.com/raspberrypi/linux) I keep getting

.....
DTCO arch/arm/boot/dts/overlays/udrc.dtbo
DTCO arch/arm/boot/dts/overlays/upstream.dtbo
DTCO arch/arm/boot/dts/overlays/vc4-fkms-v3d.dtbo
DTCO arch/arm/boot/dts/overlays/vc4-kms-kippah-7inch.dtbo
DTCO arch/arm/boot/dts/overlays/vc4-kms-v3d.dtbo
DTCO arch/arm/boot/dts/overlays/vga666.dtbo
DTCO arch/arm/boot/dts/overlays/w1-gpio-pullup.dtbo
DTCO arch/arm/boot/dts/overlays/w1-gpio.dtbo
DTCO arch/arm/boot/dts/overlays/wittypi.dtbo
HOSTLD scripts/genksyms/genksyms
Makefile:1097: recipe for target 'scripts' failed
make: *** [scripts] Error 2

Please what is the correct cross-complilation procedure? Thanks a lot,

Pavel.

Re: Cross-Compiling Kernel 5.3 - recipe for target 'scripts' failed

Posted: Wed Oct 09, 2019 5:30 am
by Kendek
I don't know, but I'm using this kernel with some minor modifications, compiled directly on Pi, under Ubuntu 19.10.

Code: Select all

> uname -a
Linux RPI4 5.3.3-v8 #1 SMP PREEMPT Fri Oct 4 15:52:50 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux

> dmesg | head -n 3
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 5.3.3-v8 ([email protected]) (gcc version 9.2.1 20190909 (Ubuntu 9.2.1-8ubuntu1)) #1 SMP PREEMPT Fri Oct 4 15:52:50 CEST 2019
[    0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.1
I have tried both with GCC and Clang successfully, without any problems. The compilation takes about 56 minutes with GCC, and ~110 minutes with Clang.

Re: Cross-Compiling Kernel 5.3 - recipe for target 'scripts' failed

Posted: Wed Oct 09, 2019 12:17 pm
by phofman
Hi,

Thanks for the info.

I need to edit the sources and Eclipse is running much better on an 8core xeon than on RPi :-)

Making make verbose (make V=1) revealed the toolchain could not compile a source in the scripts which uses a library call not available in the old 4.8.3 toolchain gcc-linaro-arm-linux-gnueabihf-raspbian-x64 recommended in https://www.raspberrypi.org/documentati ... uilding.md .

Using 4.9.3 toolchain arm-rpi-4.9.3-linux-gnueabihf

Code: Select all

echo PATH=\$PATH:~/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/ >> ~/.bashrc
the kernel 5.3 cross-compiled flawless. Not tested running yet (no RPi on hand now), but I believe it will be OK.

Re: Cross-Compiling Kernel 5.3 - recipe for target 'scripts' failed

Posted: Mon Jan 13, 2020 12:48 pm
by phofman
Confirmed to work for RPi4.