ubuntu 22.04下编译tinker board 2s kernel 报错
CHK scripts/mod/devicetable-offsets.hCHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
make: 'include/generated/vdso-offsets.h' is up to date.
CHK include/generated/compile.h
SKIPPED include/generated/compile.h
CC kernel/panic.o
In file included from ./arch/arm64/include/asm/atomic.h:41,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from kernel/panic.c:11:
kernel/panic.c: In function 'add_taint':
./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int' is partly outside array bounds of 'int' [-Warray-bounds]
error, forbidden warning:cmpxchg.h:38
38 | asm volatile(ARM64_LSE_ATOMIC_INSN( \
| ^~~
./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
72 | __XCHG_CASE(w,,mb_4, dmb ish, nop,, a, l, "memory")
| ^~~~~~~~~~~
In file included from kernel/panic.c:11:
include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
10 | extern int debug_locks;
| ^~~~~~~~~~~
In file included from ./arch/arm64/include/asm/atomic.h:41,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from kernel/panic.c:11:
./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int' is partly outside array bounds of 'int' [-Warray-bounds]
error, forbidden warning:cmpxchg.h:38
38 | asm volatile(ARM64_LSE_ATOMIC_INSN( \
| ^~~
./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
72 | __XCHG_CASE(w,,mb_4, dmb ish, nop,, a, l, "memory")
| ^~~~~~~~~~~
In file included from kernel/panic.c:11:
include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
10 | extern int debug_locks;
| ^~~~~~~~~~~
make: *** Error 1
make: *** Deleting file 'kernel/panic.o'
make: *** Error 2
同样的环境编译内核标准版本4.4.194 可以成功。
各位大神问题是出在什么地方了?
感谢。 CHK scripts/mod/devicetable-offsets.h
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
make: 'include/generated/vdso-offsets.h' is up to date.
CHK include/generated/compile.h
CC kernel/panic.o
In file included from ./arch/arm64/include/asm/atomic.h:41,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from kernel/panic.c:11:
kernel/panic.c: In function 'add_taint':
./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int' is partly outside array bounds of 'int' [-Warray-bounds]
error, forbidden warning:cmpxchg.h:38
38 | asm volatile(ARM64_LSE_ATOMIC_INSN( \
| ^~~
./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
72 | __XCHG_CASE(w,,mb_4, dmb ish, nop,, a, l, "memory")
| ^~~~~~~~~~~
In file included from kernel/panic.c:11:
include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
10 | extern int debug_locks;
| ^~~~~~~~~~~
In file included from ./arch/arm64/include/asm/atomic.h:41,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from kernel/panic.c:11:
./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int' is partly outside array bounds of 'int' [-Warray-bounds]
error, forbidden warning:cmpxchg.h:38
38 | asm volatile(ARM64_LSE_ATOMIC_INSN( \
| ^~~
./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
72 | __XCHG_CASE(w,,mb_4, dmb ish, nop,, a, l, "memory")
| ^~~~~~~~~~~
In file included from kernel/panic.c:11:
include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
10 | extern int debug_locks;
| ^~~~~~~~~~~
make: *** Error 1
make: *** Deleting file 'kernel/panic.o'
make: *** Error 2
已解决 需要使用 这个gcc:
https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz
页:
[1]