当前位置: 技术问答>linux和unix
u-boot 1.1.4 编译出问题了, 难道我的步骤有问题? 还是?
来源: 互联网 发布时间:2016-05-07
本文导语: VM + REDHAT9V。0 + ARM-LINUX-GCC-3。3。2 + U-BOOT-1。1。4 上面是环境 下面是操作步骤: [root@localhost share]# tar -xjvf u-boot-1.1.4.tar.bz2 [root@localhost share]# tar -xjvf arm-linux-gcc-3.3.2.tar.bz2 解压后,在/mnt/hgfs/share 目录有个...
VM + REDHAT9V。0 + ARM-LINUX-GCC-3。3。2 + U-BOOT-1。1。4
上面是环境
下面是操作步骤:
[root@localhost share]# tar -xjvf u-boot-1.1.4.tar.bz2
[root@localhost share]# tar -xjvf arm-linux-gcc-3.3.2.tar.bz2
解压后,在/mnt/hgfs/share 目录有个,usr 目录,这个是 gcc3.3.2的连接工具
进入usr目录,把arm目录的内容 复制到/usr/local 下
[root@localhost share]# cd usr
[root@localhost usr]# ls
local
[root@localhost usr]# cd local
[root@localhost local]# ls
arm
[root@localhost local]# cp -r arm /usr/local/
并设置 PATH
[root@localhost share]# vi /etc/profile
在此文件加
pathmunge=/usr/local/arm/3.3.2/bin
再把/mnt/hgfs/share 目录 中的 u-boot-1.1.4
复制到/u-boot 里
[root@localhost share]# cp -r u-boot-1.1.4 /u-boot
[root@localhost share]#
进入 u-boot-1.1.4
先测试下,交叉工具 是否正确
[root@localhost u-boot-1.1.4]# arm-linux-gcc -v
Reading specs from /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --target=arm-linux --with-cpu=strongarm1100
--prefix=/usr/local/arm/3.3.2 i686-pc-linux-gnu --with-headers=/work/kernel.h3900/include --enable-
threads=pthreads --enable-shared --enable-static --enable-languages=c,c++
Thread model: posix
gcc version 3.3.2
然后make smdk2410_config
[root@localhost u-boot-1.1.4]# make smdk2410_config
Configuring for smdk2410 board...
这步没有问题
接着再 make 操作
[root@localhost u-boot-1.1.4]# make
make[1]: Entering directory `/u-boot/u-boot-1.1.4/tools'
ln -s ../common/environment.c environment.c
ln -s ../lib_generic/crc32.c crc32.c
gcc -M -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC environment.c img2srec.c
mkimage.c crc32.c envcrc.c gen_eth_addr.c bmp_logo.c > .dependmake[1]: Leaving directory `/u-boot/u-boot-
1.1.4/tools'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/tools'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/tools'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/examples'
arm-linux-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -
DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -
isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -
mabi=apcs-gnu -Wall -Wstrict-prototypes hello_world.c stubs.c > .depend
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/examples'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/post'
arm-linux-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -
DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -
isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -
mabi=apcs-gnu -Wall -Wstrict-prototypes cache_8xx.S cache.c codec.c cpu.c dsp.c ether.c i2c.c memory.c
post.c rtc.c spr.c sysmon.c tests.c uart.c usb.c watchdog.c > .depend
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/post'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/post/cpu'
arm-linux-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -
DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -
isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -
mabi=apcs-gnu -Wall -Wstrict-prototypes asm.S cmp.c cmpi.c two.c twox.c three.c threex.c threei.c andi.c
srawi.c rlwnm.c rlwinm.c rlwimi.c store.c load.c cr.c b.c multi.c string.c complex.c > .depend
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/post/cpu'
make: *** [depend] Error 2
[root@localhost u-boot-1.1.4]#
在网上查,修改 cpu/arm920t里的 config.mk
)将cpu/arm920t/config.mk中的PLATform_CPPFLAGS +=$( -mapcs-32,$(call cc-option,-mabi=apcs-gnu)改为PLATform_CPPFLAGS +=$(call cc-option,-mapcs-32,$(call cc-option,-mabi=apcs-gnu),)
再make
还是有问题,如下:
make -C examples all
make[1]: Entering directory `/u-boot/u-boot-1.1.4/examples'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -mshort-load-bytes -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include
-fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -mapcs-32 -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
as: unrecognized option `-march=armv4'
make[1]: *** [hello_world.o] Error 2
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/examples'
make: *** [examples] Error 2
上面这个错误该如何修改呢? 在网上查了好多资料,目前还没发现有人出现类似的错误
上面是环境
下面是操作步骤:
[root@localhost share]# tar -xjvf u-boot-1.1.4.tar.bz2
[root@localhost share]# tar -xjvf arm-linux-gcc-3.3.2.tar.bz2
解压后,在/mnt/hgfs/share 目录有个,usr 目录,这个是 gcc3.3.2的连接工具
进入usr目录,把arm目录的内容 复制到/usr/local 下
[root@localhost share]# cd usr
[root@localhost usr]# ls
local
[root@localhost usr]# cd local
[root@localhost local]# ls
arm
[root@localhost local]# cp -r arm /usr/local/
并设置 PATH
[root@localhost share]# vi /etc/profile
在此文件加
pathmunge=/usr/local/arm/3.3.2/bin
再把/mnt/hgfs/share 目录 中的 u-boot-1.1.4
复制到/u-boot 里
[root@localhost share]# cp -r u-boot-1.1.4 /u-boot
[root@localhost share]#
进入 u-boot-1.1.4
先测试下,交叉工具 是否正确
[root@localhost u-boot-1.1.4]# arm-linux-gcc -v
Reading specs from /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --target=arm-linux --with-cpu=strongarm1100
--prefix=/usr/local/arm/3.3.2 i686-pc-linux-gnu --with-headers=/work/kernel.h3900/include --enable-
threads=pthreads --enable-shared --enable-static --enable-languages=c,c++
Thread model: posix
gcc version 3.3.2
然后make smdk2410_config
[root@localhost u-boot-1.1.4]# make smdk2410_config
Configuring for smdk2410 board...
这步没有问题
接着再 make 操作
[root@localhost u-boot-1.1.4]# make
make[1]: Entering directory `/u-boot/u-boot-1.1.4/tools'
ln -s ../common/environment.c environment.c
ln -s ../lib_generic/crc32.c crc32.c
gcc -M -Wall -pedantic -idirafter ../include -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC environment.c img2srec.c
mkimage.c crc32.c envcrc.c gen_eth_addr.c bmp_logo.c > .dependmake[1]: Leaving directory `/u-boot/u-boot-
1.1.4/tools'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/tools'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/tools'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/examples'
arm-linux-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -
DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -
isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -
mabi=apcs-gnu -Wall -Wstrict-prototypes hello_world.c stubs.c > .depend
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/examples'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/post'
arm-linux-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -
DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -
isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -
mabi=apcs-gnu -Wall -Wstrict-prototypes cache_8xx.S cache.c codec.c cpu.c dsp.c ether.c i2c.c memory.c
post.c rtc.c spr.c sysmon.c tests.c uart.c usb.c watchdog.c > .depend
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/post'
make[1]: Entering directory `/u-boot/u-boot-1.1.4/post/cpu'
arm-linux-gcc -M -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -
DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -
isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -
mabi=apcs-gnu -Wall -Wstrict-prototypes asm.S cmp.c cmpi.c two.c twox.c three.c threex.c threei.c andi.c
srawi.c rlwnm.c rlwinm.c rlwimi.c store.c load.c cr.c b.c multi.c string.c complex.c > .depend
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
cc1: error: invalid option `abi=apcs-gnu'
make[1]: *** [.depend] Error 1
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/post/cpu'
make: *** [depend] Error 2
[root@localhost u-boot-1.1.4]#
在网上查,修改 cpu/arm920t里的 config.mk
)将cpu/arm920t/config.mk中的PLATform_CPPFLAGS +=$( -mapcs-32,$(call cc-option,-mabi=apcs-gnu)改为PLATform_CPPFLAGS +=$(call cc-option,-mapcs-32,$(call cc-option,-mabi=apcs-gnu),)
再make
还是有问题,如下:
make -C examples all
make[1]: Entering directory `/u-boot/u-boot-1.1.4/examples'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -mshort-load-bytes -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/u-boot/u-boot-1.1.4/include
-fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -mapcs-32 -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
as: unrecognized option `-march=armv4'
make[1]: *** [hello_world.o] Error 2
make[1]: Leaving directory `/u-boot/u-boot-1.1.4/examples'
make: *** [examples] Error 2
上面这个错误该如何修改呢? 在网上查了好多资料,目前还没发现有人出现类似的错误
|
1.1.4的改成这样试试看
#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32)
#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32)
|
|
关注 接分