Commit Graph

235 Commits

Author SHA1 Message Date
Arnout Vandecappelle (Essensium/Mind)
46fa5cbfb8 Rename XXXTARGETS to xxx-package
With the introduction of a specific macro for host targets, it was decided
to also make the names of the macros more intuitive: generic-package,
autotools-package and cmake-package.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2012-07-17 20:22:41 +02:00
Arnout Vandecappelle (Essensium/Mind)
c98337911c pkg-infra: add host-xxx-package macro
Create host-generic-package, host-autotools-package and
host-cmake-package macros.  Such a macro is more intuitive to use than
the $(call ...,host) construct.  Also it speeds things up by having
one less $(call ...) evaluation.

Also includes documentation update, but not for buildroot.html.

This brings the time for 'make -qp' (which is used by bash-completion)
down from 1.85s to 1.35s on my laptop.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:17:33 +02:00
Thomas Petazzoni
8278ed43ef graph-depends: ignore a few more uninteresting targets
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 19:44:26 +02:00
Luca Ceresoli
7e76f904d2 legal-info: infrastructure to collect legally-relevant material
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>
2012-07-17 19:05:49 +02:00
Arnout Vandecappelle (Essensium/Mind)
99dd58418d dependencies.sh: suppress output of locale
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-15 01:09:40 +02:00
Thomas Petazzoni
69b2360241 Revert "dependencies: ensure that DESTDIR isn't set when running Buildroot"
We should instead simply unset it at runtime, like we do for
PKG_CONFIG_PATH.

This reverts commit 9910eba33a.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-07-02 20:22:33 +02:00
Thomas Petazzoni
9910eba33a dependencies: ensure that DESTDIR isn't set when running Buildroot
Having DESTDIR set in the environment before running Buildroot creates
some funky problems in the build process. Prevent users from running
into this kind of troubles.

Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-06-30 23:53:38 +02:00
Ludovic Desroches
38b1ba3681 apply-patches.sh: add documentation
Signed-off-by: Ludovic Desroches <ludovic.desroches@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-05-19 20:57:55 +02:00
Thomas Petazzoni
5f42b778a0 kconfig: do not use HOST_LOADLIBES anymore
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-19 16:04:21 +02:00
Ludovic Desroches
7c717bbfff apply-patches.sh: patch pattern was expanded prematurely
The patch pattern was expanded before being into the patch directory so the
expansion can add incorrect files.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-16 23:19:08 +02:00
Ludovic Desroches
64ac719952 apply-patches.sh: add recursivity when scanning patchdir
Recursivity is needed with some tarballs containing debian patches:
.
  debian
    changelog
    control
    patches
      02-COPYRIGHT.patch
[...]

Since we can find some files which are not patches in those directories, only
consider .patch* and .diff* files as valid patches.
Due to recursivity, strip-components option is no more necessary so it has
been removed.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-21 13:47:27 +01:00
Ludovic Desroches
6c29e50c94 apply-patches.sh: use series file to apply patches in proper order
If a series file is present use it to determine the proper order to apply
patches instead of using ls sorting order.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
add a series file with a wrong patch order into an archive containing several
patches whose correct order is the alphabetical one
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-21 00:06:26 +01:00
Ludovic Desroches
4f9e82da2a apply-patches.sh: change archive management
The way archives were managed was incorrect because the uncompressed archives
were sent directly to the patch command. It means that alphabetical patch
order was not respected.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
with an armadeus_apf9328_defconfig build
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-21 00:04:47 +01:00
Ludovic Desroches
1b58957a96 apply-patches.sh: directories are no more considered as overlays
When a directory is found in patchdir, it is skipped.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
with an armadeus_apf9328_defconfig build
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-20 23:52:29 +01:00
Ludovic Desroches
1b671d477b apply-patches.sh: cleanup
Add quoting and remove redundant command.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
with an armadeus_apf9328_defconfig build
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-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>
2012-03-20 23:51:10 +01:00
Ludovic Desroches
a7773ea412 apply-patches.sh: rename targetdir to builddir
targetdir is not the output/target directory as it can suggest.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
with an armadeus_apf9328_defconfig build
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-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>
2012-03-20 23:49:20 +01:00
Ludovic Desroches
39bd61c6f3 apply-patches.sh: remove any rejects before applying patches
[Peter: .rej files might be in subdirs, so just do find .. | xargs rm]
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
with an armadeus_apf9328_defconfig build
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-14 23:28:57 +01:00
Luca Ceresoli
8661ae32ad pkg-stats: update list of packages to be skipped
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-02-26 19:46:58 +01:00
Thomas De Schampheleire
fd10b42ab8 dependencies: build a host-tar if no suitable tar can be found
Some toolchains, like the one built with buildroot itself, use hardlinks (for
example to link between the c++ and g++ binary). Unpacking such a toolchain
with the --strip-components options does not work correctly if the system tar
is too old (<1.17). Even recent releases of RedHat/CentOS still ship with
tar 1.15.

