韦东山Linux嵌入式课程社区
直播中

杜云

7年用户 307经验值
私信 关注

为什么u-boot编译会不通过

for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: Entering directory '/home/nwh/jz2440/u-boot-1.1.6/tools'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/home/nwh/jz2440/u-boot-1.1.6/tools'
make[1]: Entering directory '/home/nwh/jz2440/u-boot-1.1.6/examples'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/home/nwh/jz2440/u-boot-1.1.6/examples'
make[1]: Entering directory '/home/nwh/jz2440/u-boot-1.1.6/post'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/home/nwh/jz2440/u-boot-1.1.6/post'
make[1]: Entering directory '/home/nwh/jz2440/u-boot-1.1.6/post/cpu'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/home/nwh/jz2440/u-boot-1.1.6/post/cpu'
make -C tools all
make[1]: Entering directory '/home/nwh/jz2440/u-boot-1.1.6/tools'
gcc -g -Wall -pedantic -idirafter /home/nwh/jz2440/u-boot-1.1.6/include -idirafter /home/nwh/jz2440/u-boot-1.1.6/include2 -idirafter /home/nwh/jz2440/u-boot-1.1.6/include -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -O -c -o envcrc.o envcrc.c
gcc -g  -idirafter /home/nwh/jz2440/u-boot-1.1.6/include -idirafter /home/nwh/jz2440/u-boot-1.1.6/include2 -idirafter /home/nwh/jz2440/u-boot-1.1.6/include -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -c -o environment.o environment.c
gcc -Wall -pedantic -idirafter /home/nwh/jz2440/u-boot-1.1.6/include -idirafter /home/nwh/jz2440/u-boot-1.1.6/include2 -idirafter /home/nwh/jz2440/u-boot-1.1.6/include -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -O -o envcrc envcrc.o crc32.o environment.o
make[1]: Leaving directory '/home/nwh/jz2440/u-boot-1.1.6/tools'
make -C examples all
make[1]: Entering directory '/home/nwh/jz2440/u-boot-1.1.6/examples'
make[1]: *** No rule to make target '/usr/local/ARM/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include/stdarg.h', needed by 'hello_world.o'。 停止。
make[1]: Leaving directory '/home/nwh/jz2440/u-boot-1.1.6/examples'
Makefile:279: recipe for target 'examples' failed
make: *** [examples] Error 2

回帖(7)

徐婷婷

2019-7-26 07:24:43
请更换 3.4.5 版本的编译器
举报

姚秋月

2019-7-26 07:42:28
~/jz2440/u-boot-1.1.6$ arm-linux-gcc -v
Reading specs from /usr/local/arm/3.4.5/bin/../lib/gcc/arm-linux/3.4.5/specs
Configured with: /work/tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/work/tools/gcc-3.4.5-glibc-2.3.6 --with-float=soft --with-headers=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include --with-local-prefix=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.5
用的就是3.4.5啊
举报

贾乐

2019-7-26 07:53:37
编译uboot请使用我们的虚拟机和补丁源码文件,然后操作步骤不要忽略,
使用补丁修改、编译u-boot:
《嵌入式 Linux 应用开发完全手册》上使用的是 u-boot 1.1.6,但是它不支持 NAND
Flash 启动、不支持 USB 下载。 /wok/system 目录下的 u-boot 添加了这两项功能。
u-boot-1.1.6.tar.bz2 是未经修改的源码, u-boot-1.1.6_jz2440.patch 是补丁文件。 对代码
的修改可以从补丁文件中看出来。
执行以下操作即可编译出 u-boot.bin:
$ tar xjf u-boot-1.1.6.tar.bz2
$ cd u-boot-1.1.6
$ patch -p1 < ../u-boot-1.1.6_jz2440.patch
$ make 100ask24x0_config
$ make
使用 oflash 软件把 u-boot.bin 烧到 Nand Flash 去,即可启动它。
举报

李青

2019-7-26 07:58:53
你用的是4.3.2:
make[1]: *** No rule to make target '/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include/stdarg.h', needed by
举报

更多回帖

发帖
×
20
完善资料,
赚取积分