sprainsc0 发表于 2015-3-25 09:58:04

求助,u-boot编译问题

编译器按照手册安装的,输入arm-linux-gcc -v有如下显示:
root@ubuntu:/# arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2008q3-72' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)
root@ubuntu:/#
***************************************************************************************************
配置make forlinx_nand_ram256_config后make出现如下错误:
make -C examples all
make: Entering directory `/forlinx/uboot1.1.6/examples'
/usr/local/arm/4.3.2/bin/arm-linux-gcc -g-Os   -fno-strict-aliasing-fno-common -ffixed-r8 -msoft-float-D__KERNEL__ -DTEXT_BASE=0xCFE00000-I/forlinx/uboot1.1.6/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe-DCONFIG_ARM -D__ARM__ -march=armv5t -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
In file included from hello_world.c:24:
/forlinx/uboot1.1.6/include/common.h:571: error: expected declaration specifiers or '...' before 'va_list'
/forlinx/uboot1.1.6/include/common.h:601: error: expected declaration specifiers or '...' before 'va_list'
In file included from hello_world.c:25:
/forlinx/uboot1.1.6/include/exports.h:21: error: expected declaration specifiers or '...' before 'va_list'
make: *** Error 1
make: Leaving directory `/forlinx/uboot1.1.6/examples'
make: *** Error 2
root@ubuntu:/forlinx/uboot1.1.6#
求助,这是什么问题。内核源码是:uboot1.1.6-2012-09-25.tar.gz

sprainsc0 发表于 2015-3-25 10:06:22

使用论坛下的最新的u-boot源码:uboot1.1.6-V5.50-2014-09-19.tar.gz
还是有这个错误:
make -C examples all
make: Entering directory `/forlinx/uboot1.1.6/examples'
/usr/local/arm/4.3.2/bin/arm-linux-gcc -g-Os   -fno-strict-aliasing-fno-common -ffixed-r8 -msoft-float-D__KERNEL__ -DTEXT_BASE=0xCFE00000-I/forlinx/uboot1.1.6/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe-DCONFIG_ARM -D__ARM__ -march=armv5t -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
In file included from hello_world.c:24:
/forlinx/uboot1.1.6/include/common.h:571: error: expected declaration specifiers or '...' before 'va_list'
/forlinx/uboot1.1.6/include/common.h:601: error: expected declaration specifiers or '...' before 'va_list'
In file included from hello_world.c:25:
/forlinx/uboot1.1.6/include/exports.h:21: error: expected declaration specifiers or '...' before 'va_list'
make: *** Error 1
make: Leaving directory `/forlinx/uboot1.1.6/examples'
make: *** Error 2
root@ubuntu:/forlinx/uboot1.1.6#
是不是交叉编译器有问题,还是缺了什么包,环境为Ubuntu12.04 32位。
环境变量 /etc/profile和 /root/.bashrc都配置了。
输入 echo $PATH
/usr/local/arm/4.3.2/bin:/usr/local/arm/4.3.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

sprainsc0 发表于 2015-3-26 09:51:24

问题解决了,编译器版本太低,换高一点的就好了。
页: [1]
查看完整版本: 求助,u-boot编译问题