After changing to the directory with the U-Boot source code you should
make sure that there are no build results from any previous
configurations left:
$ make distclean
The following (model) command configures U-Boot for the canyonlands board:
$ make canyonlands_config
And finally we can compile the tools and U-Boot itself:
$ make all
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 behaviour and build U-Boot to some external directory:
1. Add O= to the make command line invocations:
make O=/tmp/build distclean
make O=/tmp/build canyonlands_config
make O=/tmp/build all
Note that if the 'O=output/dir' option is used then it must be used
for all invocations of make.
2. Set environment variable
BUILD_DIR
to point to the desired
location:
export BUILD_DIR=/tmp/build
make distclean
make canyonlands_config
make all
Note that the command line "O=" setting overrides the
BUILD_DIR
environment variable.