$(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE contains include files.
*.bs & .packlist files come with perl or perl/cpan packages.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Kids nowaday seem to prefer a left-to-right drawing rather than the
more conventional and historical top-down drawing.
Rather than multiply the number of environment variables, just add
a single one where the user can pass arbitrary dot options, such as:
make BR2_GRAPH_DOT_OPTS=-Grankdir=LR graph-depends
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The correct capitalised form appears to be "BusyBox" rather than "Busybox";
fix all references to the latter form. (Most such references occur in the
manual and in commentary in package makefiles.)
Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This enables powerpc64 and powerpc64le. Currently, le needs at least
glibc 2.19 and gcc 4.9.0. For gdb, 7.7.1 works (added in an earlier
patch).
[Peter: also disallow gcc 4.8 for ppc64le]
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This patch adds support for powerpc64le-linux-gnu. This includes
needed patches to fakeroot and gmp.
gmp patch is from upstream HG tree.
fakeroot patch is from Ubuntu written by Adam Conrad.
Signed-off-by: Jeff Bailey <jeffbailey@google.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The file external.mk was included before fs/common.mk, so it was impossible
to add rootfs targets using the BR2_EXTERNAL mechanism.
This change moves the inclusion of fs/common.mk before external.mk to allow
this.
Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
[ThomasDS: rebased, update commit message]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
There will soon be new options to the graph-depends script, which we
can only sanely pass via environment variables.
Currently, we use such an environment variable to pass the maximum depth
of the dependency graph; the name of that variable is explicit that it
contains just the depth.
However, there has been so far no release of Buildroot which would make
use of that variable, so no user should have come to rely on it.
Rename that variable so it is less specific, and more generic, so it can
be used to pass more options to graph-depends.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The target-finalize target does a large number of actions (removing
unnecessary files, stripping objects, etc.) but does not have a header. This
makes it seem that all these actions are done as part of the last action
before target-finalize, for example:
>>> makedevs undefined Installing to target
To make a clear distinction, add a message to the beginning of
target-finalize:
>>> Finalizing target directory
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The "target-purgelocales" target must be executed after all the other
targets and before the "target-finalize" target, so create a
TARGET_PURGE_LOCALES variable containing the commands of the target
"target-purgelocales" and add it at the beginning of the
"target-finalize" target.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
If a kernel module is installed with incorrect permissions (0755 iso 0644),
it would get stripped in a way that would render the kernel module broken.
While the incorrect permissions are a developer error, it is a minor change
to prevent this mistake from causing incorrectly stripped modules.
This was reported with bug #6992:
https://bugs.busybox.net/show_bug.cgi?id=6992
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Because the "show-targets" target print the targets that will be built,
print also their dependencies.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
As stated in the buildroot user manual add just a single space before
and after a '=' sign.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The target depends on the toolchain so add it as a dependency.
This also fix the support to top-level parallel make.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The "toolchain-eclipse-register" target needs the toolchain so add
toolchain as a dependency.
This also fix the support to top-level parallel make.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, graph-depends (and PKG-graph-depends) do not store the
intermediate 'dot' program.
Some users would like to get the dot program to be able to further
customise the generated graphs (eg. modify the layout, colorise some
of the packages...)
So, store the intermediate dot program alongside the generated graph.
Reported-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This variable contains extra environment variables that we can not export
since they are clashing with some build systems (eg. BUILD_DIR with
u-boot).
So, we may need these variables for uses other than the user's hooks
for instrumentation. For example, we'll use them later on to export
BUILD_DIR to the download helper scripts.
Fix comment, too.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The usual way to enable a package using the package infrastructure is to
use a config option so instead to add the toolchain package to the
TARGETS variable in the Makefile add a config option like all the other
toolchain packages.
[Thomas: remove comment that no longer made sense in the main
Makefile, and add a comment above the new hidden Config.in option to
explain what it is useful for.]
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Extend BR_PATH because a few host-packages install programs in this
location.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since the HOST_PATH and TARGET_PATH variables almost contain the same
things, let's factorize this in a single BR_PATH.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, the complete dependency chain of a package is used to
generate the dependency graph. When this dependency chain is long,
the generated graph becomes almost unreadable.
However, it is often sufficient to get the first few levels of
dependency of a package.
Add a new variable BR2_GRAPH_DEPTH, that the user can set to limit
the depth of the dependency list.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Variables should be prefixed with BR_ when they are not user-facing.
As a side effect, the new variable is prettier than the previous one. :-)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
After adding support top-level parallel make the rootfs-* dependencies
were not anymore considered for the "source" and "legal-info" targets
because the rootfs-* targets were removed from TARGETS variable and
placed in the TARGETS_ROOTFS variable so to fix the issue use use both
"TARGETS" and "TARGETS_ROOTFS" variables.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Vincent Stehlé <vincent.stehle@freescale.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The package infrastructure add automatically the "dirs" dependency so
remove it when the package infrastructure is being used.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Buildroot toolchain creates big endian binaries instead of little endian
ones for microblaze architecture. The reason is wrong BR2_ARCH string.
KERNEL_ARCH must contain microblaze in both cases.
Signed-off-by: Jan Drazil <xdrazi00@stud.fit.vutbr.cz>
Signed-off-by: Jan Viktorin <xvikto03@stud.fit.vutbr.cz>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Since the migration of the toolchains to the generic package
infrastructure, it is no longer used.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Because now the toolchain dependency is automatically added by the
package infrastructure the BASE_TARGETS variable is useless so just
remove it.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The parallel build patch series has significantly reworked how some of
the core dependencies are expressed. We now have the following
dependencies:
all: world
world: target-post-image
target-post-image: $(TARGETS_ROOTFS)
with TARGETS_ROOTFS containing the list of root filesystem image
targets, each having the following dependencies:
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
The bottom line is that the "target-finalize" target, which in turns
ensures that all packages are built, is only triggered if at least one
filesystem image is enabled.
As we want to support builds with no filesystem image selected, this
is not acceptable. As a fix, we change the target-post-image target
to:
target-post-image: $(TARGETS_ROOTFS) target-finalize
This way, target-finalize will be triggered even if TARGETS_ROOTFS is
empty. This is still correct for parallel build, as the individual
root filesystem image targets still depend on target-finalize.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Rename the GRAPH_OUT and GRAPH_ALT variables according to our
recently-agreed naming scheme for user-facing variables:
- GRAPH_OUT -> BR2_GRAPH_OUT
- GRAPH_ALT -> BR2_GRAPH_ALT
The documentation part of the rename is handled by Thomas as
part of his manual fixing spree. ;-)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Using a relative path for BR2_EXTERNAL, and using an external defconfig,
such as in (from a Buildroot top-dir):
make O=.. BR2_EXTERNAL=.. foo_defconfig
is broken. It is unclear why the %_defconfig rule recurses in that case.
This patch internaly makes BR2_EXTERNAL canonical (ie. makes it an absolute
path), and checks the directory exists.
[Peter: s/relatively/relative/ as suggested by Thomas]
Reported-by: Jérémy Rosen <jeremy.rosen@openwide.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Romain Naour <romain.naour@openwide.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fix a bug introduced by the commit a24877586a
(Makefile: add support for top-level parallel make).
That commit put a new rule inside the target-finalize rule so it was
erroneously splitted in two parts.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The main Buildroot Makefile was removing *.py or *.pyc if Python 2 was
enabled, but for Python 3, this action was taken care of by a post
install target hook of python3.mk, which means it wouldn't work with
external modules (the .py/.pyc removal would be done before external
Python modules are installed).
We fix this by making the global *.py/*.pyc removal in the main
Makefile work for both Python 2 and Python 3.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
After the latest patches top-level parallel Makefile is working but
there is still an issue when a package has an unspecified optional
dependency so change the comment to explain that.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
To be able to use top-level parallel make we must not depend in a rule
on the order of evaluation of the prerequisites, so instead of relyng on
the left to right ordering of evaluation of the prerequisites add an
explicit rule to describe the dependencies.
Add explicit rules to describe the following dependency chain:
$(TARGETS) -> target-finalize -> rootfs-* -> target-post-image
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit makes the dependency from the target toolchain explicit.
This way we can buid from command line a package that use
inner-generic-package right after the configuration phase, example:
make clean <package-name>
Also remove TARGETS_ALL because the only purpose was to add toolchain
dependency so it's superseded by this commit.
To prevent circular dependency add the new variable
<pkgname>_ADD_TOOLCHAIN_DEPENDENCY to avoid adding the toolchain
dependency for toolchain packages.
This is also a step forward supporting top-level parallel make.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
As the e-mail address buildroot@buildroot.org is now enabled, update the
e-mail addresses in the source tree from @uclibc.org and @busybox.net to our
own proper domain.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
To make the naming consistent (all user-visible options should be
prefixed with BR2_).
An entry is added to Makefile.legacy to warn users who have set
BUILDROOT_CONFIG but not BR2_CONFIG.
Still export BUILDROOT_CONFIG but pointing to some phony value, to
make sure that scripts that still use it fail in a predictable way.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Jérémy Rosen <jeremy.rosen@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
To make the naming consistent (all user-visible options should be
prefixed BR2_).
An entry is added to Makefile.legacy to warn users who have set
BUILDROOT_DL_DIR but not BR2_DL_DIR.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This patch removes deprecated symbol BR2_HAVE_DOCUMENTATION and all its
usage. Additionally, it removes the now unused BR2_DEPRECATED_SINCE_2012_11.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
To make the naming consistent (qstripped variant of a config option
should be named BR_XXX).
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Our current stripping strategy requires that shared libraries have the
executable permission. However, this is by far not something
recognized as a standard behavior: Debian/Ubuntu distributions for
example do not have executable permissions on their
libraries. Therefore, pushing to upstream packages fixes that add the
executable permissions is not easy.
As a result, this commit improves the stripping logic so that it not
only strips the files that are executable, but also the ones that
match '*.so*', which should match both the shared libraries and the
dlopen()'able plugins, as long as they have a .so extension.
Thanks to this addition, a number of manual "chmod +x" done by various
packages can be removed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
If two files with the same relative paths exist in multiple overlay
skeletons, and they have the same modification time and size, then rsync
might not copy the later file on top of the earlier file. This patch fixes
this by adding the -I option to the rsync commands used in the overlay
skeleton file installations. ("man rsync" indicates that this option turns
off the file-size/mod-date "quick check" behavior, causing all files to be
updated - more like the cp commands that we had originally.)
[Peter: use --ignore-times to make it obvious what the option does]
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Some packages install locales to /usr/lib/locale.
Parse and purge unneeded ones there too.
Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
If the Buildroot tree is read-only, then $(TARGET_DIR_WARNING_FILE) is
copied read-only into target/ but we may want to remove it during the
build process.
This poses no real problem, since target/ itself is guaranteed to be
writable, but for good measure, force $(TARGET_DIR_WARNING_FILE) to be
writable itself.
Reported-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
If the source target skeleton is read-only (eg. because Buildroot's
source dir is), modifications to the output target (such as creating
/etc/hostname and /etc/issue) fail.
(This can happen if the Buildroot source dir is NFS-mounted read-only
to be shared between different machines, for example).
Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998@free.fr: we use rsync now, not cp; --chmod=Du+w
suggested by Arnout; clarify commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
GNU tar > 1.13.17 interprets TAR_OPTIONS as an environment variable
containing options to be prepended to the set on the command line.
Since we use the same variable, if the user's environment already
contains TAR_OPTIONS, our use of the same variable name modifies
the environment and causes untars to misbehave when TAR_OPTIONS
causes a -xf to be prepended to the tar command line, likely
converting a subsequent flag into a spurious filename.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This reverts commit 94dd02f5d0.
The change breaks defconfigs from BR2_EXTERNAL, both for in-tree and
out-of-tree builds.
Besides, the problem reported in 94dd02f could not be reproduced.
I can read French, and I suspect a relative path was used for either
BR2_EXTERNAL or O.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jérémy Rosen <jeremy.rosen@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
PDF files can not be easily embedded in other documents (eg. ODT, or HTML).
Add support for generating PNG graphs, by setting the GRAPH_OUT=pdf|png on
the command line:
make GRAPH_OUT=png graph-build graph-depends
The default is still to generate PDF graphs.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Generate the graph of the complete dependency tree by calling:
make graph-depends
It's also possible to generate the graph-depends for a single package:
make PKG-graph-depends
The graphs are generated in $(O)/graphs/
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Generate the build-time graphs by calling:
make graph-build
This generates the graphs in $(O)/graphs/
It is possible to use the alternate color-scheme by setting the variable
GRAPH_ALT=1 on the command line:
make GRAPH_ALT=1 graph-build
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, we do not include .config for all '%_defconfig' targets, but
we forgot to also exclude plain 'defconfig'.
Reported-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The source-check / external-deps make targets ends up calling recursively
into buildroot's Makefile, causing make to display a warning:
make[2]: warning: -jN forced in submake: disabling jobserver mode.
We don't support toplevel parallel make, so get rid of the warning using
MAKE1 instead.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit allows the user to store defconfigs in
$BR2_EXTERNAL/configs/. To achieve this:
* It adds a new %_defconfig that looks in $BR2_EXTERNAL/configs/ for
the corresponding defconfig file.
* Updates the help target to also list external defconfigs.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Tested-by: "Samuel Martin" <s.martin49@gmail.com>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit allows the BR2_EXTERNAL directory to contain Config.in and
Makefile code, which gets integrated into the Buildroot build logic:
- Buildroot automatically includes the $BR2_EXTERNAL/Config.in in the
top-level configuration menu.
- Buildroot automatically includes the BR2_EXTERNAL/external.mk in
the build logic, so it can for example be used to include other .mk
files that define package recipes.
This is typically intended to be used to create target packages in the
BR2_EXTERNAL directory, but can also be used for bootloaders, host
packages, or other custom make logic.
We also add a dummy Config.in file in support/dummy-external/ to
ensure that the source "$BR2_EXTERNAL/Config.in" line will point to an
existing file even when BR2_EXTERNAL is not used by the user.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Tested-by: "Samuel Martin" <s.martin49@gmail.com>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit introduces the BR2_EXTERNAL environment variable, which
will allow to keep Buildroot customization (board-specific
configuration files or root filesystem overlays, package Config.in and
makefiles, as well as defconfigs) outside of the Buildroot tree.
This commit only introduces the variable itself, and ensures that it
is available within Config.in options. This allows us to use
$BR2_EXTERNAL in a 'source' statement in Config.in.
Following patches extend the usage of BR2_EXTERNAL to other areas
(packages and defconfigs).
In details, this commit:
* Introduces the BR2_EXTERNAL Kconfig option. This option has no
prompt, and is therefore not visible to the user and also not
stored in the .config file. It is automatically set to the value of
the BR2_EXTERNAL environment variable. The only purpose of this
BR2_EXTERNAL Kconfig option is to allow $BR2_EXTERNAL to be
properly expanded when used inside Kconfig source statements.
* Calculates the BR2_EXTERNAL value to use. If passed on the command
line, then this value is taken in priority, and saved to a
.br-external hidden file in the output directory. If not passed on
the command line, then we read the .br-external file from the
output directory. This allows the user to not pass the BR2_EXTERNAL
value at each make invocation. If no BR2_EXTERNAL value is passed,
we define it to support/dummy-external, so that the kconfig code
finds an existing $(BR2_EXTERNAL)/package/Config.in file to
include.
* Passes the BR2_EXTERNAL into the *config environment, so that its
value is found when parsing/evaluating Config.in files and .config
values.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Tested-by: "Samuel Martin" <s.martin49@gmail.com>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit adds the OBJCOPY and RANLIB variables to
HOST_CONFIGURE_OPTS, since grub legacy will need these defined in
order to build properly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Also export BUILD_DIR for post-{build,images} hooks, so they do have
a place to store generated files.
Note: this will be more einteresting for the instrumentation of steps,
to come in a later patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Buildroot has three places where rsync is used:
1. to copy the target skeleton
2. to copy the rootfs overlay(s)
3. to copy overridden package sources
In all of these cases, we want to exclude version control files by default.
Place 1 and 2 used an identical set of explicit --exclude options, while
place 3 used the option --cvs-exclude. This last option, however, not only
excludes version control files, but also binary files (.o, .so) and any file
or directory named 'core' (a problem for the linux kernel that has several
directories with this name). Moreover, the exact list of excluded files when
using --cvs-exclude depends on the version of rsync.
This patch creates one global variable RSYNC_VCS_EXCLUSIONS that can be used
by the various rsync commands. It excludes the version control files of
svn, git, hg, cvs and bzr.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
When calling 'tr' without quoting braces, bash can make really weird things
if there are existing 'single-letter-named' directories
eg:
thierry@thierry-desktop:~$ echo AAA | tr [A-Z] [a-z]
aaa
thierry@thierry-desktop:~$ mkdir m
thierry@thierry-desktop:~$ echo AAA | tr [A-Z] [a-z]
AAA
The (quick) analysis is that the callee (tr) argvs then
contain 'm' thus the translation does not work
Using quotes works around it:
thierry@thierry-desktop:~$ echo AAA | tr '[A-Z]' '[a-z]'
aaa
Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The output extension and the generation messages refer to 'text', but the make
target was confusingly 'txt'. This patch changes the make target for
consistency.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
$(BUILD_DIR) is a nice place to put files generated during the build.
With the advent of user-supplied step-hooks, they may want to store
some information on the build.
Export BUILD_DIR to that effect; update manual accordingly.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit introduces a virtual package called 'toolchain', located
in 'toolchain/toolchain', which simply depends on
'toolchain-buildroot' or 'toolchain-external' depending on the
selected toolchain backend.
For now, toolchain-buildroot and toolchain-external are still manual
make targets, but the following patches convert those backends to use
the package infrastructure as well.
In addition to this:
* The main Makefile is modified to always make BASE_TARGETS point to
this new toolchain virtual package.
* The main Makefile is changed to include all the toolchain/*/*.mk
files: the toolchain virtual package, and the toolchain-buildroot
and toolchain-external directories.
* The dependency of the toolchain on prepare dirs and dependencies is
moved to the toolchain virtual package. It is moved as a
prerequisite of the "toolchain-source" rule to ensure that all
directories are prepared before we even start extracting the
toolchain.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
In order to avoid the work of converting the toolchain-crosstool-ng
logic to the package infrastructure, we remove it from Buildroot,
since it has been deprecated since quite some time.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The 'make clean' recipe is using variables that are not defined without
.config file, causing only a partial cleanup when the .config file is
accidentally deleted.
This patch moves those variables that do not depend on values from .config
outside the BR2_HAVE_DOT_CONFIG check, so that 'make clean' is much more
similar with and without .config.
Since HOST_DIR is determined from BR2_HOST_DIR in .config, the host
directory cannot be cleaned correctly without making assumptions, if no
.config is present. However, to cover most people's use cases, we assume
the default value of $(BASE_DIR)/host in this specific case.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Since STAGING_DIR is defined as (package/Makefile.in):
STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
STAGING_DIR = $(HOST_DIR)/$(STAGING_SUBDIR)
removing HOST_DIR will automatically remove STAGING_DIR. This patch updates
'make clean' based on this knowledge.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The 'make help' lines for generating the manual did not consider ePub
correctly. Instead of providing a limitative list for 'make manual', the
text is changed into 'all formats'.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The -s option is only mandatory for the charmap,
else the filename is always empty and nothing
is generated.
Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The $(BUILD_DIR)/.root rule is executed as part of the 'dirs'
target. The 'dirs' target is re-executed at every execution of 'make
external-deps', and make external-deps explicitly tells make to ignore
targets that have already been made (through the -B option). This
means that the $(BUILD_DIR)/.root rule has to be idempotant, which was
not the case this the introduction of the lib32/lib64 symbolic link.
Running 'make external-deps' three times in a row was sufficient to
trigger an error due to symbolic links being incorrectly created. This
patch fixes that.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Similar to how we do it for _PATH / _SYSROOT_DIR. Buildroot gets fairly
confused if the user has set up a custom PKG_CONFIG_LIBDIR, so ensure
it gets unset.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Make 3.82 no longer sort the result of wildcards (see
http://comments.gmane.org/gmane.comp.gnu.make.bugs/4260). This may break
build reproducibility.
This patch sort results of wildcards to ensure reproducibility.
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
In the past there may have been a very good reason to refer to 'buildroot2', but
these days it's just odd.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
libpthread.so has a special stripping condition to preserve parts of
it that are needed for debugging. However, due to the usage of 'xargs'
instead of 'xargs -r', the strip command is executed regardless of
whether a libpthread.so file is found or not. This leads to a big
error message being displayed in static-only builds, because strip is
executed without a file argument. Thanks to the '|| true', the build
continues, but still shows a big error message in the middle, which is
not nice.
By using 'xargs -r', we avoid the strip command from being executed
when 'find' doesn't find any match. We also remove the '|| true' to
catch other real errors.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Always link lib64 or lib32 to lib
* Only copy the architecture's lib directory to staging
* Also cleanup a couple of mkdirs (concerning some 'lib' directories).
Before this patch:
$ ls -ld host/usr/x86_64-buildroot-linux-gnu/sysroot/{,usr/}lib* target/{usr/,}lib*
drwxr-xr-x 2 samuel users 4.0K Aug 12 22:26 host/usr/x86_64-buildroot-linux-gnu/sysroot/lib/
drwxr-xr-x 2 samuel users 4.0K Aug 12 22:27 host/usr/x86_64-buildroot-linux-gnu/sysroot/lib64/
drwxr-xr-x 5 samuel users 4.0K Oct 30 2012 host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/
drwxr-xr-x 5 samuel users 4.0K Aug 12 22:27 host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib64/
drwxr-xr-x 3 samuel users 4.0K Oct 30 2012 host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/libexec/
drwxr-xr-x 2 samuel users 4.0K Aug 12 22:27 target/lib/
lrwxrwxrwx 1 samuel users 3 Aug 12 22:27 target/lib64 -> lib/
drwxr-xr-x 2 samuel users 4.0K Aug 12 22:27 target/usr/lib/
lrwxrwxrwx 1 samuel users 3 Aug 12 22:27 target/usr/lib64 -> lib/
$ find . -type l -xtype l # find broken symlinks
find: `./host/usr/x86_64-buildroot-linux-gnu/sysroot/lib64/lib': Too many levels of symbolic links
find: `./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib64/lib': Too many levels of symbolic links
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_files.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_nis.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_compat.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_nisplus.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libutil.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libthread_db.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libcidn.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libcrypt.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libm.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_hesiod.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnsl.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/librt.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_db.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libanl.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libBrokenLocale.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libnss_dns.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libresolv.so
./host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libdl.so
./target/etc/resolv.conf
./target/dev/log
After this patch:
$ ls -ld host/usr/x86_64-buildroot-linux-gnu/sysroot/{,usr/}lib* target/{usr/,}lib*
drwxr-xr-x 2 samuel users 4.0K Oct 30 2012 host/usr/x86_64-buildroot-linux-gnu/sysroot/lib/
lrwxrwxrwx 1 samuel users 5 Aug 12 22:36 host/usr/x86_64-buildroot-linux-gnu/sysroot/lib64 -> lib/
drwxr-xr-x 5 samuel users 4.0K Oct 30 2012 host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/
lrwxrwxrwx 1 samuel users 5 Aug 12 22:36 host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib64 -> lib/
drwxr-xr-x 3 samuel users 4.0K Oct 30 2012 host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/libexec/
drwxr-xr-x 2 samuel users 4.0K Aug 12 22:36 target/lib/
lrwxrwxrwx 1 samuel users 3 Aug 12 22:36 target/lib64 -> lib/
drwxr-xr-x 2 samuel users 4.0K Aug 12 22:36 target/usr/lib/
lrwxrwxrwx 1 samuel users 3 Aug 12 22:36 target/usr/lib64 -> lib/
$ find . -type l -xtype l # find broken symlinks
./target/etc/resolv.conf
./target/dev/log
Fixes http://autobuild.buildroot.net/results/23fb6b1479d2b5906b72c9437b06ab4700ff246d/
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Commit fde2605765 (Makefile: test before search for kernel modules)
changed the way we strip kernel modules, but it fails when modules aren't
available (as test -d returns with a non zero exit code).
Fix it by including the test -d call in a proper shell conditional.
Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The 'find $(TARGET_DIR)/lib/modules' used to find and strip kernel
modules fails when no kernel modules have been installed. While the
'|| true' prevents the entire build from failing, there are still some
error messages displayed, which is not nice.
Instead, test if the directory exists before doing the find. We also
remove the '|| true' in order to really abort the build if a
problematic error occurs.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
'cut' needs to be invoked with the -s option to make sure it doesn't
print anything when the delimiter isn't found. This is particularly
important for the charmap detection, because UTF-8 is appended if
the charmap is empty. But without -s, it will never be empty.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch moves the host-ccache build target from BASE_TARGETS in Makefile
to an actual host prerequisite in support/dependencies. This causes
host-ccache to be built as part of the dependencies, before any real package
is built.
Since the dependencies are built without ccache anyway, there is no need to
set HOST_CCACHE_CONF_ENV anymore.
Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Add a new goal that dumps all of our variables.
Taken from http://www.cmcrossroads.com/ask-mr-make/6521-dumping-every-makefile-variable
Signed-off-by: Emeric Vigier <emeric.vigier@savoirfairelinux.com>
[yann.morin.1998@free.fr: drop per-variable print; refresh patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The -perm +mode is deprecated, and sometimes yields suprising results.
It can be confused with permission in symbolic mode, for example '+u+g',
as POSIX spec suggests.
Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
On Gentoo systems with ruby installed RUBYOPT is set and causes build
breakage for some packages that needs host-ruby (example: webkit).
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
It can be useful to have different configuration use the same post-build
and/or post-image scripts as they share a common infrastructure, but yet
have minor differentiation.
This option allows passing zero or more additional arguments to each
post-build or post-image script.
The same set of extra arguments are passed to all scripts, it is not
possible to pass different arguments to each script.
[Peter: fix help text, post-image gets called with the images dir]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Currently, when we need to do a conditional on the type of C library
used, we need to take into account the three toolchain backends. As we
are going to add eglibc support to the Buildroot toolchain backend, it
would become even uglier, so this patch introduces two new hidden
options: BR2_TOOLCHAIN_USES_UCLIBC and BR2_TOOLCHAIN_USES_GLIBC, that
exist regardless of the toolchain backend. The entire Buildroot code
base is converted to use those options.
Note that we have intentionally created only one option
(BR2_TOOLCHAIN_USES_GLIBC) for both glibc and eglibc, since they are
essentially the same, as far as Buildroot is concerned.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This finally removes the BR2_HAVE_DEVFILES option, that was used to
install/keep development files on target. With the recent migration of
the internal backend to the package infrastructure, we had anyway lost
the ability to build gcc for the target, and install the uClibc
development files on the target.
[Peter: also remove support/scripts/copy.sh]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Instead of using the 'uclibc' target for all toolchain backends,
introduce more sensible target names for the external toolchain and
Crosstool-NG toolchain backend make targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The $(O)/toolchain directory, also called $(TOOLCHAIN_DIR) is no
longer needed, as all packages are now built in $(O)/build/, including
gcc and uClibc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Commit 14f48861 ("arc: Add ARC and ARC BE architecture") introduced a
sed match against arc* buildroot architecture to translate it to arc.
This causes a problem with armv8, which is called in buildroot aarch64,
which is also matching, resulting in a build failure.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Also make sure that older kernels are not selected for ARC.
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Initially, a "cp" was used for the one-time target skeleton
installation, and an "rsync" was used for the every-time overlay
skeleton installations. Then, the target skeleton install was
changed to also use rsync (1cd3f992fb).
Now there are two rsyncs, but with different filter specs, which
seems odd.
This patch adds --excludes to both invocations of rsync to make them
consistent, and removes the -u option from the initial target skeleton
installation.
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makes the code uniform with the post-build and post-image implementation
(which is slightly simpler and, presumably, more efficient).
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This also simplifies code by removing the ifneq/endif clauses.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This also simplifies code by removing the ifneq/endif clauses.
[Peter: drop extra space]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
olddefconfig is a new target available in kconfig that allows to take
an old .config file, and update it to the latest version of the code,
without being asked for questions: it automatically assumes the
default value for options whose value was not defined.
It for example allows to take a minimal defconfig, copy it as .config,
and do 'make olddefconfig' to get the full .config.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
We already use the .root stamp file to remember if we have copied the
skeleton, so we can remove the /bin check.
Likewise, we should always have a TARGET_SKELETON (or explicitly error
out otherwise), so remove that check as well.
Finally, now that we're using rsync to do the copy, we might as well
use its exclude support instead of cleaning up unwanted files afterwards.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
An example is .init_enable_core, to enable coredumps in busybox
Signed-off-by: Tilman Keskinöz <arved@arved.at>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The ncurses build can become polluted by the user's TERMINFO
environment variable, causing the user's ~/.terminfo to be modified
and preventing the install from succeeding:
/bin/sh ./run_tic.sh
** Building terminfo database, please wait...
Running tic to install /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/emacs/24.0.97/etc/ ...
You may see messages regarding extended capabilities, e.g., AX.
These are extended terminal capabilities which are compiled
using
tic -x
If you have ncurses 4.2 applications, you should read the INSTALL
document, and install the terminfo without the -x option.
1562 entries written to /home/nathanl/.terminfo
** built new /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/emacs/24.0.97/etc/
installing std
installing stdcrt
installing vt100
installing vt300
make[2]: Leaving directory `/home/nathanl/devel/buildroot.git/output/build/ncurses-5.7/misc'
make[1]: Leaving directory `/home/nathanl/devel/buildroot.git/output/build/ncurses-5.7'
for i in $(find /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/lib* -name "*.la"); do cp -f $i $i~; /usr/bin/sed -i -e "s:\(['= ]\)/usr:\\1/home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr:g" $i; done
>>> ncurses 5.7 Installing to target
mkdir -p /home/nathanl/devel/buildroot.git/output/target/usr/lib
cp -dpf /home/nathanl/devel/buildroot.git/output/build/ncurses-5.7/lib/libncurses.so* /home/nathanl/devel/buildroot.git/output/target/usr/lib/
ln -snf /usr/share/terminfo /home/nathanl/devel/buildroot.git/output/target/usr/lib/terminfo
mkdir -p /home/nathanl/devel/buildroot.git/output/target/usr/share/terminfo/x
cp -dpf /home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/terminfo/x/xterm /home/nathanl/devel/buildroot.git/output/target/usr/share/terminfo/x
cp: cannot stat `/home/nathanl/devel/buildroot.git/output/host/usr/i686-unknown-linux-gnu/sysroot/usr/share/terminfo/x/xterm': No such file or directory
make: *** [/home/nathanl/devel/buildroot.git/output/build/ncurses-5.7/.stamp_target_installed] Error 1
So unexport TERMINFO in the top-level Makefile.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This makes it possible to put empty directories in the overlay.
Thanks to Aras Vaichas for pointing that out.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Just like we have a post-build script mechanism that gets executed
after the build of all packages but before the creation of the
filesystem images, let's introduce a post-image script mechanism, that
gets executed once all filesystem images have been generated.
This can for example be used to call a tool building a firmware image
from different images generated by Buildroot, or automatically extract
the tarball root filesystem image into some location exported by NFS,
or any other custom action.
[Peter: fix image script check]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Store BR2_DEFCONFIG in .config, and use it to update the original input
defconfig file after updating the configuration. When a config is
created by using the BR2_DEFCONFIG=... option, this is saved in the
.config file; later runs of savedefconfig will update that same location.
It is also possible to configure this place in the interactive
configuration.
The BR2_DEFCONFIG value itself is not saved into the generated
defconfig, since Kconfig considers it at its default. This is
intentional, to avoid hard-coding an absolute path in the defconfig.
It will anyway be set again when the defconfig is used with the
'make BR2_DEFCONFIG=... defconfig' command.
As a side-effect of this change, the *config options have been moved out
of the BR2_HAVE_DOT_CONFIG condition. This doesn't make any functional
difference, because the .config is still not read for the *config targets.
However, the defconfig and savedefconfig targets do need to include
.config now, which makes them slightly slower.
[Peter: slightly tweak help text]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The filesystem overlay is a tree that is copied over the target fs
after building everything - which is currently usually done in the
post-build script.
[Peter: don't ignore missing directories]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
- Use a more descriptive name, the same of the "toolchain" directory.
- Add missing dependencies to be able to successfully use the target
right after the configuration.
- Move to a better position.
- Documentation it in the help target.
- Use toolchain target in the world target
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Reviewed-by: Markos Chandras <markos.chandras at imgtec.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Acked-by: Samuel Martin <s.martin49 at gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The Eclipse plugin at
https://github.com/mbats/eclipse-buildroot-toolchain-plugin allows
users of Eclipse to easily use the toolchain available in
Buildroot. To do so, this plugin reads
~/.buildroot-eclipse.toolchains, which contains the list of Buildroot
toolchains available on the system, and then offer those toolchains to
compile Eclipse projects.
In order to interface with this plugin, this commit adds an option
that allows the user to tell whether (s)he wants the Buildroot project
toolchain to be visible under this Eclipse plugin. It simply adds a
line in this ~/.buildroot-eclipse.toolchains file.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Several projects use the kernel style O=<dir> syntax to build out of tree,
and atleast uClibc doesn't check that it was explictly passed on the command
line, so setting it in the environment breaks the build.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Support scripts (in support/) may need to parse the .config file, so give
them an easy access to it, by exporting BUILDROOT_CONFIG with the fully-
qualified path to .config.
Also, post-build scripts may need to reference a few locations, so export
those, too.
Note: we export both O and BASE_DIR. Although they are the same, BASE_DIR
is used internally, while O is used on the command line, which makes it a
bit ambiguous to know which to use. As users use O= on the command line,
they will probably tend to use that in their post-build scripts.
Update doc accordingly.
[Peter: fixed typo]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
If this is not done then pkg-config can get confused.
Thomas and Arnout really deserve the credit for this - I just did
the testing.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The legacy BR2_PACKAGE_* options in Config.in.legacy are not supposed to
be user selectable, so {rand,allyes}packageconfig shouldn't enable them.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Strip libthread_db the same as any other library, but strip libpthread
with --strip-debug. See the relevant mailing list discussion [1] for
additional details.
[1] http://lists.busybox.net/pipermail/buildroot/2012-October/060126.html
Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
As discussed in the BR developer days, we want to be more strict about API
changes in buildroot. I.e., we want to make it less likely that a user's
customizations break down after upgrading buildroot.
A first step is to make sure that the user is warned about API changes.
This patch introduces Makefile.legacy and Config.in.legacy, which will
issue clear error messages for such situations.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Using severals post build scripts is usefull to share
script between severals boards/projects.
[Peter: fix trailing spaces in Config.in]
Signed-off-by: Philippe Reynes <philippe.reynes@sagemcom.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
A very common mistake done by our users is that they use
output/target/ directory as their root filesystem. Even though this is
loudly documented in our Buildroot manual, people don't read
documentation, so it is not sufficient.
This patch adds a text file named
output/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM which explains why
output/target isn't appropriate to use as the root filesystem. The
process is:
* At the beginning of the build, right after the skeleton has been
copied, support/misc/target-dir-warning.txt is copied to
output/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
* In the filesystem images creation code, this file is removed before
launching fakeroot, and restored right after that, so that this
file is not present in the generated root filesystem images.
Note that the file has not been added to the default skeleton for two
reasons:
* It would have annoying to have in our source tree a file named in
capital letters inside system/skeleton/
* The proposed way works even if the user uses a custom skeleton.
[Peter: fixed typo]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Juha Lumme <juha.lumme@gmail.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This directory groups the following elements:
* the default root filesystem skeleton
* the default device tables
* the Config.in options for system configuration (UART port for
getty, system hostname, etc.)
* the make rules to apply the system configuration options
Even though the skeleton and device tables could have lived in fs/, it
would have been strange to have the UART, system hostname and other
related options into fs/. A new system/ directory makes more sense.
As a consequence, this patch also removes target/Makefile.in, which
has become useless in the process.
[Peter: fixup TARGET_SKELETON settings / documentation to match]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The architecture tuple is 'aarch64', but the kernel people decided to
call it 'arm64', so we have to do some mungling to get the kernel
architecture name from the Buildroot architecture name.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The pkgconfig files are located in /usr/lib/pkgconfig
and /usr/share/pkgconfig directories.
However, only /usr/lib/pkgconfig is removed when no
development files are needed in the target filesystem.
Remove pkgconfig directory from $(TARGET_DIR)/usr/share
as well if BR2_HAVE_DEVFILES is not set.
Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
As stated in commit 555c2585bf, the
Xtensa architecture has been introduced in 2009 and never changed
since its initial introduction. It requires some special handling that
is a bit annoying, and despite our call to the initial developers, and
the announcement of the deprecation of the architecture during the
2012.05, nothing has happened. Therefore, drop support for this
architecture.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: me
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Building QT might fail if QMAKESPEC is defined.
Signed-off-by: Stephan Hoffmann <sho@relinux.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This will allow to install binary package only if they are supported by the
host. As example Atmel SAM-BA (x86 only).
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This allows to automatically collect material that may be needed to comply with
the license of packages that Buildroot prepares for the target device.
The core of the implementation is made by the following parts:
- in package/pkg-utils.mk some helper functions are defined for common actions
such as generating a warning, producing info about a package etc;
- in package/pkg-gentargets.mk, within the GENTARGETS framework, a new
<PKG>-legal-info target produces all the info for a given package;
- Makefile implements the top-level targets:
- legal-info-prepare creates the output directory and produces legal info
about Buildroot itself and the toolchain, which mostly means just warning
the user that this is not implemented;
- legal-info, the only target that is supposed to be used directly, depends
on all of the above and finishes things by producing the README files from
the various pieces.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Having DESTDIR defined will confuse the build of certain packages, so
we ensure that it is undefined from the environment when Buildroot
starts.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
If PKG_CONFIG_PATH is set in the environment, it allows pkg-config to
look for libraries outside of the buildroot tree. This is a problem
both for host and target builds. To avoid it, globally set an empty
PKG_CONFIG_PATH in the environment.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The original 'source-check' target first selects all packages, and then checks
whether the package tarballs can be found. This is useful for Buildroot
maintainers, but less useful for developers working on a specific project. The
latter only care about the packages used in that project.
This patch removes the allyesconfig dependency to source-check so that only
selected packages are checked. The original behavior is moved to a new target
'source-check-all'.
[Peter: removed source-check-all, people can just make allyesconfig before]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Sometimes it may be desirable to keep debug symbols for some binaries and
libraries on the target. This commit introduces the config option
BR2_STRIP_EXCLUDE_FILES, which is interpreted as a list of such binaries
and libraries, and the option BR2_STRIP_EXCLUDE_DIRS, which indicates
directories excluded from stripping entirely.
These exclusions are passed to the find command in the target-finalize step.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The existing ccache infrastructure sets the cache directory hardcoded in the
ccache binary. As this directory was set to ~/.buildroot-ccache, the cache
is not necessarily local (e.g. in corporate environments the home directories
may be mounted over NFS.)
Previous versions of buildroot did allow to set the cache directory, but this
was also hardcoded (so you had to rebuild ccache to change it), plus that
support was removed.
See http://lists.busybox.net/pipermail/buildroot/2011-July/044511.html for
a discussion on this.
This patch modifies ccache to respect a new shell variable (exported from
the Makefile, based on a configuration option) instead of CCACHE_DIR.
The name CCACHE_DIR itself is already used by autotargets for the ccache
package.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
In order to use locale support on a Linux system, you need locale data
to be present:
* on a (e)glibc based system, this data is typically in the
/usr/lib/locale/locale-archive file, which can be created and
extended using the localedef program
* on an uClibc based system, the set of supported locales is defined
at build time by an uClibc configuration option.
This patch implements generating locale data for the following cases:
* Internal toolchain
* External toolchain based on (e)glibc. uClibc external toolchains
are not supported, because with uClibc, the set of supported
locales is defined at build time. CodeSourcery and Linaro
toolchains have been tested, Crosstool-NG toolchains are believed
to work properly as well.
* Toolchains built using the Crosstool-NG backend, but only (e)glibc
toolchains.
This feature was runtime tested with internal uClibc toolchain,
CodeSourcery ARM toolchain and Linaro ARM toolchain, thanks to a
simple C program that shows the data and a gettext translated message.
Note that this option differs from the "purge locales" option, which
is responsible for removing translation files and other locale stuff
installed by packages. At some point in the future, we may want to
clarify the respective roles of those options.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
So that this works:
% make defconfig BR2_DEFCONFIG=~/buildroot-defconfig
Right now we have to do:
% cp ~/buildroot-defconfig configs/buildroot_defconfig
% make buildroot_defconfig
That would dirty the buildroot tree and requires it to be writable.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Re-integrate in gcc-uclibc-4.x.mk things from
toolchain/gcc/Makefile.in that were completely gcc-specific. There was
no reason to pull that when building with other backends than the
internal one.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This also requires moving a few include directives below the "all:"
target in the main Makefile, otherwise the new target to create the
toolchain file in pkg-cmaketargets.mk gets used as the default make
target instead of "all:".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
There used to be a mechanism using which packages could leave a
.fakeroot.<something> file which could contain commands to be executed
within the fakeroot environment. Since this mechanism is no longer
used by any package, remove it from the common infrastructure.
The latest user was nfs-utils, which used this mechanism to do the
"make install" as root, since doing otherwise was not supported. But
since 16e7b8255c, nfs-utils has been
upgraded and converted to the package infrastructure, and this hack is
no longer necessary. Another past user was the ltp-testsuite package,
for the same reason, and since
a72a670489, the fakeroot hack is no
longer needed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The only variable that is used is HOST_LOADLIBES, defined for the
cygwin case in the kconfig build. Since we don't support cygwin,
simply get rid of this.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Since these two special make targets are very useful but not yet
mentioned in the documentation I added them to the make help and
the manual.
Signed-off-by: Stephan Hoffmann <sho@reLinux.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
It's convenient to have a target to print the buildroot version, for use
in external scripts calling buildroot.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
/etc/os-release is becoming a standard interface for distribution
name/version info, so let's use that instead of the nonstandard
/etc/br-version. Format of the file is something like:
NAME=Buildroot
VERSION=2012.02-rc1-00003-g2d10e81
ID=buildroot
VERSION_ID=2012.02-rc1
PRETTY_NAME="Buildroot 2012.02-rc1"
For more details, see:
http://0pointer.de/public/systemd-man/os-release.html
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
If during the dependencies step, a package needs to be downloaded, the
download directory already has to be present. If not, the file will be
downloaded under the name 'dl' instead of in the directory 'dl'.
This patch changes the order of dirs and dependencies in the world target to
fix this.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Although support/dependencies/dependencies.sh checks for the version of make,
this script doesn't get a chance to run if make encounters a syntax error as a
result of being too old.
For example, the following syntax is only supported from make 3.81 onwards:
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
include toolchain/toolchain-buildroot.mk
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
include toolchain/toolchain-external.mk
else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
include toolchain/toolchain-crosstool-ng.mk
endif
This patch adds a check for the version of make very early in the Makefile, so
that old make versions are handled gracefully.
[Peter: simplify check]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
As suggested by Arnout Vandecappelle, move toolchain/dependencies to
support/dependencies, as it really is not toolchain-specific anymore.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Fixes lib/lib64 issue when building on OpenSUSE.
Reported-by: Guillaume Gardet <guillaume.gardet@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Also add a clean target, give absolute path to a2x, add a dependency
on the output file, and add to .PHONY.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Peter: build in docs/manual/<format>, fix clean targets]
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Special thanks for Yann E. Morin for giving input and suggestions to
implement this.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
[Peter: skip double mention of manual target in make help]
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The user can now create a custom local override file to override the
source directory for various packages.
An example override file:
ZLIB_OVERRIDE_SRCDIR = /tmp/zlib
STRACE_OVERRIDE_SRCDIR = /opt/strace-4.5.20
would tell Buildroot to use the zlib and strace source code from the
specified directories, instead of download, extracting and patching
the code has done usually by Buildroot.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The CONFIG_UPDATE macro is no longer defined in
package/gnuconfig/gnuconfig.mk, but instead in
package/Makefile.autotools.in. It it also changed a little bit to take
the directory of the package sources as argument, and the AUTOTARGETS
infrastructure is updated to use this macro.
[Peter: drop echo in CONFIG_UPDATE]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
[Peter: only activate if barebox is enabled, fix deps]
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
In the following command flow:
make distclean
make <board>_defconfig
make source
the dl directory would normally be created by the first wget download. If there are no such downloads, e.g. because you use a local download mirror (e.g. scp, file) or only use git/svn/hg/bzr repositories, the dl directory is not created automatically. This causes e.g. the 'pushd' command in the respective _DOWNLOAD commands to fail.
This patch adds a dependency to the 'dirs' target to 'source', fixing this scenario.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Closes#3985
The wildcard function in make 3.82 no longer sorts the output, so
add an explicit sort so the defconfigs are listed in a sensible order.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
'source-check' breaks because the *_DEFCONFIG options are empty strings.
There is an explicit check to avoid erroring-out when doing 'source', but
not when doing 'source-check'.
This patch set DL_MODE right from the first sub-make call.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Allan W. Nielsen <a@awn.dk>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Now that we use a wrapper for external toolchains (and internal ones
default to the correct setting), we no longer need to explicitly pass
sysroot/march/mtune/mabi/floating point mode in TARGET_CFLAGS.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Add a simple toolchain wrapper for external toolchains, which forces the
correct sysroot/march/mtune/floating point options needed to use it
with buildroot.
With this in place the external toolchain behaves similar to the internal
ones, and the special handling can be removed. This also means that the
toolchain is usable outside buildroot without having to pass any special
compiler flags.
Also adjust the downloadable external toolchain support to install under
HOST_DIR so it can be used after the temporary build files are removed.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
busybox and linux26 no longer have a -config target, and prepatch only makes
sense for a very specific configuration (BR toolchain with GDB enabled).
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
When ccache support is enabled and 'make silentoldconfig' is being
started from the following rule:
$(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config
$(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
then, the Makefile in package/config inherits from HOSTCC/HOSTCXX
values with the ccache prefix. However, if we start from a cleaned
build (after make clean), ccache is not compiled yet, so things break.
To solve this, we pass a noccache variant of HOSTCC/HOSTCXX down to
the package/config Makefile.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The current code accidentally sets up HOSTCC_NOCCACHE and HOSTCXX_NOCCACHE
only when the respective HOSTCC or HOSTCXX values are not set. So if you
do something like:
make HOSTCC=gcc menuconfig
The build fails because HOSTCC_NOCCACHE is not set anywhere.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
TARGET_SKELETON_PATCH is no longer in use, so remove it.
Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
[Peter: don't allow MMU on bfin]
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Allow the user to define HOST_DIR in the config menu.
This way when building an internal toolchain a separate (maybe shared)
output directory may be defined and the toolchain can be used by
multiple users and/or projects.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
A CMake toolchain-file makes it easy to develop CMake-based packages
outside of Buildroot. Just give the toolchain-file to CMake via the
-DCMAKE_TOOLCHAIN_FILE=... option.
Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Make an output/staging -> sysroot symlink just for compatibility
purposes.
This may be gone in the future so don't count on it, use $(STAGING_DIR)
instead.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Convert binutils to a proper autotargets package
* Add version 2.21 and drop version 2.17
* Hook up packaged binutils for target gcc
* Build tools are on HOST_DIR now so change it
* Move cross/host gcc to HOST_DIR
* Drop kludge from commit 3c77bab2ee
This is fixed in the next commit "gcc: install copies of libgcc,
libstdc++ and libgcj to the sysroot" - tested for arm & x86_64
targets.
* TARGET_CROSS now pointed to HOST_DIR too
[Peter: Config.in tweaks]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Reset them early in top-level Makefile to ensure they're keept unset
all the way through the build process.
This also removes the requirement of these variables being unset
globally prior the build.
Signed-off-by: Daniel Nyström <daniel.nystrom@timeterminal.se>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Drop the BR2_STAGING_DIR option
* Hardcode STAGING_DIR to $(HOST_DIR)/usr/TUPLE/sysroot
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Instead of letting the user define all the details of his external
toolchain, we define a set of profiles for well-known external
toolchains (CodeSourcery ones only at the moment, can easily be
extended with other toolchains).
Once a profile has been choosen, the user is offered the choice of
either letting Buildroot download and install the external toolchain,
or (as before) to tell Buildroot where the toolchain is installed on
the system.
We of course provide a "custom profile", through which the user can
configure Buildroot to use a custom external toolchain for which no
profile is available.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* ccache is now a normal package (both for the host and the target).
* ccache option is now part of the "Build options" menu. It will
automatically build ccache for the host before building anything,
and will use it to cache builds for both host compilations and
target compilations.
* bump ccache to 3.1.3
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
When sstrip is selected it tries to strip kernel modules too.
Unfortunately this fails with a "unrecognized program segment header
size" error thus interrupting the build process.
We introduce a new $(KSTRIPCMD) strip command for this, being a regular
strip when sstrip is selected and an empty stub when not stripping.
At the same time get rid of the REMOVE_SECTION_* variables, as they are
only used once.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Certain toolchain configs (E.G. on blackfin), don't use symlinks, so the
file name to match is the actual SONAME (.so.*). Support these toolchains
as well.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Fix previous commit not to strip libthread_db library. In the previous
commit the wildcard was incorrectly matching the symbolic link instead
of the real library file.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
For proper threading debug support, the libthread_db.so library cannot
be stripped on the target. This is because the target gdbserver will
also load up this library at runtime and poke around its symbols.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Often times, the only reason /usr/share exists is because of documentation
installed into it. So once we're done cleaning the docs, attempt to rmdir
/usr/share. If it's empty, things will work out nicely.
[Peter: use make infrastructure to ignore errors rather than shell]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The installed kernel modules should have useless build cruft stripped out
of them. On my system, a default build went from a very unreasonable 30MB
to a normal 3MB (on disk) and from 14MB to 3MB when compressed due to the
info stored in the kernel modules alone.
[Peter: don't hardcode binutils strip specific options]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Ensure host packages (dependencies of target packages) are also handled
by make source / make external-deps.
This has to be done a explicitly, as we don't list these in Kconfig,
and hence also not in a variable like TARGETS, so instead we have to
look at the <PKG>_DEPENDENCIES variables for each enabled package and
extract the host packages from there.
Host packages can in turn also have dependencies, so we have to follow
those as well. Ideally this should be done recursively, but as that's
pretty hard to do in make, it is limited to 1 level for now.
Finally, host packages share source files with target packages, so
pipe output of make external-deps through sort -u to ensure duplicates
are removed.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Closes#2731
Bootloader and Linux kernel steps can add content to the rootfs, so ensure
the cleanup / postprocess steps are moved after those.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The configuration cache shared between packages, while being in
principle a nice idea to speed-up the configuration of packages by
avoiding repetitive identical checks, turned out to be unreliable due
to the subtle differences between similar but not identical checks in
different packages. After spending some time trying to fix those, we
concluded that supporting the shared configuration cache is definitely
too hard and too unreliable, and that we'd better get rid of it
altogether.
This patch therefore removes the shared configuration cache
infrastructure and usage.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
It seems that target-specific variables don't mix with target rules.
Thanks to Yann for helping debugging the issue.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Some packages use the buildroot version string (to set their own version
string). Computing the version string globally will makes it easy for
them to use it instead of re-computing it in every packages.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This re-instates writing the version string in .config headers, and no
longer provides it as a kconfig symbol in .config (it is now a variable
in the Makefile, and in the environment).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Move it down, users should not mess with it.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Default HOST_CFLAGS to -O2, so host tools (like the cross compiler) are
built with optimization by default.
Based on a patch by Will Newton <will.newton@gmail.com>.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Closes#2707
It's not only for kernel headers, and the kernel headers .mk file
isn't included for crosstool-ng toolchain, which broke linux/u-boot/..
builds.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
And all the infrastructure surrounding it. A broken sed implementation
is quite rare nowadays, as seen by the fact that the current host-sed
support has been broken for a while, so just get rid of it.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The top-level Makefile can be executed in parallel, as it causes problems.
We can force make to be not parallel.
It's been reported many times, and recent discussions on IRC with kos_tom,
and user nick-named knee, led to this patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
If building out-of-tree, add a Makefile wrapper that calls-out to the real
Makefile with proper args.
Avoids having to pass -C and O= every time we call make.
This is highly inspired from how the Linux kernel does it, and portions of
it have been used. We can't use exactly the same implementation as the
kernel does, because:
- the script writing the wrapper has been expunged of the few lines
that were too kernel-related: in buildroot we do not need the version
string in the wrapper, and we do not have a patchlevel version;
- "in-tree build" does not have the same meaning for the kernel and for
buildroot: for the kernel, $(O) point to the $(TOPDIR), while for
buildroot $(O) points to $(TOPDIR)/output.
For more complete explanations, see:
http://lists.busybox.net/pipermail/buildroot/2010-September/037815.html
[Peter: minor tweaks]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The new DL_MODE variable dispatches between the various download
implementations of each method (Git, Subversion, Wget) to deal with the
normal download (default mode, 'DOWNLOAD'), the source-check
('SOURCE_CHECK') and to show the external dependencies for external-deps
('SHOW_EXTERNAL_DEPS').
For the latter, the legacy script wget-show-external-deps.sh is no
longer required as $(WGET) isn't called directly anymore but always
through the DOWNLOAD helper.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
It's not really necessary to differenciate the commands for checking out
or updating a repository. Only the path to the binary and eventual
top-level flags are useful to configure.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
In preparation for the re-work of the DOWNLOAD helper to support
multiple download methods and protocols, the spider feature used with
wget is removed for now until it is re-implemented on top of the new
download methods.
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The previous commit has removed calls to conf_write_autoconf(), which
is the function that generates the KCONFIG_AUTOCONF,
KCONFIG_AUTOHEADER, KCONFIG_TRISTATE files and the split config (with
one file per config item). Therefore, those things were not generated
anymore before the build.
In order to get them generated before the build, we use the same
mechanism as the kernel: run a silentoldconfig when the .config file
is newer than the KCONFIG_AUTOCONF file.
In Buildroot, all those elements are not really used today, except the
split config which is used a little bit in the toolchain build, in a
try to make sure the toolchain gets rebuilt properly when the
configuration changes. It does not seem that this work has been
completed.
However, as we want to keep the same behaviour as previously, we have
to generate all those elements before starting the build.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
savedefconfig allows to create a minimal defconfig file from an
existing configuration. For example :
make O=/path/to/some/buildroot/build/directory savedefconfig
will generate a minimal 'defconfig' file in the main Buildroot source
directory.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Instead of duplicating the definition of KCONFIG_AUTOCONFIG,
KCONFIG_AUTOHEADER and BUILDROOT_CONFIG, let's define them in a
COMMON_CONFIG_ENV variable, which is used by all the xconfig, gconfig,
menuconfig, nconfig, config, oldconfig, randconfig, allyesconfig,
allnoconfig, randpackageconfig, allyespackageconfig,
allnopackageconfig, defconfig, %_defconfig targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Our kconfig-to-buildroot2.patch hasn't been kept up to date with all
the changes made into package/config, and a single patch wasn't very
practical to maintain all our changes. Therefore, this commit adds a
package/config/patches directory, which contains a Quilt series of
patches that correspond to our modifications to the kconfig mechanism.
The huge kconfig-to-buildroot2.patch has been split into 16 smaller
patches. The purpose of some of the modifications has been clearly
identified, while some others were not identified.
The 16 patches together do match exactly the old
kconfig-to-buildroot2.patch. We have been very careful in making sure
that we wouldn't loose any of our modifications.
The only modifications made are :
* Instead of renaming the kernel Makefile to Makefile.kconfig and
naming the Buildroot Makefile just 'Makefile', we instead keep the
original package/config/Makefile from the kernel
scripts/kconfig/Makefile and name the Buildroot Makefile
package/config/Makefile.br. The main Buildroot Makefile is modified
accordingly.
* The documentation README.buildroot2 is updated to explain how to
upgrade to a newer version of scripts/kconfig.
* The kconfig-language.txt documentation is removed, as anybody can
easily find it in the kernel sources so there's no need to
duplicate it here.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>