2013-02-13 13:59:02 +01:00
|
|
|
// -*- mode:doc; -*-
|
|
|
|
// vim: set syntax=asciidoc:
|
2012-11-11 04:14:42 +01:00
|
|
|
|
2012-11-11 04:14:46 +01:00
|
|
|
[[full-rebuild]]
|
|
|
|
Understanding when a full rebuild is necessary
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
A full rebuild is achieved by running:
|
|
|
|
|
|
|
|
---------------
|
|
|
|
$ make clean all
|
|
|
|
---------------
|
|
|
|
|
2012-11-16 05:54:19 +01:00
|
|
|
In some cases, a full rebuild is mandatory:
|
2012-11-11 04:14:46 +01:00
|
|
|
|
|
|
|
* each time the toolchain properties are changed, this includes:
|
|
|
|
|
2012-11-27 12:59:16 +01:00
|
|
|
** after changing any toolchain option under the _Toolchain_ menu (if
|
2012-11-11 04:14:46 +01:00
|
|
|
the internal Buildroot backend is used);
|
|
|
|
** after running +make ctng-menuconfig+ (if the crosstool-NG backend
|
|
|
|
is used);
|
|
|
|
** after running +make uclibc-menuconfig+.
|
|
|
|
|
|
|
|
* after removing some libraries from the package selection.
|
|
|
|
|
2012-11-16 05:54:19 +01:00
|
|
|
In some cases, a full rebuild is recommended:
|
2012-11-11 04:14:46 +01:00
|
|
|
|
|
|
|
* after adding some libraries to the package selection (otherwise,
|
2012-11-27 12:59:16 +01:00
|
|
|
packages that can be optionally linked against those libraries
|
2012-11-11 04:14:46 +01:00
|
|
|
won't be rebuilt, so they won't support those new available
|
|
|
|
features).
|
|
|
|
|
2012-11-16 05:54:19 +01:00
|
|
|
In other cases, it is up to you to decide if you should run a
|
2012-11-11 04:14:46 +01:00
|
|
|
full rebuild, but you should know what is impacted and understand what
|
|
|
|
you are doing anyway.
|
|
|
|
|
|
|
|
[[rebuild-pkg]]
|
2011-10-10 10:46:39 +02:00
|
|
|
Understanding how to rebuild packages
|
2012-11-11 04:14:42 +01:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2011-10-10 10:46:39 +02:00
|
|
|
|
|
|
|
One of the most common questions asked by Buildroot users is how to
|
|
|
|
rebuild a given package or how to remove a package without rebuilding
|
|
|
|
everything from scratch.
|
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
Removing a package is unsupported by Buildroot without
|
2011-10-10 10:46:39 +02:00
|
|
|
rebuilding from scratch. This is because Buildroot doesn't keep track
|
|
|
|
of which package installs what files in the +output/staging+ and
|
2012-11-27 12:59:17 +01:00
|
|
|
+output/target+ directories, or which package would be compiled differently
|
|
|
|
depending on the availability of another package.
|
2011-10-10 10:46:39 +02:00
|
|
|
|
|
|
|
The easiest way to rebuild a single package from scratch is to remove
|
|
|
|
its build directory in +output/build+. Buildroot will then re-extract,
|
2012-11-27 12:59:17 +01:00
|
|
|
re-configure, re-compile and re-install this package from scratch. You
|
|
|
|
can ask buildroot to do this with the +make <package>-dirclean+ command.
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
For convenience, the special make targets
|
|
|
|
<package>-reconfigure and <package>-rebuild repeat the configure
|
|
|
|
resp. build steps.
|
2012-04-06 18:44:22 +02:00
|
|
|
|
2011-10-10 10:46:39 +02:00
|
|
|
However, if you don't want to rebuild the package completely from
|
|
|
|
scratch, a better understanding of the Buildroot internals is
|
|
|
|
needed. Internally, to keep track of which steps have been done and
|
|
|
|
which steps remain to be done, Buildroot maintains stamp files (empty
|
2012-11-27 12:59:17 +01:00
|
|
|
files that just tell whether this or that action has been done):
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
* +output/build/<package>-<version>/.stamp_configured+. If removed,
|
2011-10-10 10:46:39 +02:00
|
|
|
Buildroot will trigger the recompilation of the package from the
|
|
|
|
configuration step (execution of +./configure+).
|
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
* +output/build/<package>-<version>/.stamp_built+. If removed,
|
2011-10-10 10:46:39 +02:00
|
|
|
Buildroot will trigger the recompilation of the package from the
|
|
|
|
compilation step (execution of +make+).
|
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
Note: toolchain packages use custom makefiles. Their stamp files are named
|
|
|
|
differently.
|
2012-11-11 04:14:54 +01:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
Further details about package special make targets are explained in
|
2012-11-11 04:14:54 +01:00
|
|
|
xref:pkg-build-steps[].
|