This patch checks for a suitable tar version (tar 1.17+) on the host system,
and adds host-tar to the host dependencies if none can be found.

host-tar is download and extracted as cpio.gz instead of tar.gz, to prevent
chicken-egg problem.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
v4 Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-02-09 22:59:21 +01:00
Thomas De Schampheleire
1bbf39bd73 dependencies: add function suitable-host-package
Sometimes, buildroot needs a certain host tool to do its job, e.g. tar. In
many cases, we expect this tool to be present on the host system, but this is
not always the case. Or maybe, the version on the host system is not
suitable, and we need a more recent one.

In some of these cases, instead of bailing out, buildroot could build the
package first (but only if the existing system package is not suitable).

To aid in detecting if a host package is suitable or not, this patch adds a
function suitable-host-package. When called with parameter foo, it will
execute check-host-foo.sh. This script should return either the path to the
suitable host package, or the empty string if no suitable package can be found.
The rules to determine whether something is suitable or not is left to
check-host-foo.sh and depends on foo.

An example usage of suitable-host-package is:
DEPENDENCIES_HOST_PREREQ += $(if $(call suitable-host-package,foo),,host-foo)

To avoid cluttering the existing dependencies.mk file, it includes any
check-host-foo.mk file. These files can be used to hold appropriate
dependency-related actions for foo.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
v1 Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-02-09 22:59:21 +01:00
Thomas De Schampheleire
a792668b58 dependencies: move from toolchain/ to support/
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>
2012-02-09 21:45:59 +01:00
Frederik Pasch
4861aed1f1 setlocalversion: fix i18n issue with svn
Closes #4700

Signed-off-by: Frederik Pasch <fpasch@googlemail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-16 13:54:57 +01:00
Peter Korsgaard
21f540be4e kconfig: sync with linux-3.0
And drop unused make-write-deps patch.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-15 20:48:04 +01:00
Luca Ceresoli
0e6695fc36 pkg-stats: fix table layout
The "Patch count" cell needs rowspan=2, otherwise the host/target cells are
misaligned.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-11 19:40:32 +01:00
Danomi Mocelopolis
ec02a34b0a Prevent patch commands from accessing source control
Closes #4357

Add -g0 option to patch to ensure it doesn't try to access source control.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-11-26 21:56:25 +01:00
Sven Neumann
bc9954e6d6 pkg-stats: update script location in usage instructions
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-10-06 14:49:09 +02:00
H Hartley Sweeten
b706e4d0e4 pkg-stats: update list of .mk to ignore
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-10-06 07:20:51 +02:00
H Hartley Sweeten
e684cecbfa pkg-stats: use correct variable names for convert_to_*autotools
The variable convert_to_autotools is not used in the script.  The correct
variables are convert_to_target_autotools and convert_to_host_autotools.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-10-05 23:07:24 +02:00
H Hartley Sweeten
b7b75b7167 pkg-stats: cnt should start with 0
The package count, cnt, should start with an initial value of 0.  It
is incremented as each package *.mk file is checked.  Starting with a
value of 1 makes the first ID = 2 and results in the TOTAL being off
by 1.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-10-05 19:08:42 +02:00
H Hartley Sweeten
6e3e5a99f7 pkg-stats: update grep tests for package type
Update the grep tests used to determine the package type.

The package name and directory are now worked out magically due to:

 package: add helper functions to get package name and directory magically

Because of this the extra arguments were removed by patches:

 package: remove useless arguments from GENTARGETS
 package: remove useless arguments from AUTOTARGETS
 package: remove useless arguments from CMAKETARGETS

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-10-05 13:57:35 +02:00
Thomas Petazzoni
102a93bdca support: move package/gnuconfig to support/gnuconfig
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>
2011-09-17 08:22:12 +02:00
Thomas Petazzoni
56da3859c7 support: move kconfig stuff from package/config to support/kconfig
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-17 08:17:06 +02:00
Thomas Petazzoni
59a326b934 support: move patch-kernel.sh and rename it
The name "patch-kernel.sh" is a bit stupid, since this script is used
to patch everything in Buildroot, not only kernel trees.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-17 08:15:32 +02:00
Thomas Petazzoni
20f8a7dec6 support: move libtool patches in support/libtool
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-17 08:14:56 +02:00
Thomas Petazzoni
f082c7c5cf support: move scripts/ to a new support/ directory
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-17 08:14:11 +02:00