Commit Graph

353 Commits

Author SHA1 Message Date
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
Malte Starostik
bea9e43fe7 Globally remove aclocal directories from target
* Remove $(TARGET_DIR)/usr/share/aclocal from target-finalize when not
  installing devfiles and
* Remove some (now) redundant cleanup from individual packages

Signed-off-by: Malte Starostik <m-starostik@versanet.de>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-30 10:45:00 +02:00
Yann E. MORIN
ed0200993e toolchain: move makefile includes
Including a bunch of Makefiles with wildcard makes it impossible to add
new toolchain backends. Avoid that by namely including needed files.

The external toolchain still needs to include all the toolchain/*/*.mk
sub-makefiles, as they are needed to build a toolchain that runs on the
target. It is to be noted that the cross-toolchain is not built in this
case, as the make-targets to build the cross-toolchain are not present
in the $(BASE_TARGETS) variable, which is later used to create the
dependency rules.

Also, the comment 'Explicit ordering' has been removed, as it is mis-
leading. It is make's responsibility to create the proper ordering based
on the dependency rules it finds in the Makefiles

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:20:06 +02:00
Yann E. MORIN
ed181aeedb toolchain: move helper functions from external toolchain
The helper functions used for external toolchains may also be useful
to alternate toolchain backends (currently, the external toolchain is
the sole user).

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:19:56 +02:00
Peter Korsgaard
e49e2feda4 Makefile: fix ldconfig selection for internal toolchains
Commit ed0d45fdd (Choose host/target ldconfig based on availability)
added a runtime check for a cross-ldconfig being available.
Unfortunately this checks runs too early (at package/Makefile.in parsing
time), so it always fails when using an internal toolchain as ldconfig
isn't built yet.

Fix it by moving the check to the only place it is used (target-finalize).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-26 23:57:01 +02:00
Malte Starostik
fbc22ecaef Fix default skeleton path
Signed-off-by: Malte Starostik <m-starostik@versanet.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-19 09:42:56 +02:00
Dmytro Milinevskyy
2b3a43f4e3 fs: add option to define path to custom rootfs skeleton
Signed-off-by: Dmytro Milinevskyy <milinevskyy@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-18 23:15:55 +02:00
Dmytro Milinevskyy
d9119c0bc5 move default skeleton to fs/ and drop busybox skeleton
[Peter: fixup patch, adjust for busybox.mk changes]
Signed-off-by: Dmytro Milinevskyy <milinevskyy@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-18 23:08:55 +02:00
Thomas Petazzoni
26082e79af Introduce support for host config cache
We now have for quite some time a configuration cache used to speed-up
the execution of ./configure scripts when compiling programs for the
target. This commit introduces a similar concept when Buildroot
compiles programs for the host.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:41 +02:00
Peter Korsgaard
8e29430410 Makefile: fixup make distclean after kconfig build in BUILD_DIR
We don't actually need to explicitly clean the kconfig stuff, as distclean
already removes the entire BUILD_DIR, but fix up the packag/config makefile
to do the right thing if make clean/distclean is called manually for
completeness.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-01 09:03:36 +02:00
Daniel Hobi
cf4689f8b1 Fix: convert leftover $(CONFIG)/conf to $(BUILD_DIR)/buildroot-config/conf
Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-29 23:47:49 +02:00
Thomas Petazzoni
fe1cba690a Remove old Linux infrastructure
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-22 21:20:26 +02:00
Thomas Petazzoni
487e21cff6 New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :

 * Kernel version: a fixed recent stable version, same as kernel
   headers version (for internal toolchains only), custom stable
   version, or custom tarball URL

 * Kernel patch: either a local file, directory or an URL

 * Kernel configuration: either the name of a defconfig or the
   location of a custom configuration file

 * Kernel image: either uImage, bzImage, zImage or vmlinux.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-22 21:20:25 +02:00
Peter Korsgaard
2cc210c92f kconfig: build in BUILD_DIR/buildroot-config
This way the main buildroot dir can be completely read-only for
out-of-tree builds

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-21 22:16:34 +02:00
Peter Korsgaard
2691d80803 Makefile: fix make <blah>_defconfig
Make sure we only pass O=<path> if we were originally called like that,
otherwise we might end up looking for the .config in the wrong place.

Likewise, when changing between using O= or not (or simply running
make <blah>_defconfig in a pristine source tree), we do end up having
a .config, but no .config.cmd. It isn't really critical so just continue
even if we couldn't read it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-21 22:16:34 +02:00
Will Wagner
39ca6d50d8 Move config files into output directory for out-of-tree build
Closes #1213

Signed-off-by: Will Wagner <will_wagner@carallon.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-21 22:06:00 +02:00
Peter Korsgaard
5fd095b374 toolchain: remove gcc 4.1.2 and non-sysroot support
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-15 23:16:55 +02:00
Thomas Petazzoni
649b5b9250 bootloaders: move bootloader build code to boot/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-10 21:05:12 +02:00
Peter Korsgaard
2b42aae784 Makefile: support gconfig (GTK-based configurator) similar to xconfig
Support the GTK variant of the graphical kconfig configurator as an
alternative to the Qt3-based one.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-05 21:15:10 +02:00
Peter Korsgaard
35fac17ebc Makefile: cleanup *conf targets
The make targets for the kconfig conf/mconf/qconf are almost identical,
so us a single rule for it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-05 21:14:59 +02:00
Peter Korsgaard
aacfa18033 Merge branch 'graph-dependencies' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-05-27 14:11:26 +02:00
Peter Korsgaard
319a4751c4 Makefile: move filesystem stuff after u-boot build again
Otherwise u-boot tools / kernel modules are only added to target AFTER
the filesystems are built.

Long term u-boot/kernel stuff should get splitted from target/device,
but this is the safest solution for now.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-21 16:19:11 +02:00
Thomas Petazzoni
b7d6c8ad0f Add a show-targets target
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-05-21 15:07:34 +02:00
Peter Korsgaard
c71816a8a5 Makefile: make GNU_HOST_NAME a simply expanded variable (:=)
GNU_HOST_NAME is referred more than 100 times in the tree, used 5
times during startup, and is relatively expensive to run - so make
it a simple expanded variable (:=) rather than recursively expanded
one (=).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-06 20:56:25 +02:00
Paulius Zaleckas
d701a82321 Remove gtk-doc documentations from target
On my target rootfs it is installed documentation for:
atk, cairo, gdk, gdk-pixbuf, gio, glib, gobject, gtk, pango

It ocupies 34M of space. Configure option --disable-gtk-doc doesn't
prevent installation of it. So we should remove them manually if
documentation is disabled.

[Peter: also remove manual rm's from hal/libxml2/libglade]
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-05 12:21:21 +02:00