恩山无线论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 159|回复: 1

openwrt尝试编译uboot出错,大神快帮忙看看

[复制链接]
发表于 2020-9-21 16:23 | 显示全部楼层 |阅读模式
本帖最后由 chenst 于 2020-9-21 16:30 编辑

git clone https://github.com/qdk0901/openwrt-uboot-mt7628.git
下载的源码拷贝到openwrt源码下的package/boot目录下

在menuconfig中选择uboot-mt7628这个package

make package/uboot-mt7628/prepare V=s

make package/uboot-mt7628/compile V=s

出错如下

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `test_bit':

/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:570: multiple definition of `test_bit'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:570: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `find_first_zero_bit':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:590: multiple definition of `find_first_zero_bit'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:590: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `find_next_zero_bit':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:637: multiple definition of `find_next_zero_bit'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:637: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `ffz':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:687: multiple definition of `ffz'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/bitops.h:687: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `strcpy':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:16: multiple definition of `strcpy'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:16: first defined here


mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `strncpy':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:41: multiple definition of `strncpy'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:41: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `strcmp':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:69: multiple definition of `strcmp'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:69: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `strncmp':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:99: multiple definition of `strncmp'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:99: first defined here

mipsel-openwrt-linux-musl-ld: lib_mips/libmips.a(mips_linux.o): in function `memscan':
/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:140: multiple definition of `memscan'; lib_mips/libmips.a(board.o):/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/include/asm/string.h:140: first defined here

make[3]: *** [Makefile:364: u-boot] Error 1

make[3]: Leaving directory '/home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09'

make[2]: *** [Makefile:85: /home/cc/Openwrt19/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/u-boot-sxx/u-boot-2015.09/.built] Error 2

make[2]: Leaving directory '/home/cc/Openwrt19/package/boot/uboot-mt7628'

time: package/boot/uboot-mt7628/sxx/compile#7.34#2.45#10.92

make[1]: *** [package/Makefile:113: package/boot/uboot-mt7628/compile] Error 2

make[1]: Leaving directory '/home/cc/Openwrt19'

make: *** [/home/cc/Openwrt19/include/toplevel.mk:227:package/uboot-mt7628/compile] 错误 2

不知道哪里错了,请指教,谢谢!!!



我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-9-22 13:36 | 显示全部楼层
本帖最后由 rtlhq 于 2020-9-22 13:42 编辑

你的openwrt工具鏈太新,很多頭文件重複定義造成編譯中斷

ps:這個只是從MediaTek_ApSoC_SDK_4300中提取后魔改到openwrt下,在原sdk中使用的是buildroot-gcc342這個工具鏈,你使用openwrt編譯即使成功了也不一定能正常運行。

另外:這個應該是魔改在openwrt 15.05"Chaos Calmer"上使用低版本工具鏈編譯,而不是你現在使用的openwrt 19版上編譯



我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )|网站地图

GMT+8, 2020-10-20 14:06

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表