查看: 5140|回复: 2

ubuntu 22.04下编译tinker board 2s kernel 报错

[复制链接]

17

主题

32

回帖

187

积分

注册会员

Rank: 2

积分
187
发表于 2022-10-10 18:21:22 | 显示全部楼层 |阅读模式
  1.   CHK     scripts/mod/devicetable-offsets.h
  2.   CHK     include/config/kernel.release
  3.   CHK     include/generated/uapi/linux/version.h
  4.   CHK     include/generated/utsrelease.h
  5.   CHK     include/generated/bounds.h
  6.   CHK     include/generated/timeconst.h
  7.   CHK     include/generated/asm-offsets.h
  8.   CALL    scripts/checksyscalls.sh
  9. make[1]: 'include/generated/vdso-offsets.h' is up to date.
  10.   CHK     include/generated/compile.h
  11.   SKIPPED include/generated/compile.h
  12.   CC      kernel/panic.o
  13. In file included from ./arch/arm64/include/asm/atomic.h:41,
  14.                  from include/linux/atomic.h:4,
  15.                  from include/linux/debug_locks.h:5,
  16.                  from kernel/panic.c:11:
  17. kernel/panic.c: In function 'add_taint':
  18. ./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'int[1]' [-Warray-bounds]
  19. error, forbidden warning:cmpxchg.h:38
  20.    38 |         asm volatile(ARM64_LSE_ATOMIC_INSN(                             \
  21.       |         ^~~
  22. ./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
  23.    72 | __XCHG_CASE(w,  ,  mb_4, dmb ish, nop,  , a, l, "memory")
  24.       | ^~~~~~~~~~~
  25. In file included from kernel/panic.c:11:
  26. include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
  27.    10 | extern int debug_locks;
  28.       |            ^~~~~~~~~~~
  29. In file included from ./arch/arm64/include/asm/atomic.h:41,
  30.                  from include/linux/atomic.h:4,
  31.                  from include/linux/debug_locks.h:5,
  32.                  from kernel/panic.c:11:
  33. ./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'int[1]' [-Warray-bounds]
  34. error, forbidden warning:cmpxchg.h:38
  35.    38 |         asm volatile(ARM64_LSE_ATOMIC_INSN(                             \
  36.       |         ^~~
  37. ./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
  38.    72 | __XCHG_CASE(w,  ,  mb_4, dmb ish, nop,  , a, l, "memory")
  39.       | ^~~~~~~~~~~
  40. In file included from kernel/panic.c:11:
  41. include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
  42.    10 | extern int debug_locks;
  43.       |            ^~~~~~~~~~~
  44. make[1]: *** [scripts/Makefile.build:278: kernel/panic.o] Error 1
  45. make[1]: *** Deleting file 'kernel/panic.o'
  46. make: *** [Makefile:1036: kernel] Error 2
复制代码


同样的环境编译内核标准版本4.4.194 可以成功。
各位大神问题是出在什么地方了?
感谢。
回复

使用道具 举报

17

主题

32

回帖

187

积分

注册会员

Rank: 2

积分
187
 楼主| 发表于 2022-10-11 11:38:00 | 显示全部楼层
  1. CHK     scripts/mod/devicetable-offsets.h
  2.   CHK     include/config/kernel.release
  3.   CHK     include/generated/uapi/linux/version.h
  4.   CHK     include/generated/utsrelease.h
  5.   CHK     include/generated/bounds.h
  6.   CHK     include/generated/timeconst.h
  7.   CHK     include/generated/asm-offsets.h
  8.   CALL    scripts/checksyscalls.sh
  9. make[1]: 'include/generated/vdso-offsets.h' is up to date.
  10.   CHK     include/generated/compile.h
  11.   CC      kernel/panic.o
  12. In file included from ./arch/arm64/include/asm/atomic.h:41,
  13.                  from include/linux/atomic.h:4,
  14.                  from include/linux/debug_locks.h:5,
  15.                  from kernel/panic.c:11:
  16. kernel/panic.c: In function 'add_taint':
  17. ./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'int[1]' [-Warray-bounds]
  18. error, forbidden warning:cmpxchg.h:38
  19.    38 |         asm volatile(ARM64_LSE_ATOMIC_INSN(                             \
  20.       |         ^~~
  21. ./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
  22.    72 | __XCHG_CASE(w,  ,  mb_4, dmb ish, nop,  , a, l, "memory")
  23.       | ^~~~~~~~~~~
  24. In file included from kernel/panic.c:11:
  25. include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
  26.    10 | extern int debug_locks;
  27.       |            ^~~~~~~~~~~
  28. In file included from ./arch/arm64/include/asm/atomic.h:41,
  29.                  from include/linux/atomic.h:4,
  30.                  from include/linux/debug_locks.h:5,
  31.                  from kernel/panic.c:11:
  32. ./arch/arm64/include/asm/cmpxchg.h:38:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'int[1]' [-Warray-bounds]
  33. error, forbidden warning:cmpxchg.h:38
  34.    38 |         asm volatile(ARM64_LSE_ATOMIC_INSN(                             \
  35.       |         ^~~
  36. ./arch/arm64/include/asm/cmpxchg.h:72:1: note: in expansion of macro '__XCHG_CASE'
  37.    72 | __XCHG_CASE(w,  ,  mb_4, dmb ish, nop,  , a, l, "memory")
  38.       | ^~~~~~~~~~~
  39. In file included from kernel/panic.c:11:
  40. include/linux/debug_locks.h:10:12: note: while referencing 'debug_locks'
  41.    10 | extern int debug_locks;
  42.       |            ^~~~~~~~~~~
  43. make[1]: *** [scripts/Makefile.build:278: kernel/panic.o] Error 1
  44. make[1]: *** Deleting file 'kernel/panic.o'
  45. make: *** [Makefile:1036: kernel] Error 2
复制代码
回复 支持 反对

使用道具 举报

17

主题

32

回帖

187

积分

注册会员

Rank: 2

积分
187
 楼主| 发表于 2022-10-11 21:00:15 | 显示全部楼层
已解决 需要使用 这个gcc:
https://releases.linaro.org/comp ... 64-linux-gnu.tar.xz
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|风火轮WIKI|手机版|小黑屋|深圳风火轮团队 ( 粤ICP备17095099号 )

GMT+8, 2024-11-21 19:42 , Processed in 0.054151 second(s), 19 queries .

快速回复 返回顶部 返回列表
 
【客服1】 商务合作 15289193
【客服2】 业务洽谈 13257599
【客服3】 售前咨询 510313198
【邮箱】
smartfire@smartfire.cn