2012-11-11 04:14:42 +01:00
|
|
|
// -*- mode:doc; -*-
|
2013-02-13 13:59:02 +01:00
|
|
|
// vim: set syntax=asciidoc:
|
2012-11-11 04:14:42 +01:00
|
|
|
|
|
|
|
Daily use
|
|
|
|
---------
|
|
|
|
|
|
|
|
include::rebuilding-packages.txt[]
|
2012-11-11 04:14:44 +01:00
|
|
|
|
|
|
|
Offline builds
|
|
|
|
~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
If you intend to do an offline build and just want to download
|
|
|
|
all sources that you previously selected in the configurator
|
|
|
|
('menuconfig', 'xconfig' or 'gconfig'), then issue:
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make source
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
You can now disconnect or copy the content of your +dl+
|
|
|
|
directory to the build-host.
|
|
|
|
|
|
|
|
Building out-of-tree
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
As default, everything built by Buildroot is stored in the directory
|
2012-11-16 05:54:19 +01:00
|
|
|
+output+ in the Buildroot tree.
|
2012-11-11 04:14:44 +01:00
|
|
|
|
|
|
|
Buildroot also supports building out of tree with a syntax similar to
|
|
|
|
the Linux kernel. To use it, add +O=<directory>+ to the make command
|
|
|
|
line:
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make O=/tmp/build
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Or:
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ cd /tmp/build; make O=$PWD -C path/to/buildroot
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
All the output files will be located under +/tmp/build+.
|
|
|
|
|
|
|
|
When using out-of-tree builds, the Buildroot +.config+ and temporary
|
|
|
|
files are also stored in the output directory. This means that you can
|
|
|
|
safely run multiple builds in parallel using the same source tree as
|
|
|
|
long as they use unique output directories.
|
|
|
|
|
|
|
|
For ease of use, Buildroot generates a Makefile wrapper in the output
|
2012-11-27 12:59:16 +01:00
|
|
|
directory - so after the first run, you no longer need to pass +O=..+
|
2012-11-11 04:14:44 +01:00
|
|
|
and +-C ..+, simply run (in the output directory):
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make <target>
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
[[env-vars]]
|
|
|
|
|
|
|
|
Environment variables
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Buildroot also honors some environment variables, when they are passed
|
|
|
|
to +make+ or set in the environment:
|
|
|
|
|
|
|
|
* +HOSTCXX+, the host C++ compiler to use
|
|
|
|
* +HOSTCC+, the host C compiler to use
|
|
|
|
* +UCLIBC_CONFIG_FILE=<path/to/.config>+, path to
|
|
|
|
the uClibc configuration file, used to compile uClibc, if an
|
|
|
|
internal toolchain is being built.
|
|
|
|
+
|
|
|
|
Note that the uClibc configuration file can also be set from the
|
2012-11-27 12:59:16 +01:00
|
|
|
configuration interface, so through the Buildroot +.config+ file; this
|
2012-11-16 05:54:19 +01:00
|
|
|
is the recommended way of setting it.
|
2012-11-11 04:14:44 +01:00
|
|
|
+
|
|
|
|
* +BUSYBOX_CONFIG_FILE=<path/to/.config>+, path to
|
|
|
|
the Busybox configuration file.
|
|
|
|
+
|
|
|
|
Note that the Busybox configuration file can also be set from the
|
2012-11-27 12:59:16 +01:00
|
|
|
configuration interface, so through the Buildroot +.config+ file; this
|
2012-11-16 05:54:19 +01:00
|
|
|
is the recommended way of setting it.
|
2012-11-11 04:14:44 +01:00
|
|
|
+
|
|
|
|
* +BUILDROOT_DL_DIR+ to override the directory in which
|
|
|
|
Buildroot stores/retrieves downloaded files
|
|
|
|
+
|
|
|
|
Note that the Buildroot download directory can also be set from the
|
2012-11-27 12:59:16 +01:00
|
|
|
configuration interface, so through the Buildroot +.config+ file; this
|
2012-11-16 05:54:19 +01:00
|
|
|
is the recommended way of setting it.
|
2012-11-11 04:14:44 +01:00
|
|
|
|
|
|
|
An example that uses config files located in the toplevel directory and
|
|
|
|
in your $HOME:
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make UCLIBC_CONFIG_FILE=uClibc.config BUSYBOX_CONFIG_FILE=$HOME/bb.config
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
If you want to use a compiler other than the default +gcc+
|
|
|
|
or +g+++ for building helper-binaries on your host, then do
|
|
|
|
|
|
|
|
--------------------
|
|
|
|
$ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD
|
|
|
|
--------------------
|