u-boot 2410 移植记

本文记录了在编译U-Boot 1.1.4过程中遇到的问题及解决方法,包括修改CROSS_COMPILE路径、解决make错误及编译配置等步骤。最终通过调整config.mk文件中的ABI设置成功解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

u-boot版本:1.1.4
cpu:s3c2410

下载最新版的u-boot,发现原来的memsetup.s已被更名为lowlevel_init.s
忽略之........

打开makefile文件,并找到其中的语句:
    ifeq($(ARCH).arm)
    CROSS_COMPILE=arm —linux—
    end if
接着将其改成
    ifeq($(ARCH),arm)
    CROSS_COMPILE =/usr/local/arm/2.95.3/bin/arm-linux-
    end if

运行命令:
    $ make smdk2410_config
    $ make

出现错误:
make[1]: Entering directory `/home/u-boot/tools'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/home/u-boot/tools'
make[1]: Entering directory `/home/u-boot/examples'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/home/u-boot/examples'
make[1]: Entering directory `/home/u-boot/post'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/home/u-boot/post'
make[1]: Entering directory `/home/u-boot/post/cpu'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/home/u-boot/post/cpu'
make -C tools all
make[1]: Entering directory `/home/u-boot/tools'
make[1]: Leaving directory `/home/u-boot/tools'
make -C examples all
make[1]: Entering directory `/home/u-boot/examples'
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/home/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/host/armv4l/lib/gcc-lib/armv4l-unknown-linux/2.95.2/include -pipe  -DCONFIG_ARM -D__ARM__ -march=armv4 -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
cc1: Invalid option `abi=apcs-gnu'
make[1]: *** [hello_world.o] Error 1
make[1]: Leaving directory `/home/u-boot/examples'
make: *** [examples] Error 2

头痛................
遂上网
发现很多同志遇到了同样的问题
达人曰:
    把对应的cpu目录arm920t下config.mk倒数第二行abi=apcs-gnu 删除即可,或者这样写
    PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,$(call cc-option,-mabi=apcs-gnu),)
    PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
如法炮制
大功告成
感激涕零~!

最后向arm学习者推荐一本书:《arm嵌入式系统开发——软件设计与优化》北京航空航天大学出版社 沈建华 译

本人自学arm linux 进展缓慢.............

路漫漫其修远兮, 吾将上下而求索。与君共勉~!
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值