I have tried building the Linux kernel and I have got some compile errors. Does anyone know what I am doing wrong and how I can fix it? (Or, what additional information do you need?)
Build system is running recent Fedora: 4.19.6-300.fc29.x86_64 #1 SMP Sun Dec 2 17:33:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Target system is a Radxa Rock Pi 4
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
Refer to https://forum.radxa.com/t/building-debian-image-on-gcc8-systems/128/4
Yes, Radxa have a forum, and I have cross-posted there, but I think Stack Overflow has broader experience in this area.
Compile errors follow:
arch/arm64/kernel/vdso.c: In function ‘vdso_init’: arch/arm64/kernel/vdso.c:119:6: warning: ‘memcmp’ reading 4 bytes from a region of size 1 [-Wstringop-overflow=] error, forbidden warning:vdso.c:119 if (memcmp(&vdso_start, "\177ELF", 4)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:277: arch/arm64/kernel/vdso.o] Error 1
and
fs/exec.c: In function ‘get_task_comm’: fs/exec.c:1084:32: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess] error, forbidden warning:exec.c:1084
strncpy(buf, tsk->comm, sizeof(tsk->comm));
^