u-boot版本:1.3.1
cpu:s3c2410(英蓓特EdukitII实验箱)
与以前的u-boot比较,原来的memsetup.s已被更名为lowlevel_init.s(不影响)
编译过程:
打开makefile文件,并找到其中的语句:
ifeq($(ARCH).arm)
CROSS_COMPILE=arm —linux—uclibc-
end if
接着将其改成
ifeq($(ARCH),arm)
CROSS_COMPILE =arm-linux—uclibc-
end if
运行命令:
$ make smdk2410_config
$ make
生成四个文件:uboot,uboot.bin,uboot.map,uboot.srec
有的时候也会出现错误,网上有解决方法如下:(验证过)
###################################################################################
出现错误:
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,))
###################################################################################
阅读(1230) | 评论(0) | 转发(0) |