平台beaglebone black
系统:ubuntu14.04LTS
操作:我先加载交叉编译工具进来
source /home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/environment-setup
然后 arm-linux-gnueabihf-gcc -v 有信息输出(版本为gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02))那么我就认为交叉编译工具链安装好了
我echo $PATH
[linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd> echo $PATH
/home/jipolun/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin:/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/qt5:/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
说明交叉编译工具链已经加入到环境变量中去了
然后我按http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide 文章里说的
make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=boneblack_out am335x_evm_defconfig
于是就出现如下错误
[linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd> make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=boneblack_out am335x_evm_defconfig
make[1]: Entering directory '/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/boneblack_out'
HOSTCC scripts/basic/fixdep
In file included from /home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/netinet/in.h:22:0,
from /home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/arpa/inet.h:22,
from ../scripts/basic/fixdep.c:116:
/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/stdint.h:148:0: warning: "__INT64_C" redefined [enabled by default]
# define __INT64_C(c) c ## LL
^
<built-in>:0:0: note: this is the location of the previous definition
In file included from /home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/netinet/in.h:22:0,
from /home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/arpa/inet.h:22,
from ../scripts/basic/fixdep.c:116:
/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/stdint.h:149:0: warning: "__UINT64_C" redefined [enabled by default]
# define __UINT64_C(c) c ## ULL
^
<built-in>:0:0: note: this is the location of the previous definition
fixdep: error fstat'ing depfile: scripts/basic/.fixdep.d: Invalid argument
scripts/Makefile.host:94: recipe for target 'scripts/basic/fixdep' failed
make[2]: *** [scripts/basic/fixdep] Error 2
/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/Makefile:397: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
make[1]: Leaving directory '/home/jipolun/ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/boneblack_out'
Makefile:150: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
google了半天,我找到解决办法,board-support里面的uboot我第一次编译,代码还没有去改过。希望大家能帮忙解决一下这个问题。谢谢
user4632301:
回复 Steven Liu1:
喔,理解了。原来是我设置的交叉编译工具链的路径有问题。谢谢