linux 4.19在龙芯平台上编译出错解决方法

39 篇文章 0 订阅
4 篇文章 0 订阅

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

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值