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 进展缓慢.............
路漫漫其修远兮, 吾将上下而求索。与君共勉~!
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 进展缓慢.............
路漫漫其修远兮, 吾将上下而求索。与君共勉~!