以下紅色是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
原來是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
將路徑加入到環境變量時也可以使用如下命令:相關閱讀:U-Boot源代碼下載地址 http://www.linuxidc.com/Linux/2011-07/38897.htm