嵌入式爱好者

查看: 13363|回复: 2

[Linux] 求助,u-boot编译问题

[复制链接]

1

主题

3

帖子

6

积分

扫一扫,手机访问本帖
发表于 2015-3-25 09:58:04 | 显示全部楼层 |阅读模式
编译器按照手册安装的,输入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[1]: 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[1]: *** [hello_world.o] Error 1
make[1]: Leaving directory `/forlinx/uboot1.1.6/examples'
make: *** [examples] Error 2
root@ubuntu:/forlinx/uboot1.1.6#
求助,这是什么问题。内核源码是:uboot1.1.6-2012-09-25.tar.gz
回复

使用道具 举报

1

主题

3

帖子

6

积分

 楼主| 发表于 2015-3-25 10:06:22 | 显示全部楼层
使用论坛下的最新的u-boot源码:uboot1.1.6-V5.50-2014-09-19.tar.gz
还是有这个错误:
make -C examples all
make[1]: 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[1]: *** [hello_world.o] Error 1
make[1]: Leaving directory `/forlinx/uboot1.1.6/examples'
make: *** [examples] 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
点评回复 支持 反对

使用道具 举报

1

主题

3

帖子

6

积分

 楼主| 发表于 2015-3-26 09:51:24 | 显示全部楼层
问题解决了,编译器版本太低,换高一点的就好了。
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2025-4-20 06:51

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表