Commit Graph

301 Commits

Author SHA1 Message Date
Thomas Petazzoni
72f913bb3b Get rid of unused variables
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-11 21:10:34 +02:00
Thomas Petazzoni
60281cbfe4 Guess build system and remove BR2_GNU_BUILD_SUFFIX
Instead of having a configuration option BR2_GNU_BUILD_SUFFIX, let's
use config.guess to guess the build system type.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-11 21:10:33 +02:00
Thomas Petazzoni
87b0637bd0 Remove all documentation when BR2_HAVE_DOCUMENTATION is not set
Until now, we had BR2_HAVE_MANPAGES, BR2_HAVE_INFOPAGES and
BR2_HAVE_DOCUMENTATION, but there's no need to have such a
fine-grained control over what documentation gets kept or not.

Therefore, just remove all the documentation (man pages, info pages
and documentation in $(TARGET_DIR)/usr/doc and
$(TARGET_DIR)/usr/share/doc) when BR2_HAVE_DOCUMENTATION is not set.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-11 06:01:08 +02:00
Thomas Petazzoni
0585241505 Move all filesystem generation code to fs/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-09 11:04:36 +02:00
Peter Korsgaard
cd61ea772b Makefile: out-of-tree fix for uclibc 0.9.31
Strangely enough O is still passed to submakes with MAKEOVERRIDES
(with make 3.81 atleast), the only thing that changes is the output
of the origin function (command line -> environment).
Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
To really make O go away, we have to override it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-04-05 10:44:54 +02:00
Yann E. MORIN
26b44b2b02 toolchain: prepare for more than two alternatives
Lay down the path to add more than two toolchain kinds:
- check the type of toolchain as:
    ifeq (toolchain_buildroot,y)
        blabla buildroot-specific
    else ifeq (toolchain_external,y)
        blabla external-specific
    endif

- prefer using positive checks, a-la:
    ifeq (foo,y)
  instead of:
    ifneq (bar,y)
  (where foo and bar are mutually exclusive)

- have the toolchain_buildroot case always appear first

- gettext is handled differently, because we want to add an option
  only if not using the buildroot toolchain, hence we use ifneq.

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-03-31 10:53:12 +02:00
Peter Korsgaard
eb05757510 buildroot: we're in 2010 now
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-02-24 09:42:30 +01:00
Thomas Petazzoni
a05c337de5 Create $(STAGING_DIR)/usr/bin unconditionnally
This fixes the build of libcap, with external toolchain, when it is
the first package being built.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-02-09 22:44:15 +01:00
Peter Korsgaard
23ddf460aa Makefile: release: use git archive
Create tarballs with git-archive so we're sure they don't contain
anything not in git (E.G. local backup configs).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-02-09 16:34:04 +01:00
Yann E. MORIN
4b74321195 toolchain/gdb: get rid of another legacy and unused variable
BR2_VENDOR_GDB_VERSION and VENDOR_GDB_VERSION are no longer settable.
The only user is gdb, and it's totally useless in this case.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-02-09 11:44:20 +01:00
Yann E. MORIN
7dd0591183 toolchain/gdb: get rid of legacy & unused variables
The BR2_VENDOR_SUFFIX and VENDOR_SUFFIX variables are no longer settable.
The only user is gdb, and is totally useless in this case.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-02-08 17:03:03 +01:00
Anders Darander
b9656e81a4 Remove backup-files from the TARGET_DIR.
Closes #823.

~ is commonly used as a suffix to editor backup files.
Remove these files, just as we remove CVS-directories and
.empty-files.

[Peter: tweaked to remove in same find invocation as .empty]
Signed-off-by: Anders Darander <ad@datarespons.se>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-23 11:54:25 +01:00
Thomas Petazzoni
bc994c533c Use BR2_TOOLCHAIN_BUILDROOT instead of BR2_TOOLCHAIN_SOURCE
The BR2_TOOLCHAIN_SOURCE option is removed in a future commit.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-12-14 23:54:47 +01:00
Peter Korsgaard
f7a501e13c Makefile: fix build if CDPATH is set in environment
Reported by Bjørn Forsman <bjorn.forsman@gmail.com>.

If CDPATH is set in the environment, cd <dir> will print the absolute path
of <dir>, causing various trouble (The most critical being BASE_DIR ending
up as <path> <path> which breaks basically everything).

