u-boot默认的编译方式将编译过程中产生的文件与源码混合存放,这样看起来比较混乱。
可以通过以下两种方式来编译以解决这个问题。
By default the build is performed locally and the objects are saved
in the source directory. One of the two methods can be used to change
this behavior and build U-Boot to some external directory:
cd u-boot
mkdir tmp_build
1. Add O= to the make command line invocations:
make O=tmp_build distclean
make O=tmp_build NAME_config
make O=tmp_build all
2. Set environment variable BUILD_DIR to point to the desired location:
export BUILD_DIR=tmp_build
make distclean
make NAME_config
make all
Note that the command line "O=" setting overrides the BUILD_DIR environment
variable.