OS: Loongnix server 1.7
工具链为:系统自带的gcc-4.8.5 和 gcc-7.3
平台:3A3000/3A4000
源码:kernel: 4.19
编译步骤
···
make loongson3_defconfig
make -j4
···
出错信息:
HOSTCC arch/mips/boot/compressed/calc_vmlinuz_load_addr arch/mips/boot/compressed/head.S:
Assembler messages: arch/mips/boot/compressed/head.S:47: 错误:invalid operands `dli $26,'
make[1]: *** [arch/mips/boot/compressed/head.o]
错误 1 make[1]: *** 正在等待未完成的任务....
解决方法:
---
arch/mips/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d74b374..7bbce9f 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -258,7 +258,7 @@ load-y = $(CONFIG_PHYSICAL_START)
endif
# Sign-extend the entry point to 64 bits if retrieved as a 32-bit number.
-entry-y = $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \
+entry-y = $(shell LANG=C $(OBJDUMP) -f vmlinux 2>/dev/null \
| sed -n '/^start address / { \
s/^.* //; \
s/0x\([0-7].......\)$$/0x00000000\1/; \
--
1.8.3.1
PS:使用如下这份内核源码编译不存在上述问题:https://mirrors.tuna.tsinghua.edu.cn/bjlx/pool/main/l/linux-4.19.0-loongson-3/linux-4.19.0-loongson-3_4.19.124-lemote.orig.tar.xz