Commit Graph

377 Commits

Author SHA1 Message Date
Peter Korsgaard
877044a738 Update copyright info for 2011
Happy newyear!

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-13 00:18:39 +01:00
Gustavo Zacarias
5ad139ebc9 toolchain: do staging symlink
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>
2011-01-02 22:55:36 +01:00
Gustavo Zacarias
009407e6be binutils: make it a proper package
* 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>
2011-01-02 22:55:16 +01:00
Daniel Nyström
2bf3c16609 Reset critical environment variables
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>
2010-12-29 23:35:52 +01:00
Gustavo Zacarias
87b81bb56f toolchain: move sysroot to host dir
* 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>
2010-12-28 22:38:47 +01:00
Thomas Petazzoni
6c492d5e7b toolchain: add support for external toolchain profiles and download
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>
2010-12-13 21:56:49 +01:00
Thomas Petazzoni
17b66affdf ccache: rework ccache management
* 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>
2010-12-08 17:51:49 +01:00
Peter Korsgaard
d7051da8c6 Makefile: document savedefconfig in 'make help', like it's done in Linux
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-07 12:16:44 +01:00
Peter Korsgaard
a8ecce0743 buildroot: kickoff 2011.02 development phase
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-03 11:56:28 +01:00
Peter Korsgaard
dbc45b0369 Update for 2010.11
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-30 16:52:43 +01:00
Gustavo Zacarias
0dc940cdee Makefile: introduce KSTRIPCMD to strip kernel modules
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>
2010-11-30 16:28:41 +01:00
Mike Frysinger
66254843a5 target-finalize: libtread_db: support nonstd toolchain setups
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>
2010-11-28 22:13:05 +01:00
Javier Viguera
69b2cc76b3 target-finalize: do not strip libthread_db
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>
2010-11-27 21:41:20 +01:00
Peter Korsgaard
09af8387fd Update for 2010.11-rc2
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-25 11:29:30 +01:00
Mike Frysinger
c98bc88e32 target-finalize: do not strip libthread_db.so
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>
2010-11-24 22:24:06 +01:00
Mike Frysinger
68ad6d4ee0 auto remove empty /usr/share dir
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>
2010-11-24 22:14:33 +01:00
Peter Korsgaard
7dccbc44a8 Makefile: really adjust kernel modules strip invocation
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-24 22:12:13 +01:00
Mike Frysinger
8101c9a357 linux: strip installed modules
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>
2010-11-24 22:02:40 +01:00
Peter Korsgaard
69884e3149 Makefile: remove outdated flush target
Not needed any more as we've removed the shared config.cache handling.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-24 15:32:17 +01:00
Peter Korsgaard
610255e7e4 Makefile: remove outdated .config.cmd handling
Not used anymore, and forcefully removes config if *config is aborted.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-24 15:30:54 +01:00
Peter Korsgaard
22c2c6b541 Makefile: handle host packages for make source / make external-deps
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>
2010-11-19 14:20:56 +01:00
Peter Korsgaard
ea252b0e04 Update for 2010.11-rc1
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-08 10:24:59 +01:00
Peter Korsgaard
64d8e9a0c1 Makefile: move target-{finalize,purgelocales} after bootloader/linux step
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>
2010-11-07 19:33:11 +01:00
Thomas Petazzoni
5f71fc1f19 Remove support for shared configuration cache
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>
2010-11-05 10:21:17 +01:00
Peter Korsgaard
0dca706568 Makefile: fix release target with make 3.81
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>
2010-11-04 00:03:52 +01:00
Yann E. MORIN
cb15bf8da5 Makefile: use global version string in /etc/br-version
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-03 23:31:32 +01:00
Yann E. MORIN
8258df279a Makefile: compute the version string for all to use
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>
2010-11-03 23:31:04 +01:00
Yann E. MORIN
e5e8fae892 Makefile: move version string from Config.in into Makefile
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>
2010-11-03 23:26:45 +01:00
Yann E. MORIN
2d239bbe27 Makefile: move .NOTPARALLEL
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>
2010-11-03 23:23:31 +01:00
Peter Korsgaard
3be4968343 Optimize (-O2) host binaries by default
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>
2010-10-29 21:00:26 +02:00
Peter Korsgaard
891973f538 Makefile: move KERNEL_ARCH from kernel-headers to here
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>
2010-10-17 23:32:37 +02:00
Yann E. MORIN
10c1eec2c3 toolchain: add new toolchain backend: crosstool-NG
[Peter: indent Config.in, shuffle make targets around]
Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-10-01 16:40:40 +02:00
Peter Korsgaard
d0c3d1cf43 sed: get rid of host-sed variant
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>
2010-09-30 23:09:39 +02:00
Yann E. MORIN
d487168c71 Makefile: Force make to run serially in the top-level Makefile
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>
2010-09-30 14:37:01 +02:00
Yann E. MORIN
aefad5317f Makefile: generate a Makefile wrapper in $(O)
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>
2010-09-26 23:47:07 +02:00
Maxime Petazzoni
d147b81fda Re-implement the source-check and external-deps targets
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>
2010-09-13 08:18:40 +02:00
Maxime Petazzoni
cf71111b99 Cleanup the VCS commands configuration
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>
2010-09-13 08:17:57 +02:00
Maxime Petazzoni
07b2af1a45 Remove the spider feature
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>
2010-09-13 08:17:46 +02:00
Peter Korsgaard
e62ed84b19 Merge branch 'for-2010.11/kconfig-upgrade' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-09-02 17:08:11 +02:00
Thomas Petazzoni
0b36880085 Ensure that all config-related files are generated before the build
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>
2010-09-01 14:22:28 +02:00
Thomas Petazzoni
e1b1a18ab6 Add support for savedefconfig
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>
2010-09-01 12:27:25 +02:00
Thomas Petazzoni
1039eb74fa Factorize environment variables for config utilities
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>
2010-09-01 12:27:17 +02:00
Thomas Petazzoni
abba28ac7d Makefile: use long options names for the 'conf' utility
The short option names have been removed as they were starting to
cause too much confusion. See
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4062f1a4c030157216dc8932e27131975cf7253c
for details.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-09-01 12:27:09 +02:00
Thomas Petazzoni
8b6585a9d3 Add support for the new nconf configuration tool
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-09-01 12:26:56 +02:00
Thomas Petazzoni
7c524dd0b6 Clean up our patches against kconfig
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>
2010-09-01 12:26:41 +02:00
Thomas Petazzoni
6f38119cbb Implement %_defconfig similarly to the kernel
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-09-01 12:26:29 +02:00
Thomas Petazzoni
dc9dba1509 Remove CONFIG_DEFCONFIG
There's no need to have a .defconfig, when you run make menuconfig,
make xconfig or anything else for the first time, it will just start
with the default configuration anyway. This is what the kernel does.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-09-01 12:26:22 +02:00
Thomas Petazzoni
4ccde7fabb Fix ldconfig call in target-finalize
Recent versions of ldconfig require the directory /var/lib/ldconfig,
otherwise they bail out with an error. Moreover, having a
/etc/ld.so.conf file also avoids a warning.

In addition to this, we remove the redirection of stderr, so that
errors remain visible to the user.

Thanks to Baruch Siach, Andy Gibbs and Darcy Watkins for investigating
the issue and proposing solutions.

This fixes the build on recent distributions such as Fedora 13 or
Gentoo.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-08-30 23:14:20 +02:00
Peter Korsgaard
de846f6e04 Makefile: fix source/source-check/external-deps with O=
Based on patch by Will Wagner <will_wagner@carallon.com>.

Now that the .config is located in the output directory when O=<dir>
is used, we have to pass the O= option to make for
source/source-check/external-deps to get them to look in the right place
for the .config.

Fix it by introducing an EXTRAMAKEARGS variable and use it whenever we
call back into the toplevel Makefile.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-08-29 23:24:07 +02:00
Malte Starostik
e48a72e5e9 Remove gdb plugins from target
* Don't install gdb plugins unless BR2_TARGET_GDB is set

Signed-off-by: Malte Starostik <m-starostik@versanet.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-30 10:46:37 +02:00