以下紅色是Shell操作, #是終端提示符一般不用手動(dòng)輸入 Ubuntu是最新版本V11 我的交叉編譯器下的文件列表: root@ubuntu:/usr/local/arm/4.3.2/bin# ls arm-linux-addr2linearm-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.2arm-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配置文件的時(shí)候 本文引用地址:http://m.butianyuan.cn/article/201611/319458.htm# 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之后編譯 仍然出錯(cuò): 末尾如下錯(cuò)誤 /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編譯使用的命令參數(shù)和論壇里最新版及操作手冊(cè)的命令參數(shù)不一樣。
最新版的命令操作是#make forlinx_nand_ram256_config
老版本是#make smdk6410_config
也希望以后論壇Relese的時(shí)候能將操作手冊(cè)和鏡像打包在一個(gè)壓縮包里
----------------------------------------------------------------------------------
另外,也可以通過如下命令將交叉編譯器中的所有的arm-none-linux-gnueabi-* 鏈接成arm-linux-*:
#ls-sarm-none-linux-gnueabi-gccarm-linux-gcc
將路徑加入到環(huán)境變量時(shí)也可以使用如下命令:
#PATH=/usr/local/arm/4.3.2/bin:$PATH
總結(jié):
1. 末尾如下錯(cuò)誤
/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
一般是編譯時(shí)編譯config文件的參數(shù)用錯(cuò)了,確定一下u-boot 是較早還是較新的,分別選擇#make smdk6410_config或#make forlinx_nand_ram256_config
2. 編譯時(shí)顯示如下錯(cuò)誤
顯示
/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...
將路徑加入到環(huán)境變量時(shí)也可以使用如下命令:
#PATH=/usr/local/arm/4.3.2/bin:$PATH
評(píng)論