免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4950 | 回复: 7
打印 上一主题 下一主题

[BootLoader] 编译U-boot一大堆错误,请大家帮忙 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-06-24 20:04 |只看该作者 |倒序浏览
本帖最后由 wu309785731 于 2013-06-25 22:43 编辑

linux新手,最新在学习u-boot,看了别人的博客,学着做,编译出了一大堆问题,能说说什么问题呀
用的是linux-arm-gcc 4.3.2交叉编译工具,针对是mini2440开发板的uboot制作。

[root@CentOS u-boot-201003]# make distclean
[root@CentOS u-boot-201003]# make mini2440_config
Configuring for mini2440 board...
[root@CentOS u-boot-201003]# make ARCH=arm CORSS_COMPILE=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabl- all
Generating include/autoconf.mk
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
Generating include/autoconf.mk.dep
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
for dir in tools examples/standalone examples/api cpu/arm920t /usr/u-boot-201003/cpu/arm920t/ ; do \
                        make -C $dir _depend ; done
make[1]: Entering directory `/usr/u-boot-201003/tools'
make[1]: Leaving directory `/usr/u-boot-201003/tools'
make[1]: Entering directory `/usr/u-boot-201003/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/usr/u-boot-201003/tools'
make[1]: Entering directory `/usr/u-boot-201003/examples/standalone'
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
make[1]: *** 没有规则可以创建“_depend”需要的目标“.depend”。 停止。
make[1]: Leaving directory `/usr/u-boot-201003/examples/standalone'
make[1]: Entering directory `/usr/u-boot-201003/examples/api'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/usr/u-boot-201003/examples/api'
make[1]: Entering directory `/usr/u-boot-201003/cpu/arm920t'
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
make[1]: *** 没有规则可以创建“_depend”需要的目标“.depend”。 停止。
make[1]: Leaving directory `/usr/u-boot-201003/cpu/arm920t'
make[1]: Entering directory `/usr/u-boot-201003/cpu/arm920t'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/usr/u-boot-201003/cpu/arm920t'
make -C tools all
make[1]: Entering directory `/usr/u-boot-201003/tools'
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -c -o crc32.o /usr/u-boot-201003/lib_generic/crc32.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES   -o default_image.o default_image.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES   -o fit_image.o fit_image.c -c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o image.o /usr/u-boot-201003/common/image.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES   -o imximage.o imximage.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES   -o kwbimage.o kwbimage.c -c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -c -o md5.o /usr/u-boot-201003/lib_generic/md5.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES   -o mkimage.o mkimage.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES   -o os_support.o os_support.c -c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -c -o sha1.o /usr/u-boot-201003/lib_generic/sha1.c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt.o /usr/u-boot-201003/libfdt/fdt.c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_ro.o /usr/u-boot-201003/libfdt/fdt_ro.c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_rw.o /usr/u-boot-201003/libfdt/fdt_rw.c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_strerror.o /usr/u-boot-201003/libfdt/fdt_strerror.c
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -c -o fdt_wip.o /usr/u-boot-201003/libfdt/fdt_wip.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/u-boot-201003/include -idirafter /usr/u-boot-201003/include2 -idirafter /usr/u-boot-201003/include -I /usr/u-boot-201003/libfdt -I /usr/u-boot-201003/tools -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic  -o mkimage crc32.o default_image.o fit_image.o image.o imximage.o kwbimage.o md5.o mkimage.o os_support.o sha1.o fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o
strip mkimage
make[1]: Leaving directory `/usr/u-boot-201003/tools'
make -C examples/standalone all
make[1]: Entering directory `/usr/u-boot-201003/examples/standalone'
gcc  -g  -Os   -fno-common -ffixed-r8   -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/usr/u-boot-201003/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/i686-redhat-linux/4.4.7/include -pipe  -DCONFIG_ARM -D__ARM__         -march=armv4 -Wall -Wstrict-prototypes    -o hello_world.o hello_world.c -c
hello_world.c:1: 错误:-march= switch所带参数(armv4)不正确
hello_world.c:1: 错误:-mtune=switch所带参数(armv4)不正确
make[1]: *** [hello_world.o] 错误 1
make[1]: Leaving directory `/usr/u-boot-201003/examples/standalone'
make: *** [examples/standalone] 错误 2
l

论坛徽章:
0
2 [报告]
发表于 2013-06-25 10:37 |只看该作者
在主Makefile中屏蔽掉examples编译吧
SUBDIRS = tools
#         examples \
#         api_examples

论坛徽章:
0
3 [报告]
发表于 2013-06-25 20:14 |只看该作者
编译器也没有指定对吧。

论坛徽章:
0
4 [报告]
发表于 2013-06-25 22:42 |只看该作者
whjzbp 发表于 2013-06-25 10:37
在主Makefile中屏蔽掉examples编译吧
SUBDIRS = tools
#         examples \


按你说的是屏蔽掉一些错误,重点是这个
cc1: 错误:-march= switch所带参数(armv4)不正确
cc1: 错误:-mtune=switch所带参数(armv4)不正确
make: *** [cpu/arm920t/start.o] 错误 2
按这提示是start.s里面改错了?

论坛徽章:
0
5 [报告]
发表于 2013-06-26 11:00 |只看该作者
我用的编译器是4.4.0,u-boot是1.3.2,在fedora12下编译,也碰到armv4的错,但屏蔽掉了example后剩下的错误就能正常解决了,你这个我还不知道错在那了

论坛徽章:
0
6 [报告]
发表于 2013-07-10 13:14 |只看该作者
编译器用的是gcc,没用对,所以编译不了汇编部分。改下编译器再试试吧。

论坛徽章:
0
7 [报告]
发表于 2013-07-23 23:03 |只看该作者
CROSS_COMPILE  你拼写错了

论坛徽章:
0
8 [报告]
发表于 2013-07-27 10:22 |只看该作者
没有指定机型吧
在Makefile中加入
export ARCH=arm 试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP