根据荔枝派zero文档要求:
安装交叉编译器:gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf
下载Linux源码: git clone https://github.com/Lichee-Pi/linux.git
下载的是 4.10.y 版本。
然后使用以下步骤时出现错误:
root@linux:/home/linux-zero-4.10.y# make ARCH=arm licheepi_zero_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:773:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
773 | sprintf(newname, "%s%s", dirname, basename);
| ^~~~~~
scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
In file included from /usr/include/stdio.h:894,
from scripts/kconfig/zconf.tab.c:82:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output 1 or more bytes (assuming 4104) into a destination of size 4097
38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c:776:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
776 | sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:894,
from scripts/kconfig/zconf.tab.c:82:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 13 and 4119 bytes into a destination of size 4097
38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
root@linux:/home/linux-zero-4.10.y# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC init/main.o
CHK include/generated/compile.h
CC arch/arm/vfp/vfpmodule.o
CC init/do_mounts.o
CC arch/arm/vdso/vgettimeofday.o
/tmp/cczqJHNG.s: Assembler messages:
/tmp/cczqJHNG.s:69: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:97: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:356: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1036: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1049: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1064: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1087: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1102: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1121: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1136: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1159: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1174: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1197: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1248: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1261: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1275: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1299: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1317: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1337: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1357: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1381: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1396: 错误: selected processor does not support `isb ' in ARM mode
/tmp/cczqJHNG.s:1420: 错误: selected processor does not support `isb ' in ARM mode
make[1]: *** [scripts/Makefile.build:295:arch/arm/vfp/vfpmodule.o] 错误 1
make: *** [Makefile:988:arch/arm/vfp] 错误 2
make: *** 正在等待未完成的任务....
/tmp/ccj2gZFh.s: Assembler messages:
/tmp/ccj2gZFh.s:65: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:79: 错误: selected processor does not support `isb ' in ARM mode
/tmp/ccj2gZFh.s:82: 错误: selected processor does not support `mrrc p15,1,r4,r5,c14' in ARM mode
/tmp/ccj2gZFh.s:98: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:113: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:206: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:216: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:235: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:247: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:316: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccj2gZFh.s:327: 错误: selected processor does not support `isb ' in ARM mode
/tmp/ccj2gZFh.s:330: 错误: selected processor does not support `mrrc p15,1,r6,r7,c14' in ARM mode
/tmp/ccj2gZFh.s:349: 错误: selected processor does not support `dmb ish' in ARM mode
make[1]: *** [scripts/Makefile.build:295:arch/arm/vdso/vgettimeofday.o] 错误 1
make: *** [Makefile:988:arch/arm/vdso] 错误 2
/tmp/ccdtSPkT.s: Assembler messages:
/tmp/ccdtSPkT.s:933: 错误: selected processor does not support `cpsid i' in ARM mode
/tmp/ccdtSPkT.s:1054: 错误: selected processor does not support `cpsid i' in ARM mode
/tmp/ccdtSPkT.s:1092: 错误: selected processor does not support `cpsie i' in ARM mode
/tmp/ccdtSPkT.s:1274: 错误: selected processor does not support `cpsie i' in ARM mode
make[1]: *** [scripts/Makefile.build:294:init/main.o] 错误 1
make[1]: *** 正在等待未完成的任务....
/tmp/ccqH5JuW.s: Assembler messages:
/tmp/ccqH5JuW.s:852: 错误: selected processor does not support `dmb ish' in ARM mode
/tmp/ccqH5JuW.s:859: 错误: architectural extension `mp' is not allowed for the current base architecture
/tmp/ccqH5JuW.s:860: 错误: selected processor does not support `pldw [r3]' in ARM mode
/tmp/ccqH5JuW.s:863: 错误: selected processor does not support `pld [r3]' in ARM mode
/tmp/ccqH5JuW.s:869: 错误: selected processor does not support `ldrex r2,[r3]' in ARM mode
/tmp/ccqH5JuW.s:871: 错误: selected processor does not support `strex r1,r2,[r3]' in ARM mode
/tmp/ccqH5JuW.s:876: 错误: selected processor does not support `dmb ish' in ARM mode
make[1]: *** [scripts/Makefile.build:294:init/do_mounts.o] 错误 1
make: *** [Makefile:988:init] 错误 2
以上
查阅了各大网站解释,
说是gcc版本过高,因此降为GCC-9.4.0,无效
最近编辑记录 linux-xc (2022-06-28 19:20:20)
离线
已自行解决。
问题的原因是Ubuntu 安装了多个版本的arm-linux-gnueabihf,手动卸载/删除关于arm-linux-gnueabihf的文件后重新安装即可
离线