以下红色是Shell操作, #是终端提示符一般不用手动输入 Ubuntu是最新版本V11 我的交叉编译器下的文件列表: root@ubuntu:/usr/local/arm/4.3.2/bin# ls arm-linux-addr2line arm-none-linux-gnueabi-addr2line arm-linux-ar arm-none-linux-gnueabi-ar arm-linux-as arm-none-linux-gnueabi-as arm-linux-c++ arm-none-linux-gnueabi-c++ arm-linux-c++filt arm-none-linux-gnueabi-c++filt arm-linux-cpp arm-none-linux-gnueabi-cpp arm-linux-g++ arm-none-linux-gnueabi-g++ arm-linux-gcc arm-none-linux-gnueabi-gcc arm-linux-gcc-4.3.2 arm-none-linux-gnueabi-gcc-4.3.2 arm-linux-gcov arm-none-linux-gnueabi-gcov arm-linux-gdb arm-none-linux-gnueabi-gdb arm-linux-gdbtui arm-none-linux-gnueabi-gdbtui arm-linux-gprof arm-none-linux-gnueabi-gprof arm-linux-ld arm-none-linux-gnueabi-ld arm-linux-nm arm-none-linux-gnueabi-nm arm-linux-objcopy arm-none-linux-gnueabi-objcopy arm-linux-objdump arm-none-linux-gnueabi-objdump arm-linux-ranlib arm-none-linux-gnueabi-ranlib arm-linux-readelf arm-none-linux-gnueabi-readelf arm-linux-size arm-none-linux-gnueabi-size arm-linux-sprite arm-none-linux-gnueabi-sprite arm-linux-strings arm-none-linux-gnueabi-strings arm-linux-strip arm-none-linux-gnueabi-strip
按照文档Make配置文件的时候
# make smdk6410_config
显示 /usr/local/arm/4.3.2/bin/arm-linux-gcc: line 3: exec: arm-none-linux-gnueabi-gcc: not found Configuring for smdk6410 board which boot from ...
而我将Makefeile文件中的路径改写: CROSS_COMPILE = /usr/local/arm/4.3.2/bin/arm-linux-改成CROSS_COMPILE = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi- 然后make clean之后编译 仍然出错: 末尾如下错误 /forlinx/uboot1.16/include/configs/smdk6410.h:347:2: error: #error RAM size must be defined /forlinx/uboot1.16/include/configs/smdk6410.h:522:3: error: #error Define one of CONFIG_BOOT_{NAND|MOVINAND|ONENAND|ONENAND_IROM} make[1]: *** No rule to make target `.depend', needed by `_depend'. Stop. make[1]: Leaving directory `/forlinx/uboot1.16/post/cpu' make: *** [depend] Error 2
|
后来在QQ群big_fish和砂锅米线的帮助下找到问题。原来是OK6410里自带光盘的u-boot编译使用的命令参数和论坛里最新版及操作手册的命令参数不一样。
最新版的命令操作是#make forlinx_nand_ram256_config
老版本是#make smdk6410_config
也希望以后论坛Relese的时候能将操作手册和镜像打包在一个压缩包里
----------------------------------------------------------------------------------
另外,也可以通过如下命令将交叉编译器中的所有的arm-none-linux-gnueabi-* 链接成arm-linux-*:
#ls -s arm-none-linux-gnueabi-gcc arm-linux-gcc
将路径加入到环境变量时也可以使用如下命令:
#PATH=/usr/local/arm/4.3.2/bin:$PATH
总结:
1. 末尾如下错误
/forlinx/uboot1.16/include/configs/smdk6410.h:347:2: error: #error RAM size must be defined
/forlinx/uboot1.16/include/configs/smdk6410.h:522:3: error: #error Define one of CONFIG_BOOT_{NAND|MOVINAND|ONENAND|ONENAND_IROM}
make[1]: *** No rule to make target `.depend', needed by `_depend'. Stop.
make[1]: Leaving directory `/forlinx/uboot1.16/post/cpu'
make: *** [depend] Error 2
一般是编译时编译config文件的参数用错了,确定一下u-boot 是较早还是较新的,分别选择#make smdk6410_config或#make forlinx_nand_ram256_config
2. 编译时显示如下错误
显示
/usr/local/arm/4.3.2/bin/arm-linux-gcc: line 3: exec: arm-none-linux-gnueabi-gcc: not found
Configuring for smdk6410 board which boot from ...
将路径加入到环境变量时也可以使用如下命令:
#PATH=/usr/local/arm/4.3.2/bin:$PATH