Fix it by clearing CDPATH. Notice that export doesn't affect the environment
of $(shell ..) calls, so explicitly throw away any output from cd in the
BASE_DIR shell call.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-13 22:58:49 +01:00
Peter Korsgaard
97c996d654 Makefile: document configure cache handling
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-12 08:50:00 +01:00
Peter Korsgaard
b5972138c3 Makefile: drop config cache on .config changes
The config cache might contain invalid values when .config is changed
(E.G. when adding/removing libraries), so drop it so config checks are
rerun for new packages (existing package still won't be rebuilt).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-12 00:16:33 +01:00
Peter Korsgaard
6b1dd45bf4 Makefile: use absolute path for TOPDIR
Reported by mr_claus on IRC.

This ensure DL_DIR is always an absolute path, like it was before the
build dir reorganization - Fixes vim (patch) build.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-11-30 17:31:56 +01:00
Peter Korsgaard
406053d5dc Makefile: cleanup *clean targets
As discussed on the list, fixup the *clean targets, so we now have:

clean: remove all generated files (E.G. everything in output/)
distclean: same as clean, but also remove the kconfig build and .config

Also tweak 'make help' output to match. This also merges the two
different clean / distclean targets we had depending on if there was
a .config present or not (most variables are not defined for !.config
case, so E.G. the clean target ends up being a noop).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-11-20 14:34:04 +01:00
Peter Korsgaard
58fd779a43 buildroot; move defconfigs to configs/ and print in help
As discussed earlier on the mailing list. It simplifies code, gives more
sensible error message on typos and makes the defconfigs easier to find
for users.

Furthermore, update documentation to match.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-10-04 22:20:28 +02:00
Peter Korsgaard
6652770f41 Makefile: add rand/allyes/allno package config targets
Similar to the normal targets, but only affects the BR2_PACKAGE_* options.
E.G. handy for keeping your current toolchain config while testing
(random) packages.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-10-04 21:57:12 +02:00
Peter Korsgaard
c48bbb8c08 Makefile: update help text
get rid of the removed saveconfig/getconfig targets, and instead document
randconfig/defconfig/allyesconfig/allnoconfig.

Furthermore, get rid of the unused tags target.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-10-04 21:45:10 +02:00
Peter Korsgaard
912ea81ad4 Makefile: reinstate /etc/br-version
Got lost in the recent cleanup, but is handy to know BR version.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-30 17:40:24 +02:00
Peter Korsgaard
89464a9601 Makefile: be more quiet when make -s is used
Somehow got lost in the recent reorganisation.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-30 17:39:44 +02:00
Michael Roth
18994732d3 Makefile: Remove ancient 'sourceball' target
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-23 12:09:08 +02:00
Michael Roth
483b2980d0 Remove unneeded trailing slash from TOPDIR
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-23 09:19:47 +02:00
Michael Roth
416323e934 Move download directory 'dl' back to the top hierachy of buildroot
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-23 09:15:39 +02:00
Michael Roth
cb5710c538 rename TOOL_BUILD_DIR to TOOLCHAIN_DIR
To reflect the new output directory hierachy rename the Makefile variable
TOOL_BUILD_DIR to TOOLCHAIN_DIR.

Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-23 09:15:27 +02:00
Thomas Petazzoni
3b2a803d28 Rename the output directories
In the output directory, we now have

 - build/    where all the packages are built
 - images/   where the final kernel and rootfs images are stored
 - staging/  the staging directory (containing the development files
             and libraries compiled for the target)
 - target/   which contains the target root filesystem
 - host/     which contains all the host programs
 - stamps/   which contains the stamps files

Therefore, the build_ARCH and toolchain_build_ARCH have been
removed. People willing to use the same Buildroot sources to compile
for different architectures are invited to use the O= command line
option for out-of-tree compilation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:33:31 +02:00
Thomas Petazzoni
fd3800c197 Remove BR2_TOPDIR_PREFIX and BR2_TOPDIR_SUFFIX
The same effect can be done using out-of-tree build with O=

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:33:27 +02:00
Thomas Petazzoni
a07d6b9d56 By default, put the output in an output/ directory
Instead of putting all the build-related stuff as a mess in the
Buildroot sources, group them in an output/ directory.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:32:54 +02:00
Thomas Petazzoni
18183726d4 Remove the BOARD/LOCAL feature
This can be achieved by adding a new target in target/device/, and I
will later propose a mechanism to add external boards and packages, so
that our users not willing to get their target-specific or
package-specific things merged can keep them cleanly separated from
Buildroot tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:28:25 +02:00
Thomas Petazzoni
397fe5cc0b Remove the "project" feature
The "project" feature was designed to allow to several projects to be
built inside the same Buildroot source tree and allowing the toolchain
and non-configurable packages to be shared between the different
projects on the same architecture. While being interesting in theory,
this feature adds a level of complexity to Buildroot, both from an
user perspective and from a developer perspective, while one of the
main Buildroot strengh is to be simple. Moreover, this feature is only
seldomly used by our users.

From a user-level perspective, this for example allows to remove the
project_build_ARCH directory, which was very confusing. The
autotools-stamps directory is also removed, since these stamps are
back at their normal location.

Description of the changes involved :

 * project/, directory removed

 * Makefile

    - Don't include project/Makefile.in and project/project.mk anymore

    - Grab a copy of the contents of project/Makefile.in at the
      location it was imported, but remove the definition related to
      PROJECT_BUILD_DIR. The TARGET_DIR is now in
      $(BUILD_DIR)/target_dir

    - Remove the creation/removal of the $(PROJECT_BUILD_DIR) and
      $(PROJECT_BUILD_DIR)/autotools-stamps directories

    - Don't make world depends on target-host-info. This target was
      defined by project/project.mk to customize /etc/issue,
      /etc/hostname and create /etc/br-version depending on the
      project definitions. We can of course imagine re-adding such a
      feature later.

    - Replace PROJECT_BUILD_DIR by BUILD_DIR everywhere

    - Remove the update, log and lognr.$(PROJECT) target, they were
      specific to the project feature.

 * package/Makefile.autotools.in

    - Replace PROJECT_BUILD_DIR by BUILD_DIR for the location of the
      configure cache

    - Move the INSTALL_TARGET and HOOK_POST_INSTALL stamps to the same
      directory as the other stamps (i.e, in the package directory).

 * package/Makefile.in

    - Replace PROJECT_BUILD_DIR by BUILD_DIR for the location of the
      configure cache

 * package/at/at.mk,
   package/busybox/busybox.mk,
   package/busybox/initramfs.mk,
   package/customize/customize.mk,
   package/linux-fusion/linux-fusion.mk,
   package/ltp-testsuite/ltp-testsuite.mk,
   package/nfs-utils/nfs-utils.mk,
   target/cpio/cpioroot.mk,
   target/cramfs/cramfs.mk,
   target/device/Atmel/DataFlashBoot/DataflashBoot.mk,
   target/device/Atmel/Makefile.in,
   target/device/Atmel/at91bootstrap/at91bootstrap.mk,
   target/device/KwikByte/Makefile.in,
   target/ext2/ext2root.mk,
   target/initramfs/initramfs.mk,
   target/iso9660/iso9660.mk,
   target/jffs2/jffs2root.mk,
   target/linux/Makefile.in,
   target/romfs/romfs.mk,
   target/squashfs/squashfsroot.mk,
   target/tar/tarroot.mk,
   target/ubifs/ubifsroot.mk

    - Replace PROJECT_BUILD_DIR by BUILD_DIR

 * target/device/Config.in

    - Do not include project/Config.in anymore

 * target/linux/Makefile.in.advanced

    - Replace PROJECT_BUILD_DIR by BUILD_DIR

    - Store the stamps file in $(STAMP_DIR) instead of
      $(PROJECT_BUILD_DIR)/autotools-stamps

 * target/u-boot/Makefile.in

    - Replace PROJECT_BUILD_DIR by BUILD_DIR

    - Remove $(PROJECT) from the U-Boot target binary name

    - Remove the insertion in the configuration of the project name as
      the hostname

    - The u-boot-autoscript target now generates
      $(U_BOOT_AUTOSCRIPT).img instead of
      $(U_BOOT_AUTOSCRIPT).$(PROJECT)

 * toolchain/gcc/gcc-uclibc-3.x.mk
   toolchain/gcc/gcc-uclibc-4.x.mk

    - Move the stamps files to $(STAMP_DIR)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:28:25 +02:00
Thomas Petazzoni
6cdf2481ee makefile: use qstrip
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-05 14:43:16 +02:00
Thomas Petazzoni
580c6d9b44 makefile: new qstrip make function
Define a qstrip function that strips double quotes and then
whitespaces around a given string. This is a very commonly needed
thing, and having a function allows to remove a large quantity of
hand-written definitions, followed by a dummy comment to make text
editors not crazy because of the unmatching double quote.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-05 14:43:16 +02:00
Will Newton
fc3eb18b70 Makefile: Ensure CVS directories are removed from target fs.
The find command syntax is incorrect when deleting CVS and .svn directories
from the target filesystem, which prevent CVS directories from being
deleted.

It's useful to delete these dirs because users of buildroot often import
buildroot into CVS or Subversion.

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-08-26 23:00:38 +02:00
Thomas Petazzoni
7e7576c3d8 Makefile: add the xconfig target to the help of the main Makefile
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-07-27 18:09:32 +02:00
Peter Korsgaard
76dade1788 Merge branch 'kconfig-update' of git://git.busybox.net/~tpetazzoni/git/buildroot 2009-07-27 17:24:01 +02:00
Alper Yildirim
b0df9df39a config: Add support for xconfig
It involved:

 * Modifying the top-level Makefile to create the xconfig target, and
   the $(CONFIG)/qconf target to compile the qconf utility

 * Modifying the package/config/Makefile magic so that C++ files and
   binaries gets linked properly, re-using the
   package/config/Makefile.kconfig logic inherited from the kernel

 * Hacking a little bit package/config/Makefile.kconfig in a way
   similar to the modifications done for the mconf (menuconfig
   interface)

Signed-off-by: Alper Yildirim <ayildirim@aselsan.com>
2009-07-27 16:07:00 +02:00
Daniel Mack
eed7d8737a Add support for custom post-build script
The config help text says it all:

  Specify a script to be run after the build has finished and before
  the BR2 starts packing the files into selected packages.

  This gives users the oportunity to do board-specific cleanups,
  add-ons and the like, so the generated files can be used directly
  without further processing.

  The script is called with the target directory name as first and
  only argument. Make sure the exit code of that script is 0,
  otherwise make will stop after calling it.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-07-25 23:15:18 +02:00
Maxim Grigoriev
edb5ca9c52 Makefile: apply xtensa specific TARGET_SKELETON_PATCH if available
Part of #163.

Signed-off-by: Maxim Grigoriev <maxim2405@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-07-24 02:37:06 +02:00
Wade Berrier
027aa1d2ec Older versions of 'find' don't have the '-delete' option
Use find's '-print0' and 'xargs -0' as an equivalent alternative.
2009-04-28 17:33:44 +00:00
Peter Korsgaard
a767c8bdf7 Makefile: distclean: remove correct dirs
Remove toolchain build dir, and don't try to remove the non-existing include
dir. Also don't explicitly remove the kernel image located in binaries as
we're already removing that dir.
2009-04-17 13:53:07 +00:00
Peter Korsgaard
32faf35112 Makefile: add target-finalize for common filesystem cleanup
And remove from each rootfs variant.
2009-04-07 21:04:31 +00:00
Peter Korsgaard
b87b4742e0 Makefile: add BR2_ENABLE_LOCALE_PURGE to purge unwanted locales
Add BR2_ENABLE_LOCALE_PURGE / BR2_ENABLE_LOCALE_WHITELIST options to
remove unwanted locales from the target rootfs. Handy for stuff like
the gtk stack, which comes with ~25 MB locales.

Works similar to localepurge in Debian, E.G. you provide a white list
of wanted locales, and everything else is removed.
2009-04-06 09:21:26 +00:00
Peter Korsgaard
4d298a2d37 Makefile: target-devfiles: combine .a / .la find invocation 2009-04-06 09:21:22 +00:00
Peter Korsgaard
e7b38c71ce package: add STAMP_DIR and use for host builds
Move stamp (dependency) files outside the (version specific) source
directories, so other packages can hardcode dependencies on them instead
of having to use <PACKAGE>_VERSION variables.

This is important as the variables in the make rules are evaluated when
the rules is seen, which might be before the dependent makefile is parsed
(and hence <PACKAGE>_VERSION variable is known, screwing up stuff.

The downside of this is that the package isn't automatically rebuilt
when the version changes (E.G. by a svn update) and you now also have to
remove the stamp files next to $(BUILD_DIR)/<PACKAGE>-* to force a rebuild.
2009-03-19 11:06:47 +00:00
Peter Korsgaard
bd07d92aad Makefile: introduce $(HOST_DIR) for host binaries
Add HOST_DIR directory handling. HOST_DIR should be used just like
STAGING_DIR, but for host files instead of target ones.
2009-03-16 15:48:43 +00:00
Ulf Samuelsson
8a446caa89 make update shoudl save to PROJECT_defconfig 2009-01-31 20:38:55 +00:00
Ulf Samuelsson
260d3b4ac2 make flush, should always be visible 2009-01-29 09:34:11 +00:00
Peter Korsgaard
b30d673c06 Makefile: fix typo introduced in r25601 2009-01-26 19:42:47 +00:00