Specifications

5.2. Unpacking the Source Code
If you use GIT to get a copy of the U-Boot sources, here an example how you get the sources with git:
Note: Included topic DULGData_m28.UBootGetSource does not exist yet
If you used GIT to get a copy of the U-Boot sources, then you can skip this next step since you already have
an unpacked directory tree. If you downloaded a compressed tarball from the DENX FTP server, you can
unpack it as follows:
$ cd /opt/eldk/usr/src
$ wget ftp://ftp.denx.de/pub/u-boot/2012.07.tar.bz2
$ rm -f u-boot
$ bunzip2 < 2012.07.tar.bz2 | tar xf -
$ ln -s 2012.07 u-boot
$ cd u-boot
5.3. Configuration
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 m28 board:
$ make m28_config
[marex@pollux]$
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 m28_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 m28_config
make all
Note that the command line "O=" setting overrides the BUILD_DIR environment variable.
5.3. Configuration 37