All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Buildroot cleanup, v2
@ 2009-09-16 21:07 Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 1/6] Remove the "project" feature Thomas Petazzoni
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

Hello,

Here is a resend of my patch series to cleanup various aspects of
Buildroot. Changes against the previous version are the following:

 * Modified the patch on using "output" as the default output
   directory to match Peter suggestion regarding simplification of the
   implementation

 * Added a documentation patch that updates the documentation with the
   proposed modifications and also adds informations about various
   other things

 * Rebased on top of the current git

A discussion on this cleanup already took place, and I think that most
of the objections have found answers through the proposal of
alternative solutions.

Therefore, could the huge-cleanup branch at
git://git.busybox.net/~tpetazzoni/git/buildroot be pulled into the
master repository ?

If not, please tell me whether other fixes are needed or if I should
give up with the whole idea for design reasons.

Thanks!

Thomas

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 1/6] Remove the "project" feature
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
@ 2009-09-16 21:07 ` Thomas Petazzoni
  2009-09-17 16:17   ` Bernhard Reutner-Fischer
  2009-09-19 15:15   ` Peter Korsgaard
  2009-09-16 21:07 ` [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature Thomas Petazzoni
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

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>
---
 Makefile                                           |  115 ++++++++++++++------
 package/Makefile.autotools.in                      |    9 +-
 package/at/at.mk                                   |    6 +-
 package/busybox/busybox.mk                         |   12 +-
 package/busybox/initramfs.mk                       |   32 +++---
 package/customize/customize.mk                     |   10 +-
 package/linux-fusion/linux-fusion.mk               |    8 +-
 package/ltp-testsuite/ltp-testsuite.mk             |    2 +-
 package/nfs-utils/nfs-utils.mk                     |    6 +-
 project/Config.in                                  |   25 -----
 project/Makefile.in                                |   79 --------------
 project/project.mk                                 |   52 ---------
 target/cpio/cpioroot.mk                            |   18 ++--
 target/cramfs/cramfs.mk                            |   18 ++--
 target/device/Atmel/DataFlashBoot/DataflashBoot.mk |    6 +-
 target/device/Atmel/Makefile.in                    |    4 +-
 target/device/Atmel/at91bootstrap/at91bootstrap.mk |    6 +-
 target/device/Config.in                            |    2 -
 target/device/KwikByte/Makefile.in                 |    4 +-
 target/ext2/ext2root.mk                            |   20 ++--
 target/initramfs/initramfs.mk                      |   18 ++--
 target/iso9660/iso9660.mk                          |   16 ++--
 target/jffs2/jffs2root.mk                          |   20 ++--
 target/linux/Makefile.in                           |    6 +-
 target/linux/Makefile.in.advanced                  |   26 +++---
 target/romfs/romfs.mk                              |   18 ++--
 target/squashfs/squashfsroot.mk                    |   18 ++--
 target/tar/tarroot.mk                              |   18 ++--
 target/u-boot/Makefile.in                          |   17 ++--
 target/ubifs/ubifsroot.mk                          |   18 ++--
 toolchain/gcc/gcc-uclibc-3.x.mk                    |    6 +-
 toolchain/gcc/gcc-uclibc-4.x.mk                    |    6 +-
 32 files changed, 254 insertions(+), 367 deletions(-)
 delete mode 100644 project/Config.in
 delete mode 100644 project/Makefile.in
 delete mode 100644 project/project.mk

diff --git a/Makefile b/Makefile
index f2e349f..8adaff4 100644
--- a/Makefile
+++ b/Makefile
@@ -217,10 +217,76 @@ BASE_TARGETS:=uclibc
 endif
 TARGETS:=
 
-# setup our paths
-include project/Makefile.in
+# Strip off the annoying quoting
+ARCH:=$(call qstrip,$(BR2_ARCH))
+ifeq ($(ARCH),xtensa)
+ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
+endif
+WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
+SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
+SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
+BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
+BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
+GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
+ZCAT:=$(call qstrip,$(BR2_ZCAT))
+BZCAT:=$(call qstrip,$(BR2_BZCAT))
+TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
+
+# Buildroot supports building out of tree similarly to the Linux kernel.
+# To use, add O= to the make command line (make O=/tmp/build)
+BASE_DIR:=$(shell pwd)
+ifdef O
+ifeq ("$(origin O)", "command line")
+BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
+$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
+
+# other packages might also support Linux-style out of tree builds
+# with the O=<dir> syntax (E.G. Busybox does). As make automatically
+# forwards command line variable definitions those packages get very
+# confused. Fix this by telling make to not do so
+MAKEOVERRIDES =
+endif
+endif
+
+TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_
+TOPDIR_SUFFIX:=_$(call qstrip,$(BR2_TOPDIR_SUFFIX))
+ifeq ($(TOPDIR_PREFIX),_)
+TOPDIR_PREFIX:=
+endif
+ifeq ($(TOPDIR_SUFFIX),_)
+TOPDIR_SUFFIX:=
+endif
+
+DL_DIR=$(call qstrip,$(BR2_DL_DIR))
+ifeq ($(DL_DIR),)
+DL_DIR:=$(BASE_DIR)/dl
+endif
+
+BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
 
-BR2_DEPENDS_DIR=$(PROJECT_BUILD_DIR)/buildroot-config
+GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
+
+STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
+
+# packages compiled for the host goes here
+HOST_DIR:=$(BUILD_DIR)/host_dir
+
+# stamp (dependency) files go here
+STAMP_DIR:=$(BUILD_DIR)/stamps
+
+BINARIES_DIR:=$(BASE_DIR)/binaries/
+TARGET_DIR:=$(BUILD_DIR)/target_dir
+
+# define values for prepatched source trees for toolchains
+VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
+VENDOR_SUFFIX:=$(call qstrip,$(BR2_VENDOR_SUFFIX))
+VENDOR_BINUTILS_RELEASE:=$(call qstrip,$(BR2_VENDOR_BINUTILS_RELEASE))
+VENDOR_GCC_RELEASE:=$(call qstrip,$(BR2_VENDOR_GCC_RELEASE))
+VENDOR_UCLIBC_RELEASE:=$(call qstrip,$(BR2_VENDOR_UCLIBC_RELEASE))
+VENDOR_GDB_RELEASE:=$(call qstrip,$(BR2_VENDOR_GDB_RELEASE))
+VENDOR_PATCH_DIR:=$(call qstrip,$(BR2_VENDOR_PATCH_DIR))
+
+BR2_DEPENDS_DIR=$(BUILD_DIR)/buildroot-config
 
 include toolchain/Makefile.in
 include package/Makefile.in
@@ -237,8 +303,6 @@ all: world
 # In this section, we need .config
 include .config.cmd
 
-include project/*.mk
-
 # We also need the various per-package makefiles, which also add
 # each selected package to TARGETS if that package was selected
 # in the .config file.
@@ -290,20 +354,18 @@ $(BR2_DEPENDS_DIR): .config
 	cp -dpRf $(CONFIG)/buildroot-config $@
 
 dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
-	$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \
-	$(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
+	$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
 
 $(BASE_TARGETS): dirs
 
-world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL)
+world: dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
 
 
 .PHONY: all world dirs clean dirclean distclean source \
 	$(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
 	$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
 	$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
-	$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \
-	$(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
+	$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
 
 #############################################################
 #
@@ -311,8 +373,7 @@ world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL)
 # dependencies anywhere else
 #
 #############################################################
-$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(HOST_DIR) $(PROJECT_BUILD_DIR) \
-	$(PROJECT_BUILD_DIR)/autotools-stamps $(BINARIES_DIR) $(STAMP_DIR):
+$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR):
 	@mkdir -p $@
 
 $(STAGING_DIR):
@@ -330,7 +391,7 @@ endif
 endif
 	@mkdir -p $(STAGING_DIR)/usr/include
 
-$(PROJECT_BUILD_DIR)/.root:
+$(BUILD_DIR)/.root:
 	mkdir -p $(TARGET_DIR)
 	if ! [ -d "$(TARGET_DIR)/bin" ]; then \
 		if [ -d "$(TARGET_SKELETON)" ]; then \
@@ -345,10 +406,10 @@ $(PROJECT_BUILD_DIR)/.root:
 	-find $(TARGET_DIR) -type f -name .empty -print0 | xargs -0 rm -rf
 	touch $@
 
-$(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
+$(TARGET_DIR): $(BUILD_DIR)/.root
 
 erase-fakeroots:
-	rm -f $(PROJECT_BUILD_DIR)/.fakeroot*
+	rm -f $(BUILD_DIR)/.fakeroot*
 
 target-finalize:
 ifeq ($(BR2_HAVE_DEVFILES),y)
@@ -372,7 +433,7 @@ ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
 endif
 
 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
-LOCALE_WHITELIST=$(PROJECT_BUILD_DIR)/locales.nopurge
+LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge
 LOCALE_NOPURGE=$(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
 
 target-purgelocales:
@@ -403,21 +464,21 @@ external-deps:
 #
 #############################################################
 clean: $(TARGETS_CLEAN)
-	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
+	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
 
 dirclean: $(TARGETS_DIRCLEAN)
-	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(STAMP_DIR)
+	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
 
 distclean:
 ifeq ($(DL_DIR),$(BASE_DIR)/dl)
 	rm -rf $(DL_DIR)
 endif
-	rm -rf $(TOOL_BUILD_DIR) $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR) \
+	rm -rf $(TOOL_BUILD_DIR) $(BUILD_DIR) $(BUILD_DIR) $(BINARIES_DIR) \
 	.config.cmd
 	$(MAKE) -C $(CONFIG) clean
 
 sourceball:
-	rm -rf $(BUILD_DIR) $(PROJECT_BUILD_DIR) $(BINARIES_DIR)
+	rm -rf $(BUILD_DIR) $(BUILD_DIR) $(BINARIES_DIR)
 	set -e; \
 	cd ..; \
 	rm -f buildroot.tar.bz2; \
@@ -530,28 +591,16 @@ distclean: clean
 endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 
 flush:
-	rm -f $(PROJECT_BUILD_DIR)/tgt-config.cache
+	rm -f $(BUILD_DIR)/tgt-config.cache
 
 %_defconfig: $(CONFIG)/conf
 	cp $(shell find ./target/ -name $@) .config
 	-@$(MAKE) oldconfig
 
-update:
-	cp .config $(BOARD_PATH)/$(PROJECT)_defconfig
-
 configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
 
 prepatch:	gcc-patched binutils-patched gdb-patched uclibc-patched
 
-.lognr.$(PROJECT):
-	@echo "0" > .lognr.$(PROJECT)
-
-log:	.lognr.$(PROJECT)
-	@expr `cat .lognr.$(PROJECT)` + 1 > .lognr.$(PROJECT)	
-	@echo Creating $(PROJECT)-`cat .lognr.$(PROJECT)`.log
-	@$(MAKE) > $(PROJECT)-`cat .lognr.$(PROJECT)`.log 2>&1
-
-
 cross: $(BASE_TARGETS)
 
 help:
diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in
index 859e7bc..d4e6160 100644
--- a/package/Makefile.autotools.in
+++ b/package/Makefile.autotools.in
@@ -243,7 +243,7 @@ $(BUILD_DIR)/%/.stamp_configured:
 	$(TARGET_CONFIGURE_ENV) \
 	$($(PKG)_CONF_ENV) \
 	$(if $(THIS_SRCDIR),$(THIS_SRCDIR)/,./)configure \
-		$(if $(filter YES,$($(PKG)_USE_CONFIG_CACHE)),--cache-file="$(PROJECT_BUILD_DIR)/tgt-config.cache",) \
+		$(if $(filter YES,$($(PKG)_USE_CONFIG_CACHE)),--cache-file="$(BUILD_DIR)/tgt-config.cache",) \
 		--target=$(GNU_TARGET_NAME) \
 		--host=$(GNU_TARGET_NAME) \
 		--build=$(GNU_HOST_NAME) \
@@ -274,7 +274,7 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
 	touch $@
 
 # Install to target dir
-$(PROJECT_BUILD_DIR)/autotools-stamps/%_target_installed:
+$(BUILD_DIR)/%/.stamp_target_installed:
 	$(call MESSAGE,"Installing to target")
 	$($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_INSTALL_TARGET_OPT) -C $($(PKG)_DIR)/$($(PKG)_SUBDIR)
 	$(if $(BR2_HAVE_MANPAGES),,for d in man share/man; do \
@@ -352,8 +352,7 @@ $(2)_DIR_PREFIX			=  $(if $(3),$(3),$(TOP_SRCDIR)/package)
 
 
 # define sub-target stamps
-# targets which affect $(TARGET_DIR) must use a unique stamp for each $(PROJECT)
-$(2)_TARGET_INSTALL_TARGET =	$(PROJECT_BUILD_DIR)/autotools-stamps/$(1)_target_installed
+$(2)_TARGET_INSTALL_TARGET =	$$($(2)_DIR)/.stamp_target_installed
 $(2)_TARGET_INSTALL_STAGING =	$$($(2)_DIR)/.stamp_staging_installed
 $(2)_TARGET_BUILD =		$$($(2)_DIR)/.stamp_built
 $(2)_TARGET_CONFIGURE =		$$($(2)_DIR)/.stamp_configured
@@ -369,7 +368,7 @@ $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 $(2)_HOOK_POST_EXTRACT =	$$($(2)_DIR)/.stamp_hook_post_extract
 $(2)_HOOK_POST_CONFIGURE =	$$($(2)_DIR)/.stamp_hook_post_configure
 $(2)_HOOK_POST_BUILD =		$$($(2)_DIR)/.stamp_hook_post_build
-$(2)_HOOK_POST_INSTALL =	$(PROJECT_BUILD_DIR)/autotools-stamps/$(1)_hook_post_install
+$(2)_HOOK_POST_INSTALL =	$$($(2)_DIR)/.stamp_hook_post_install
 
 # human-friendly targets and target sequencing
 $(1):			$(1)-install
diff --git a/package/at/at.mk b/package/at/at.mk
index b3b2f35..52c4090 100644
--- a/package/at/at.mk
+++ b/package/at/at.mk
@@ -49,11 +49,11 @@ $(TARGET_DIR)/$(AT_TARGET_SCRIPT): $(AT_DIR)/$(AT_BINARY)
 	# Use fakeroot to pretend to do 'make install' as root
 	echo '$(MAKE) DAEMON_USERNAME=root DAEMON_GROUPNAME=root ' \
 	 '$(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(AT_DIR) install' \
-		> $(PROJECT_BUILD_DIR)/.fakeroot.at
+		> $(BUILD_DIR)/.fakeroot.at
 ifneq ($(BR2_HAVE_MANPAGES),y)
-	echo 'rm -rf $(TARGET_DIR)/usr/man' >> $(PROJECT_BUILD_DIR)/.fakeroot.at
+	echo 'rm -rf $(TARGET_DIR)/usr/man' >> $(BUILD_DIR)/.fakeroot.at
 endif
-	echo 'rm -rf $(TARGET_DIR)/usr/doc/at' >> $(PROJECT_BUILD_DIR)/.fakeroot.at
+	echo 'rm -rf $(TARGET_DIR)/usr/doc/at' >> $(BUILD_DIR)/.fakeroot.at
 	$(INSTALL) -m 0755 -D $(AT_DIR)/debian/rc $(TARGET_DIR)/$(AT_TARGET_SCRIPT)
 
 at: host-fakeroot $(TARGET_DIR)/$(AT_TARGET_SCRIPT)
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 45461f8..eb79134 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -7,12 +7,12 @@
 
 ifeq ($(BR2_PACKAGE_BUSYBOX_SNAPSHOT),y)
 # Be aware that this changes daily....
-BUSYBOX_DIR:=$(PROJECT_BUILD_DIR)/busybox
+BUSYBOX_DIR:=$(BUILD_DIR)/busybox
 BUSYBOX_SOURCE:=busybox-snapshot.tar.bz2
 BUSYBOX_SITE:=http://www.busybox.net/downloads/snapshots
 else
 BUSYBOX_VERSION=$(call qstrip,$(BR2_BUSYBOX_VERSION))
-BUSYBOX_DIR:=$(PROJECT_BUILD_DIR)/busybox-$(BUSYBOX_VERSION)
+BUSYBOX_DIR:=$(BUILD_DIR)/busybox-$(BUSYBOX_VERSION)
 BUSYBOX_SOURCE:=busybox-$(BUSYBOX_VERSION).tar.bz2
 BUSYBOX_SITE:=http://www.busybox.net/downloads
 endif
@@ -27,7 +27,7 @@ $(DL_DIR)/$(BUSYBOX_SOURCE):
 	$(call DOWNLOAD,$(BUSYBOX_SITE),$(BUSYBOX_SOURCE))
 
 $(BUSYBOX_DIR)/.unpacked: $(DL_DIR)/$(BUSYBOX_SOURCE)
-	$(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+	$(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 ifeq ($(BR2_PACKAGE_SYSKLOGD),y)
 	# if we have external syslogd, force busybox to use it
 	$(SED) "/#include.*busybox\.h/a#define CONFIG_SYSLOGD" $(BUSYBOX_DIR)/init/init.c
@@ -126,11 +126,11 @@ busybox: $(TARGET_DIR)/bin/busybox
 
 busybox-source: $(DL_DIR)/$(BUSYBOX_SOURCE)
 
-busybox-unpacked: host-sed $(PROJECT_BUILD_DIR) $(BUSYBOX_DIR)/.unpacked
+busybox-unpacked: host-sed $(BUILD_DIR) $(BUSYBOX_DIR)/.unpacked
 
-busybox-config: host-sed $(PROJECT_BUILD_DIR) $(BUSYBOX_DIR)/.config
+busybox-config: host-sed $(BUILD_DIR) $(BUSYBOX_DIR)/.config
 
-busybox-menuconfig: host-sed $(PROJECT_BUILD_DIR) busybox-source $(BUSYBOX_DIR)/.config
+busybox-menuconfig: host-sed $(BUILD_DIR) busybox-source $(BUSYBOX_DIR)/.config
 	$(MAKE) __TARGET_ARCH=$(ARCH) -C $(BUSYBOX_DIR) menuconfig
 
 busybox-update:
diff --git a/package/busybox/initramfs.mk b/package/busybox/initramfs.mk
index c67e866..afb80f9 100644
--- a/package/busybox/initramfs.mk
+++ b/package/busybox/initramfs.mk
@@ -6,7 +6,7 @@
 ifeq ($(BR2_PACKAGE_BUSYBOX_INITRAMFS),y)
 
 BUSYBOX_INITRAMFS_DIR:=$(BUSYBOX_DIR)-initramfs
-BR2_INITRAMFS_DIR:=$(PROJECT_BUILD_DIR)/initramfs
+BR2_INITRAMFS_DIR:=$(BUILD_DIR)/initramfs
 BB_INITRAMFS_TARGET:=$(IMAGE).initramfs_lst
 
 $(BUSYBOX_INITRAMFS_DIR)/.unpacked: $(DL_DIR)/$(BUSYBOX_SOURCE)
@@ -105,39 +105,39 @@ $(BR2_INITRAMFS_DIR)/bin/busybox: $(BUSYBOX_INITRAMFS_DIR)/busybox
 
 
 $(BB_INITRAMFS_TARGET): host-fakeroot $(BR2_INITRAMFS_DIR)/bin/busybox
-	ln -fs bin/busybox $(PROJECT_BUILD_DIR)/initramfs/init
-	mkdir -p $(PROJECT_BUILD_DIR)/initramfs/etc
+	ln -fs bin/busybox $(BUILD_DIR)/initramfs/init
+	mkdir -p $(BUILD_DIR)/initramfs/etc
 	cat target/generic/target_busybox_skeleton/etc/inittab > \
-		$(PROJECT_BUILD_DIR)/initramfs/etc/inittab
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
-	(echo "chown -R 0:0 $(PROJECT_BUILD_DIR)/initramfs"; \
-	 echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(PROJECT_BUILD_DIR)/initramfs"; \
-	 echo "$(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(PROJECT_BUILD_DIR)/initramfs > $(BB_INITRAMFS_TARGET)"; \
-	) > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
-	chmod +x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
+		$(BUILD_DIR)/initramfs/etc/inittab
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
+	(echo "chown -R 0:0 $(BUILD_DIR)/initramfs"; \
+	 echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(BUILD_DIR)/initramfs"; \
+	 echo "$(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(BUILD_DIR)/initramfs > $(BB_INITRAMFS_TARGET)"; \
+	) > $(BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
+	chmod +x $(BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
 	$(HOST_DIR)/usr/bin/fakeroot -- \
-		$(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
+		$(BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET))
 	touch -c $@
 
-$(PROJECT_BUILD_DIR)/.initramfs_done: $(BR2_INITRAMFS_DIR)/bin/busybox \
+$(BUILD_DIR)/.initramfs_done: $(BR2_INITRAMFS_DIR)/bin/busybox \
 					$(BB_INITRAMFS_TARGET)
 	touch $@
 
 busybox-initramfs-source:
-busybox-initramfs: $(PROJECT_BUILD_DIR)/.initramfs_done
+busybox-initramfs: $(BUILD_DIR)/.initramfs_done
 
 busybox-initramfs-menuconfig: host-sed $(BUILD_DIR) busybox-source $(BUSYBOX_INITRAMFS_DIR)/.configured
 	$(MAKE) __TARGET_ARCH=$(ARCH) -C $(BUSYBOX_INITRAMFS_DIR) menuconfig
 
 busybox-initramfs-clean:
-	rm -f $(BUSYBOX_INITRAMFS_DIR)/busybox $(PROJECT_BUILD_DIR)/.initramfs_*
+	rm -f $(BUSYBOX_INITRAMFS_DIR)/busybox $(BUILD_DIR)/.initramfs_*
 	rm -rf $(BR2_INITRAMFS_DIR) $(BB_INITRAMFS_TARGET)
 	-$(MAKE) -C $(BUSYBOX_INITRAMFS_DIR) clean
 
 busybox-initramfs-dirclean:
 	rm -rf $(BUSYBOX_INITRAMFS_DIR) $(BR2_INITRAMFS_DIR) \
-		$(PROJECT_BUILD_DIR)/.initramfs_*
+		$(BUILD_DIR)/.initramfs_*
 endif
 #############################################################
 #
diff --git a/package/customize/customize.mk b/package/customize/customize.mk
index 4fe4b8b..780e42b 100644
--- a/package/customize/customize.mk
+++ b/package/customize/customize.mk
@@ -6,14 +6,14 @@
 CUST_DIR:=package/customize/source
 
 $(BUILD_DIR)/.customize:
-	rm -f $(PROJECT_BUILD_DIR)/series
+	rm -f $(BUILD_DIR)/series
 	(cd $(CUST_DIR); \
-	 /bin/ls -d * > $(PROJECT_BUILD_DIR)/series || \
-	 touch $(PROJECT_BUILD_DIR)/series )
-	for f in `cat $(PROJECT_BUILD_DIR)/series`; do \
+	 /bin/ls -d * > $(BUILD_DIR)/series || \
+	 touch $(BUILD_DIR)/series )
+	for f in `cat $(BUILD_DIR)/series`; do \
 		cp -af $(CUST_DIR)/$$f $(TARGET_DIR)/$$f; \
 	done
-	rm -f $(PROJECT_BUILD_DIR)/series
+	rm -f $(BUILD_DIR)/series
 	touch $@
 
 customize: $(BUILD_DIR)/.customize
diff --git a/package/linux-fusion/linux-fusion.mk b/package/linux-fusion/linux-fusion.mk
index 6a1c12a..058e965 100644
--- a/package/linux-fusion/linux-fusion.mk
+++ b/package/linux-fusion/linux-fusion.mk
@@ -13,7 +13,7 @@ LINUX_FUSION_INSTALL_TARGET = YES
 # BR2_LINUX26_VERSION is not really dependable
 # LINUX26_VERSION is not yet set.
 # Retrieve REAL kernel version from file.
-LINUX_FOR_FUSION=`cat $(PROJECT_BUILD_DIR)/.linux-version`
+LINUX_FOR_FUSION=`cat $(BUILD_DIR)/.linux-version`
 
 LINUX_FUSION_DIR:=$(BUILD_DIR)/linux-fusion-$(LINUX_FUSION_VERSION)
 LINUX_FUSION_ETC_DIR:=$(TARGET_DIR)/etc/udev/rules.d
@@ -21,14 +21,14 @@ LINUX_FUSION_ETC_DIR:=$(TARGET_DIR)/etc/udev/rules.d
 LINUX_FUSION_CAT:=$(ZCAT)
 
 LINUX_FUSION_MAKE_OPTS:=  KERNEL_VERSION=$(LINUX_FOR_FUSION)
-LINUX_FUSION_MAKE_OPTS += KERNEL_BUILD=$(PROJECT_BUILD_DIR)/linux-$(LINUX_FOR_FUSION)
-LINUX_FUSION_MAKE_OPTS += KERNEL_SOURCE=$(PROJECT_BUILD_DIR)/linux-$(LINUX_FOR_FUSION)
+LINUX_FUSION_MAKE_OPTS += KERNEL_BUILD=$(BUILD_DIR)/linux-$(LINUX_FOR_FUSION)
+LINUX_FUSION_MAKE_OPTS += KERNEL_SOURCE=$(BUILD_DIR)/linux-$(LINUX_FOR_FUSION)
 
 LINUX_FUSION_MAKE_OPTS += SYSROOT=$(STAGING_DIR)
 LINUX_FUSION_MAKE_OPTS += ARCH=$(BR2_ARCH)
 LINUX_FUSION_MAKE_OPTS += CROSS_COMPILE=$(TARGET_CROSS)
 LINUX_FUSION_MAKE_OPTS += KERNEL_MODLIB=/lib/modules/$(LINUX_FOR_FUSION)
-LINUX_FUSION_MAKE_OPTS += DESTDIR=$(PROJECT_BUILD_DIR)/root
+LINUX_FUSION_MAKE_OPTS += DESTDIR=$(BUILD_DIR)/root
 LINUX_FUSION_MAKE_OPTS += HEADERDIR=$(STAGING_DIR)
 #LINUX_FUSION_MAKE_OPTS += 
 
diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk
index 355be02..7be12fd 100644
--- a/package/ltp-testsuite/ltp-testsuite.mk
+++ b/package/ltp-testsuite/ltp-testsuite.mk
@@ -48,7 +48,7 @@ $(LTP_TESTSUITE_DIR)/.installed: $(LTP_TESTSUITE_DIR)/.compiled
 	# Use fakeroot to pretend to do 'make install' as root
 	echo '$(MAKE1) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) ' \
 			'-C $(LTP_TESTSUITE_DIR) install' \
-			> $(PROJECT_BUILD_DIR)/.fakeroot.ltp
+			> $(BUILD_DIR)/.fakeroot.ltp
 	touch $@
 
 ltp-testsuite: host-fakeroot $(LTP_TESTSUITE_DIR)/.installed
diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
index e47bf37..bf8e668 100644
--- a/package/nfs-utils/nfs-utils.mk
+++ b/package/nfs-utils/nfs-utils.mk
@@ -59,7 +59,7 @@ NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug
 NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd
 NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad
 
-$(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils: $(NFS_UTILS_DIR)/$(NFS_UTILS_BINARY)
+$(BUILD_DIR)/.fakeroot.nfs-utils: $(NFS_UTILS_DIR)/$(NFS_UTILS_BINARY)
 	# Use fakeroot to pretend to do 'make install' as root
 	echo '$(MAKE) prefix=$(TARGET_DIR)/usr statedir=$(TARGET_DIR)/var/lib/nfs $(TARGET_CONFIGURE_OPTS) -C $(NFS_UTILS_DIR) install' > $@
 	echo 'rm -f $(TARGET_DIR)/usr/bin/event_rpcgen.py $(TARGET_DIR)/usr/sbin/nhfs* $(TARGET_DIR)/usr/sbin/nfsstat $(TARGET_DIR)/usr/sbin/showmount' >> $@
@@ -70,7 +70,7 @@ $(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils: $(NFS_UTILS_DIR)/$(NFS_UTILS_BINARY)
 	echo "file; done" >> $@
 	echo 'rm -rf $(TARGET_DIR)/var/lib/nfs' >> $@
 
-$(TARGET_DIR)/$(NFS_UTILS_TARGET_BINARY): $(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils
+$(TARGET_DIR)/$(NFS_UTILS_TARGET_BINARY): $(BUILD_DIR)/.fakeroot.nfs-utils
 	touch -c $@
 
 nfs-utils: host-fakeroot $(TARGET_DIR)/$(NFS_UTILS_TARGET_BINARY)
@@ -81,7 +81,7 @@ nfs-utils-clean:
 		rm -f $(TARGET_DIR)/$$file; \
 	done
 	-$(MAKE) -C $(NFS_UTILS_DIR) clean
-	rm -f $(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils
+	rm -f $(BUILD_DIR)/.fakeroot.nfs-utils
 
 nfs-utils-dirclean:
 	rm -rf $(NFS_UTILS_DIR)
diff --git a/project/Config.in b/project/Config.in
deleted file mode 100644
index 0e9e781..0000000
--- a/project/Config.in
+++ /dev/null
@@ -1,25 +0,0 @@
-comment "Project Options"
-
-config BR2_PROJECT
-	string "Project name"
-	default "uclibc"
-	help
-	  The project name is used to define subdirectories
-	  * where the Board Support Packages are built
-	    (Linux,Root fs Bootmonitor,Utilities etc.)
-	  * where the resulting binaries are stored.
-	  Older targets may still build in the build_<arch>
-	  and store binaries in the top directory.
-
-config BR2_HOSTNAME
-	string "hostname"
-	default "uclibc"
-	help
-	  The hostname string is stored in "/etc/hostname"
-
-config BR2_BANNER
-	string "banner"
-	default "Welcome to Buildroot"
-	help
-	  The banner string is stored in "/etc/issue"
-
diff --git a/project/Makefile.in b/project/Makefile.in
deleted file mode 100644
index 69c8572..0000000
--- a/project/Makefile.in
+++ /dev/null
@@ -1,79 +0,0 @@
-PROJECT:=$(call qstrip,$(BR2_PROJECT))
-TARGET_HOSTNAME:=$(call qstrip,$(BR2_HOSTNAME))
-BANNER:=$(call qstrip,$(BR2_BANNER))
-
-# silent mode requested?
-QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q,)
-
-# Strip off the annoying quoting
-ARCH:=$(call qstrip,$(BR2_ARCH))
-ifeq ($(ARCH),xtensa)
-ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
-endif
-WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
-SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
-SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
-BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
-BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
-ZCAT:=$(call qstrip,$(BR2_ZCAT))
-BZCAT:=$(call qstrip,$(BR2_BZCAT))
-TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
-
-# Buildroot supports building out of tree similarly to the Linux kernel.
-# To use, add O= to the make command line (make O=/tmp/build)
-BASE_DIR:=$(shell pwd)
-ifdef O
-ifeq ("$(origin O)", "command line")
-BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
-$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
-
-# other packages might also support Linux-style out of tree builds
-# with the O=<dir> syntax (E.G. Busybox does). As make automatically
-# forwards command line variable definitions those packages get very
-# confused. Fix this by telling make to not do so
-MAKEOVERRIDES =
-endif
-endif
-
-TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_
-TOPDIR_SUFFIX:=_$(call qstrip,$(BR2_TOPDIR_SUFFIX))
-ifeq ($(TOPDIR_PREFIX),_)
-TOPDIR_PREFIX:=
-endif
-ifeq ($(TOPDIR_SUFFIX),_)
-TOPDIR_SUFFIX:=
-endif
-
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(BASE_DIR)/dl
-endif
-
-# All non-configurable packages should be built in BUILD_DIR
-BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
-
-GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
-
-STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
-
-# packages compiled for the host goes here
-HOST_DIR:=$(BUILD_DIR)/host_dir
-
-# stamp (dependency) files go here
-STAMP_DIR:=$(BUILD_DIR)/stamps
-
-# All configurable packages (like Busybox,Linux etc) should be built
-# in PROJECT_BUILD_DIR
-PROJECT_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)project_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(PROJECT)
-BINARIES_DIR:=$(BASE_DIR)/binaries/$(PROJECT)
-TARGET_DIR:=$(PROJECT_BUILD_DIR)/root
-
-# define values for prepatched source trees for toolchains
-VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
-VENDOR_SUFFIX:=$(call qstrip,$(BR2_VENDOR_SUFFIX))
-VENDOR_BINUTILS_RELEASE:=$(call qstrip,$(BR2_VENDOR_BINUTILS_RELEASE))
-VENDOR_GCC_RELEASE:=$(call qstrip,$(BR2_VENDOR_GCC_RELEASE))
-VENDOR_UCLIBC_RELEASE:=$(call qstrip,$(BR2_VENDOR_UCLIBC_RELEASE))
-VENDOR_GDB_RELEASE:=$(call qstrip,$(BR2_VENDOR_GDB_RELEASE))
-VENDOR_PATCH_DIR:=$(call qstrip,$(BR2_VENDOR_PATCH_DIR))
diff --git a/project/project.mk b/project/project.mk
deleted file mode 100644
index 3074eff..0000000
--- a/project/project.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-PROJECT_FILE:=$(LOCAL)/$(PROJECT)/$(PROJECT).config
-
-
-.PHONY: target-host-info saveconfig getconfig
-
-target-host-info: $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname $(TARGET_DIR)/etc/br-version
-
-$(TARGET_DIR)/etc/issue: .config
-	mkdir -p $(TARGET_DIR)/etc
-	echo "" > $@
-	echo "" >> $@
-	echo "$(BANNER)" >> $@
-
-$(TARGET_DIR)/etc/hostname: .config
-	mkdir -p $(TARGET_DIR)/etc
-	echo "$(TARGET_HOSTNAME)" > $@
-
-$(TARGET_DIR)/etc/br-version: .config
-	mkdir -p $(TARGET_DIR)/etc
-	echo $(BR2_VERSION)$(shell $(TOPDIR)/scripts/setlocalversion) >$@
-
-saveconfig:
-	mkdir -p $(LOCAL)/$(PROJECT)
-	-cp .config $(PROJECT_FILE)
-	if [ -f $(LINUX26_DIR)/.config ]; then \
-		cp $(LINUX26_DIR)/.config \
-			$(LOCAL)/$(PROJECT)/linux-$(LINUX26_VERSION).config; \
-		$(SED) '/BR2_PACKAGE_LINUX_KCONFIG/d' $(PROJECT_FILE); \
-		echo "BR2_PACKAGE_LINUX_KCONFIG=\"$(LOCAL)/$(PROJECT)/linux-$(LINUX26_VERSION).config\"" >> $(PROJECT_FILE); \
-		$(SED) '/BR2_BOARD_PATH/d' $(PROJECT_FILE); \
-		echo "BR2_BOARD_PATH=\"$(LOCAL)/$(PROJECT)\"" >> $(PROJECT_FILE); \
-	fi
-	if [ -f $(BUSYBOX_DIR)/.config ]; then \
-		cp $(BUSYBOX_DIR)/.config \
-			$(LOCAL)/$(PROJECT)/busybox-$(BUSYBOX_VERSION).config; \
-		$(SED) '/BR2_PACKAGE_BUSYBOX_CONFIG/d' $(PROJECT_FILE); \
-		echo "BR2_PACKAGE_BUSYBOX_CONFIG=\"$(LOCAL)/$(PROJECT)/busybox-$(BUSYBOX_VERSION).config\"" >> $(PROJECT_FILE); \
-	fi
-	if [ -f $(UCLIBC_DIR)/.config ]; then \
-		cp $(UCLIBC_DIR)/.config \
-			$(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config; \
-		$(SED) '/BR2_UCLIBC_CONFIG/d' $(PROJECT_FILE); \
-		echo "BR2_UCLIBC_CONFIG=\"$(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config\"" >> $(PROJECT_FILE); \
-	fi
-	if [ -f $(UBOOT_DIR)/include/configs/$(PROJECT).h ]; then \
-		mkdir -p $(LOCAL)/$(PROJECT)/u-boot; \
-		cp $(UBOOT_DIR)/include/configs/$(PROJECT).h \
-			$(LOCAL)/$(PROJECT)/u-boot/$(PROJECT).h; \
-	fi
-
-getconfig:
-	-cp $(LOCAL)/$(PROJECT)/$(PROJECT).config .config
diff --git a/target/cpio/cpioroot.mk b/target/cpio/cpioroot.mk
index 0dbdb2e..2197d10 100644
--- a/target/cpio/cpioroot.mk
+++ b/target/cpio/cpioroot.mk
@@ -40,21 +40,21 @@ cpioroot-init:
 
 $(CPIO_BASE): host-fakeroot makedevs cpioroot-init
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
 endif
 	# Use fakeroot so tar believes the previous fakery
 	echo "cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $(CPIO_BASE)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
-	#- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
+	#- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
 ifeq ($(CPIO_ROOTFS_COMPRESSOR),)
 ifneq ($(ROOTFS_CPIO_COPYTO),)
 	$(Q)cp -f $(CPIO_BASE) $(ROOTFS_CPIO_COPYTO)
diff --git a/target/cramfs/cramfs.mk b/target/cramfs/cramfs.mk
index 99f9f79..79353b5 100644
--- a/target/cramfs/cramfs.mk
+++ b/target/cramfs/cramfs.mk
@@ -52,21 +52,21 @@ CRAMFS_TARGET=$(IMAGE).cramfs
 
 cramfsroot: host-fakeroot makedevs cramfs
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
 endif
 	# Use fakeroot so mkcramfs believes the previous fakery
 	echo "$(CRAMFS_DIR)/mkcramfs -q $(CRAMFS_OPTS) " \
-		"$(TARGET_DIR) $(CRAMFS_TARGET)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+		"$(TARGET_DIR) $(CRAMFS_TARGET)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
 
 cramfsroot-source: cramfs-source
 
diff --git a/target/device/Atmel/DataFlashBoot/DataflashBoot.mk b/target/device/Atmel/DataFlashBoot/DataflashBoot.mk
index c3dc857..8939c28 100644
--- a/target/device/Atmel/DataFlashBoot/DataflashBoot.mk
+++ b/target/device/Atmel/DataFlashBoot/DataflashBoot.mk
@@ -8,16 +8,16 @@ DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION)
 ATMEL_MIRROR:=$(call qstrip,$(BR2_ATMEL_MIRROR))
 DATAFLASHBOOT_SITE:=$(ATMEL_MIRROR)
 DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2
-DATAFLASHBOOT_DIR:=$(PROJECT_BUILD_DIR)/$(DATAFLASHBOOT_NAME)
+DATAFLASHBOOT_DIR:=$(BUILD_DIR)/$(DATAFLASHBOOT_NAME)
 DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin
 
 $(DL_DIR)/$(DATAFLASHBOOT_SOURCE):
 	 $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE))
 
 $(DATAFLASHBOOT_DIR)/.unpacked: $(DL_DIR)/$(DATAFLASHBOOT_SOURCE)
-	mkdir -p $(PROJECT_BUILD_DIR)
+	mkdir -p $(BUILD_DIR)
 	ls $(DL_DIR)/$(DATAFLASHBOOT_SOURCE)
-	$(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+	$(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 	touch $(DATAFLASHBOOT_DIR)/.unpacked
 
 $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY): $(DATAFLASHBOOT_DIR)/.unpacked
diff --git a/target/device/Atmel/Makefile.in b/target/device/Atmel/Makefile.in
index bb03529..bf7a2d1 100644
--- a/target/device/Atmel/Makefile.in
+++ b/target/device/Atmel/Makefile.in
@@ -38,7 +38,7 @@ LINUX26_RC_PATCH:=$(call qstrip,$(BR2_LINUX26_RC_PATCH))
 LINUX26_KCONFIG:=$(BOARD_PATH)/$(BOARD_NAME)-linux-$(LINUX26_VERSION).config
 
 # This should be part of target/linux/Makefile.in
-LINUX26_BUILD_DIR:=$(PROJECT_BUILD_DIR)
+LINUX26_BUILD_DIR:=$(BUILD_DIR)
 
 #LINUX26_BINLOC=$(LINUX26_FORMAT)
 #LINUX26_BINLOC:=$(BINARIES_DIR)/$(LINUX26_KERNEL)
@@ -80,7 +80,7 @@ include $(ATMEL_PATH)/at91bootstrap/at91bootstrap.mk
 endif
 
 atmel_status:
-	@echo PROJECT_BUILD_DIR=$(PROJECT_BUILD_DIR)
+	@echo BUILD_DIR=$(BUILD_DIR)
 	@echo BOARD_NAME=$(BOARD_NAME)
 	@echo BR2_BOARD_PATH=$(BR2_BOARD_PATH)
 	@echo BR2_MAJOR_MINOR=$(BR2_LINUX_MAJOR_VERSION)$(BR2_LINUX_MINOR_VERSION)
diff --git a/target/device/Atmel/at91bootstrap/at91bootstrap.mk b/target/device/Atmel/at91bootstrap/at91bootstrap.mk
index 92da683..32ed3e2 100644
--- a/target/device/Atmel/at91bootstrap/at91bootstrap.mk
+++ b/target/device/Atmel/at91bootstrap/at91bootstrap.mk
@@ -10,7 +10,7 @@ AT91BOOTSTRAP_NAME:=at91bootstrap-$(AT91BOOTSTRAP_VERSION)
 ATMEL_MIRROR:=$(call qstrip,$(BR2_ATMEL_MIRROR))
 AT91BOOTSTRAP_SITE:=$(ATMEL_MIRROR)
 AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).tar.bz2
-AT91BOOTSTRAP_DIR:=$(PROJECT_BUILD_DIR)/$(AT91BOOTSTRAP_NAME)
+AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/$(AT91BOOTSTRAP_NAME)
 AT91BOOTSTRAP:=$(call qstrip,$(BR2_AT91BOOTSTRAP))
 AT91BOOTSTRAP_ZCAT:=$(BZCAT)
 
@@ -37,8 +37,8 @@ $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE):
 	 $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE))
 
 $(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
-	mkdir -p $(PROJECT_BUILD_DIR)
-	$(AT91BOOTSTRAP_ZCAT) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+	mkdir -p $(BUILD_DIR)
+	$(AT91BOOTSTRAP_ZCAT) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 	toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) target/device/Atmel/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
 	touch $(AT91BOOTSTRAP_DIR)/.unpacked
 
diff --git a/target/device/Config.in b/target/device/Config.in
index 0e6e09a..6b7f11a 100644
--- a/target/device/Config.in
+++ b/target/device/Config.in
@@ -1,7 +1,5 @@
 menu "Target options"
 
-source "project/Config.in"
-
 comment "Preset Devices"
 
 source "target/device/ARMLTD/Config.in"
diff --git a/target/device/KwikByte/Makefile.in b/target/device/KwikByte/Makefile.in
index d889bc2..1f0b60b 100644
--- a/target/device/KwikByte/Makefile.in
+++ b/target/device/KwikByte/Makefile.in
@@ -20,7 +20,7 @@ LINUX26_KCONFIG:=$(BOARD_PATH)/$(BOARD_NAME)-linux.config
 endif
 
 # This should be part of target/linux/Makefile.in
-LINUX26_BUILD_DIR:=$(PROJECT_BUILD_DIR)
+LINUX26_BUILD_DIR:=$(BUILD_DIR)
 
 LINUX26_BINLOC=arch/$(KERNEL_ARCH)/boot/$(LINUX26_FORMAT)
 
@@ -38,7 +38,7 @@ endif
 # Needs to be AFTER board specific Makefiles
 
 kwikbyte_status:
-	@echo PROJECT_BUILD_DIR=$(PROJECT_BUILD_DIR)
+	@echo BUILD_DIR=$(BUILD_DIR)
 	@echo BOARD_NAME=$(BOARD_NAME)
 	@echo BR2_BOARD_PATH=$(BR2_BOARD_PATH)
 	@echo MAJOR_MINOR=$(LINUX_MAJOR_VER)$(LINUX_MINOR_VER)
diff --git a/target/ext2/ext2root.mk b/target/ext2/ext2root.mk
index 11624cf..49b53f4 100644
--- a/target/ext2/ext2root.mk
+++ b/target/ext2/ext2root.mk
@@ -87,14 +87,14 @@ endif
 
 $(EXT2_BASE): host-fakeroot makedevs genext2fs
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
 endif
 	# Use fakeroot so genext2fs believes the previous fakery
 ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
@@ -106,14 +106,14 @@ ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
 	set -x; \
 	echo "$(GENEXT2_DIR)/genext2fs -b $$GENEXT2_SIZE " \
 		"-N $$GENEXT2_INODES -d $(TARGET_DIR) " \
-		"$(EXT2_OPTS) $(EXT2_BASE)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+		"$(EXT2_OPTS) $(EXT2_BASE)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
 else
 	echo "$(GENEXT2_DIR)/genext2fs -d $(TARGET_DIR) " \
-		"$(EXT2_OPTS) $(EXT2_BASE)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+		"$(EXT2_OPTS) $(EXT2_BASE)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
 endif
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
 
 ifneq ($(EXT2_ROOTFS_COMPRESSOR),)
 $(EXT2_BASE).$(EXT2_ROOTFS_COMPRESSOR_EXT): $(EXT2_ROOTFS_COMPRESSOR_PREREQ) $(EXT2_BASE)
diff --git a/target/initramfs/initramfs.mk b/target/initramfs/initramfs.mk
index 195a929..0030278 100644
--- a/target/initramfs/initramfs.mk
+++ b/target/initramfs/initramfs.mk
@@ -18,19 +18,19 @@ $(INITRAMFS_TARGET) initramfs: host-fakeroot makedevs
 	rm -f $(TARGET_DIR)/init
 	ln -s sbin/init $(TARGET_DIR)/init
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 	# Use fakeroot so gen_initramfs_list.sh believes the previous fakery
 	echo "$(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $(INITRAMFS_TARGET)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	-rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	-rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 
 initramfs-source:
 
diff --git a/target/iso9660/iso9660.mk b/target/iso9660/iso9660.mk
index 4dfa1ad..94edf63 100644
--- a/target/iso9660/iso9660.mk
+++ b/target/iso9660/iso9660.mk
@@ -60,17 +60,17 @@ $(ISO9660_TARGET): host-fakeroot $(LINUX_KERNEL) $(EXT2_TARGET) grub mkisofs
 	cp $(LINUX_KERNEL) $(ISO9660_TARGET_DIR)/kernel
 	cp $(EXT2_TARGET) $(ISO9660_TARGET_DIR)/initrd
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
-	echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+	echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
 	# Use fakeroot so mkisofs believes the previous fakery
 	echo "$(MKISOFS_TARGET) -R -b boot/grub/stage2_eltorito -no-emul-boot " \
 		"-boot-load-size 4 -boot-info-table -o $(ISO9660_TARGET) $(ISO9660_TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(ISO9660_TARGET))
 
 iso9660root: $(ISO9660_TARGET)
 	echo $(ISO9660_TARGET)
diff --git a/target/jffs2/jffs2root.mk b/target/jffs2/jffs2root.mk
index 9d67347..7d31417 100644
--- a/target/jffs2/jffs2root.mk
+++ b/target/jffs2/jffs2root.mk
@@ -46,28 +46,28 @@ endif
 #
 $(JFFS2_TARGET): host-fakeroot makedevs mtd-host
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
 endif
 	# Use fakeroot so mkfs.jffs2 believes the previous fakery
 ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
 	echo "$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $(JFFS2_TARGET).nosummary && " \
 		"$(SUMTOOL) $(SUMTOOL_OPTS) -i $(JFFS2_TARGET).nosummary -o $(JFFS2_TARGET) && " \
 		"rm $(JFFS2_TARGET).nosummary" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
 else
 	echo "$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $(JFFS2_TARGET)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
 endif
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
 	@ls -l $(JFFS2_TARGET)
 ifeq ($(BR2_JFFS2_TARGET_SREC),y)
 	$(TARGET_CROSS)objcopy -I binary -O srec --adjust-vma 0xa1000000 $(JFFS2_TARGET) $(JFFS2_TARGET).srec
diff --git a/target/linux/Makefile.in b/target/linux/Makefile.in
index 742fe19..cf430d9 100644
--- a/target/linux/Makefile.in
+++ b/target/linux/Makefile.in
@@ -69,7 +69,7 @@ LINUX26_KERNEL_NAME=$(BINARIES_DIR)/$(LINUX26_FORMAT)$(ROOTFS_STRIPPED_SUFFIX)
 endif
 
 # Version of Linux AFTER patches
-LINUX26_DIR=$(PROJECT_BUILD_DIR)/linux-$(LINUX26_VERSION)
+LINUX26_DIR=$(BUILD_DIR)/linux-$(LINUX26_VERSION)
 
 # for packages that need it
 LINUX_VERSION:=$(LINUX26_VERSION)
@@ -106,10 +106,10 @@ endif # ($(LINUX26_VERSION),$(LINUX_HEADERS_VERSION))
 $(LINUX26_DIR)/.unpacked: $(DL_DIR)/$(LINUX26_SOURCE)
 	rm -rf $(LINUX26_DIR)
 	@echo "*** Unpacking kernel source"
-	$(LINUX26_BZCAT) $(DL_DIR)/$(LINUX26_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+	$(LINUX26_BZCAT) $(DL_DIR)/$(LINUX26_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 ifneq ($(DOWNLOAD_LINUX26_VERSION),$(LINUX26_VERSION))
 	# Rename the dir from the downloaded version to the AFTER patch version
-	mv -f $(PROJECT_BUILD_DIR)/linux-$(DOWNLOAD_LINUX26_VERSION) $(LINUX26_DIR)
+	mv -f $(BUILD_DIR)/linux-$(DOWNLOAD_LINUX26_VERSION) $(LINUX26_DIR)
 endif
 	touch $@
 
diff --git a/target/linux/Makefile.in.advanced b/target/linux/Makefile.in.advanced
index 9de4735..b4774ca 100644
--- a/target/linux/Makefile.in.advanced
+++ b/target/linux/Makefile.in.advanced
@@ -48,7 +48,7 @@ BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
 endif
 
 # Version of Linux AFTER patches
-LINUX26_DIR:=$(PROJECT_BUILD_DIR)/linux-$(LINUX26_VERSION)
+LINUX26_DIR:=$(BUILD_DIR)/linux-$(LINUX26_VERSION)
 
 # for packages that need it
 LINUX_VERSION:=$(LINUX26_VERSION)
@@ -132,7 +132,7 @@ endif
 # --------------
 # UIMAGE
 ifeq ($(LINUX26_FORMAT),uImage)
-LINUX26_MKIMAGE_DIR:=$(PROJECT_BUILD_DIR)/u-boot-tools
+LINUX26_MKIMAGE_DIR:=$(BUILD_DIR)/u-boot-tools
 LINUX26_MKIMAGE_DEP:=$(LINUX26_MKIMAGE_DIR)/mkimage
 ifeq ($(LINUX26_BINLOC),)
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/$(LINUX26_FORMAT)
@@ -200,17 +200,17 @@ endif
 $(LINUX26_DIR)/.unpacked: $(DL_DIR)/$(LINUX26_SOURCE)
 	rm -rf $(LINUX26_DIR)
 	@echo "*** Unpacking kernel source"
-	$(LINUX26_BZCAT) $(DL_DIR)/$(LINUX26_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+	$(LINUX26_BZCAT) $(DL_DIR)/$(LINUX26_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 ifneq ($(DOWNLOAD_LINUX26_VERSION),$(LINUX26_VERSION))
 	# Rename the dir from the downloaded version to the AFTER patch version
-	mv -f $(PROJECT_BUILD_DIR)/linux-$(DOWNLOAD_LINUX26_VERSION) $(LINUX26_DIR)
-	echo $(LINUX26_VERSION_PROBED) > $(PROJECT_BUILD_DIR)/.linux-version
+	mv -f $(BUILD_DIR)/linux-$(DOWNLOAD_LINUX26_VERSION) $(LINUX26_DIR)
+	echo $(LINUX26_VERSION_PROBED) > $(BUILD_DIR)/.linux-version
 endif
 	touch $@
 
 
 # -----------------------------------------------------------------------------
-LINUX26_TARGETS+=$(LINUX26_KERNEL) $(PROJECT_BUILD_DIR)/.linux-version
+LINUX26_TARGETS+=$(LINUX26_KERNEL) $(BUILD_DIR)/.linux-version
 
 ifeq ($(BR2_LINUX_COPYTO_ROOTFS),y)
 LINUX26_TARGETS+=$(TARGET_DIR)/boot/$(LINUX26_KERNEL_NAME)
@@ -381,7 +381,7 @@ $(LINUX26_KERNEL): $(LINUX26_DIR)/$(LINUX26_BINLOC)
 	touch $@
 
 # -----------------------------------------------------------------------------
-$(PROJECT_BUILD_DIR)/autotools-stamps/linux_modules_target_installed: $(LINUX26_DIR)/.depend_done
+$(STAMP_DIR)/linux_modules_target_installed: $(LINUX26_DIR)/.depend_done
 	rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)
 	rm -f $(TARGET_DIR)/sbin/cardmgr
 	# Make Linux depend on modules only if enabled in the .config.
@@ -441,8 +441,8 @@ $(LINUX_COPYTO)/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL)
 	touch $@
 endif
 
-$(PROJECT_BUILD_DIR)/.linux-version: $(LINUX26_KERNEL)
-	echo $(LINUX26_VERSION_PROBED) > $(PROJECT_BUILD_DIR)/.linux-version
+$(BUILD_DIR)/.linux-version: $(LINUX26_KERNEL)
+	echo $(LINUX26_VERSION_PROBED) > $(BUILD_DIR)/.linux-version
 	echo LINUX_MODULES=`$(LINUX26_VERSION_PROBED)`
 
 $(LINUX26_MKIMAGE_DIR)/mkimage:	$(U_BOOT_TOOLS)
@@ -451,9 +451,9 @@ $(LINUX26_MKIMAGE_DIR)/mkimage:	$(U_BOOT_TOOLS)
 
 linux26: $(LINUX26_TARGETS)
 
-linux26-version: $(PROJECT_BUILD_DIR)/.linux-version
+linux26-version: $(BUILD_DIR)/.linux-version
 
-linux26-modules: cross-depmod26 $(PROJECT_BUILD_DIR)/autotools-stamps/linux_modules_target_installed
+linux26-modules: cross-depmod26 $(STAMP_DIR)/linux_modules_target_installed
 
 linux26-source: $(DL_DIR)/$(LINUX26_SOURCE)
 
@@ -470,7 +470,7 @@ linux26-force:
 
 # This has been renamed so we do _NOT_ by default run this on 'make clean'
 linux26clean:
-	rm -f $(PROJECT_BUILD_DIR)/autotools-stamps/linux_modules_target_installed
+	rm -f $(STAMP_DIR)/linux_modules_target_installed
 	rm -f $(LINUX26_KERNEL) $(LINUX26_DIR)/.configured
 	-$(MAKE) PATH=$(TARGET_PATH) -C $(LINUX26_DIR) clean
 
@@ -531,7 +531,7 @@ linux-status:
 	@echo LINUX26_TARGETS=$(LINUX26_TARGETS)
 	@echo LINUX26_VERSION=$(LINUX26_VERSION)
 	@echo LINUX26_MAKE_FLAGS=$(LINUX26_MAKE_FLAGS)
-	@echo PROJECT_BUILD_DIR=$(PROJECT_BUILD_DIR)
+	@echo BUILD_DIR=$(BUILD_DIR)
 	@echo TARGETS=$(TARGETS)
 
 endif
diff --git a/target/romfs/romfs.mk b/target/romfs/romfs.mk
index 2e2470b..6e7fbee 100644
--- a/target/romfs/romfs.mk
+++ b/target/romfs/romfs.mk
@@ -38,20 +38,20 @@ ROMFS_TARGET=$(IMAGE).romfs
 
 romfsroot: host-fakeroot makedevs romfs
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
 endif
 	# Use fakeroot so genromfs believes the previous fakery
-	echo "$(ROMFS_DIR)/genromfs -d $(TARGET_DIR) -f $(ROMFS_TARGET)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	echo "$(ROMFS_DIR)/genromfs -d $(TARGET_DIR) -f $(ROMFS_TARGET)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
 
 romfsroot-source: romfs-source
 
diff --git a/target/squashfs/squashfsroot.mk b/target/squashfs/squashfsroot.mk
index 3ff0f3b..ebb0cd2 100644
--- a/target/squashfs/squashfsroot.mk
+++ b/target/squashfs/squashfsroot.mk
@@ -48,24 +48,24 @@ SQUASHFS_TARGET:=$(IMAGE).squashfs
 
 squashfsroot: host-fakeroot makedevs squashfs
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
 endif
 	# Use fakeroot so mksquashfs believes the previous fakery
 	echo "$(SQUASHFS_DIR)/squashfs-tools/mksquashfs " \
 		    "$(TARGET_DIR) $(SQUASHFS_TARGET) " \
 		    "-noappend $(SQUASHFS_ENDIANNESS)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
 	chmod 0644 $(SQUASHFS_TARGET)
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
 
 squashfsroot-source: squashfs-source
 
diff --git a/target/tar/tarroot.mk b/target/tar/tarroot.mk
index a62f5bf..a7e95df 100644
--- a/target/tar/tarroot.mk
+++ b/target/tar/tarroot.mk
@@ -25,20 +25,20 @@ ROOTFS_TAR_COPYTO:=$(call qstrip,$(BR2_TARGET_ROOTFS_TAR_COPYTO))
 
 tarroot: host-fakeroot makedevs
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 endif
 	# Use fakeroot so tar believes the previous fakery
 	echo "tar -c$(TAR_OPTS)f $(TAR_TARGET) -C $(TARGET_DIR) ." \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 ifneq ($(TAR_COMPRESSOR),)
 	-rm -f $(TAR_TARGET).$()
 	PATH="$(STAGING_DIR)/sbin:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/sbin:$(STAGING_DIR)/usr/bin:$(PATH)" $(TAR_COMPRESSOR) $(TAR_TARGET) > $(TAR_TARGET).$(TAR_COMPRESSOR_EXT)
@@ -46,7 +46,7 @@ endif
 ifneq ($(ROOTFS_TAR_COPYTO),)
 	$(Q)cp -f $(TAR_TARGET) $(ROOTFS_TAR_COPYTO)
 endif
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
 
 tarroot-source:
 
diff --git a/target/u-boot/Makefile.in b/target/u-boot/Makefile.in
index 3dc78b1..6987737 100644
--- a/target/u-boot/Makefile.in
+++ b/target/u-boot/Makefile.in
@@ -8,11 +8,11 @@ U_BOOT_VERSION:=$(call qstrip,$(BR2_UBOOT_VERSION))
 U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
 
 U_BOOT_SITE:=$(call qstrip,$(BR2_U_BOOT_SITE))
-U_BOOT_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
-U_BOOT_PATCH_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)-patches
+U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
+U_BOOT_PATCH_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)-patches
 U_BOOT_CAT:=$(BZCAT)
 U_BOOT_BIN:=u-boot.bin
-U_BOOT_TARGET_BIN:=$(PROJECT)-u-boot-$(U_BOOT_VERSION)-$(DATE).bin
+U_BOOT_TARGET_BIN:=u-boot-$(U_BOOT_VERSION)-$(DATE).bin
 
 U_BOOT_TOOLS_BIN:=mkimage
 U_BOOT_TOOLS:=$(STAGING_DIR)/usr/bin/$(U_BOOT_TOOLS_BIN)
@@ -66,7 +66,7 @@ $(DL_DIR)/$(U_BOOT_SOURCE):
 
 $(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE)
 	$(U_BOOT_CAT) $(DL_DIR)/$(U_BOOT_SOURCE) \
-		| tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+		| tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 	mkdir -p $(U_BOOT_DIR)
 	touch $@
 
@@ -102,9 +102,6 @@ ifdef BR2_TARGET_UBOOT_DEFAULT_ENV
 	@echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
 	$(call insert_define, DATE, $(DATE))
 	$(call insert_define, CONFIG_LOAD_SCRIPTS, 1)
-ifneq ($(strip $(BR2_PROJECT)),"")
-	$(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT))
-endif
 endif # BR2_TARGET_UBOOT_DEFAULT_ENV
 ifdef BR2_TARGET_UBOOT_NETWORK
 ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"")
@@ -194,7 +191,7 @@ $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
 
 u-boot: $(U_BOOT_TARGETS)
 
-u-boot-autoscript: $(U_BOOT_AUTOSCRIPT).$(PROJECT)
+u-boot-autoscript: $(U_BOOT_AUTOSCRIPT).img
 
 u-boot-clean:
 	-$(MAKE) -C $(U_BOOT_DIR) clean
@@ -249,7 +246,7 @@ endif
 	echo setargs >> $(U_BOOT_AUTOSCRIPT)
 	echo saveenv >> $(U_BOOT_AUTOSCRIPT)
 
-$(U_BOOT_AUTOSCRIPT).$(PROJECT): $(U_BOOT_AUTOSCRIPT) $(MKIMAGE)
+$(U_BOOT_AUTOSCRIPT).img: $(U_BOOT_AUTOSCRIPT) $(MKIMAGE)
 	$(MKIMAGE) -A $(ARCH) \
 				-O linux \
 				-T script \
@@ -258,7 +255,7 @@ $(U_BOOT_AUTOSCRIPT).$(PROJECT): $(U_BOOT_AUTOSCRIPT) $(MKIMAGE)
 				-e 0 \
 				-n "autoscr config" \
 				-d $(U_BOOT_AUTOSCRIPT) \
-				$(U_BOOT_AUTOSCRIPT).$(PROJECT)
+				$(U_BOOT_AUTOSCRIPT).img
 
 
 
diff --git a/target/ubifs/ubifsroot.mk b/target/ubifs/ubifsroot.mk
index c09c981..e73d4f9 100644
--- a/target/ubifs/ubifsroot.mk
+++ b/target/ubifs/ubifsroot.mk
@@ -77,21 +77,21 @@ endif
 
 $(UBIFS_BASE): host-fakeroot makedevs mkfs.ubifs
 	# Use fakeroot to pretend all target binaries are owned by root
-	rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
-	touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
-	cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
-	echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+	rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+	touch $(BUILD_DIR)/.fakeroot.00000
+	cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+	echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
 ifneq ($(TARGET_DEVICE_TABLE),)
 	# Use fakeroot to pretend to create all needed device nodes
 	echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
-		>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+		>> $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
 endif
 	# Use fakeroot so mkfs.ubifs believes the previous fakery
 	echo "$(MKFS_UBIFS_DIR)/mkfs.ubifs -d $(TARGET_DIR) " \
-		"$(UBIFS_OPTS) -o $(UBIFS_BASE)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
-	chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
-	$(HOST_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
-	- at rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+		"$(UBIFS_OPTS) -o $(UBIFS_BASE)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+	chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+	$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
+	- at rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
 
 ifneq ($(UBIFS_ROOTFS_COMPRESSOR),)
 $(UBIFS_BASE).$(UBIFS_ROOTFS_COMPRESSOR_EXT): $(UBIFS_ROOTFS_COMPRESSOR_PREREQ) $(UBIFS_BASE)
diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk
index 131c9bd..dde609b 100644
--- a/toolchain/gcc/gcc-uclibc-3.x.mk
+++ b/toolchain/gcc/gcc-uclibc-3.x.mk
@@ -324,7 +324,7 @@ endif
 	mkdir -p $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/sbin
 	touch $@
 
-$(PROJECT_BUILD_DIR)/autotools-stamps/gcc_libs_target_installed: $(GCC_BUILD_DIR2)/.installed
+$(STAMP_DIR)/gcc_libs_target_installed: $(GCC_BUILD_DIR2)/.installed
 ifeq ($(BR2_GCC_SHARED_LIBGCC),y)
 	# These are in /lib, so...
 	rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so*
@@ -354,7 +354,7 @@ endif
 
 cross_compiler:=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc
 cross_compiler gcc: gcc-config $(GCC_BUILD_DIR2)/.installed \
-	$(PROJECT_BUILD_DIR)/autotools-stamps/gcc_libs_target_installed \
+	$(STAMP_DIR)/gcc_libs_target_installed \
 	$(GCC_TARGETS)
 
 gcc-source: $(DL_DIR)/$(GCC_SOURCE)
@@ -379,7 +379,7 @@ gcc-dirclean: gcc_initial-dirclean
 #############################################################
 GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target
 
-$(GCC_BUILD_DIR3)/.prepared: $(PROJECT_BUILD_DIR)/autotools-stamps/gcc_libs_target_installed $(GCC_TARGET_PREREQ)
+$(GCC_BUILD_DIR3)/.prepared: $(STAMP_DIR)/gcc_libs_target_installed $(GCC_TARGET_PREREQ)
 	mkdir -p $(GCC_BUILD_DIR3)
 	touch $@
 
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index e9249c1..4129152 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -352,7 +352,7 @@ endif
 	mkdir -p $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/sbin
 	touch $@
 
-$(PROJECT_BUILD_DIR)/autotools-stamps/gcc_libs_target_installed: $(GCC_BUILD_DIR2)/.installed
+$(STAMP_DIR)/gcc_libs_target_installed: $(GCC_BUILD_DIR2)/.installed
 ifeq ($(BR2_GCC_SHARED_LIBGCC),y)
 	# These are in /lib, so...
 	rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so*
@@ -381,7 +381,7 @@ endif
 cross_compiler:=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc
 cross_compiler gcc: uclibc-configured binutils gcc_initial \
 	$(LIBFLOAT_TARGET) uclibc $(GCC_BUILD_DIR2)/.installed \
-	$(PROJECT_BUILD_DIR)/autotools-stamps/gcc_libs_target_installed \
+	$(STAMP_DIR)/gcc_libs_target_installed \
 	$(GCC_TARGETS)
 
 gcc-source: $(DL_DIR)/$(GCC_SOURCE)
@@ -403,7 +403,7 @@ gcc-dirclean: gcc_initial-dirclean
 #############################################################
 GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target
 
-$(GCC_BUILD_DIR3)/.prepared: $(PROJECT_BUILD_DIR)/autotools-stamps/gcc_libs_target_installed $(GCC_TARGET_PREREQ)
+$(GCC_BUILD_DIR3)/.prepared: $(STAMP_DIR)/gcc_libs_target_installed $(GCC_TARGET_PREREQ)
 	mkdir -p $(GCC_BUILD_DIR3)
 	touch $@
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 1/6] Remove the "project" feature Thomas Petazzoni
@ 2009-09-16 21:07 ` Thomas Petazzoni
  2009-09-16 22:00   ` Thiago A. Corrêa
  2009-09-16 21:07 ` [Buildroot] [PATCH 3/6] By default, put the output in an output/ directory Thomas Petazzoni
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

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>
---
 Makefile |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 8adaff4..cfa5778 100644
--- a/Makefile
+++ b/Makefile
@@ -32,14 +32,6 @@ noconfig_targets:=menuconfig xconfig config oldconfig randconfig \
 	defconfig allyesconfig allnoconfig release tags \
 	source-check help
 
-
-# Use shell variables, if defined
-ifneq ($(BUILDROOT_LOCAL),)
-BR2_LOCAL:=$(BUILDROOT_LOCAL)
-else
-BR2_LOCAL:=$(TOPDIR)/local
-endif
-
 # Strip quotes and then whitespaces
 qstrip=$(strip $(subst ",,$(1)))
 #"))
@@ -52,20 +44,13 @@ space:=$(empty) $(empty)
 # $(shell find . -name *_defconfig |sed 's/.*\///')
 # Pull in the user's configuration file
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
-ifeq ($(BOARD),)
-# if "make BOARD=xyz" command
 -include .config
-else
-# if "make" command
--include $(BR2_LOCAL)/$(BOARD)/$(BOARD).config
-endif
 endif
 
 # Override BR2_DL_DIR if shell variable defined
 ifneq ($(BUILDROOT_DL_DIR),)
 BR2_DL_DIR:=$(BUILDROOT_DL_DIR)
 endif
-LOCAL:=$(BR2_LOCAL)
 
 # To put more focus on warnings, be less verbose as default
 # Use 'make V=1' to see the full commands
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 3/6] By default, put the output in an output/ directory
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 1/6] Remove the "project" feature Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature Thomas Petazzoni
@ 2009-09-16 21:07 ` Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 4/6] Remove BR2_TOPDIR_PREFIX and BR2_TOPDIR_SUFFIX Thomas Petazzoni
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

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>
---
 Makefile |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index cfa5778..8b07786 100644
--- a/Makefile
+++ b/Makefile
@@ -217,21 +217,18 @@ ZCAT:=$(call qstrip,$(BR2_ZCAT))
 BZCAT:=$(call qstrip,$(BR2_BZCAT))
 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
-# Buildroot supports building out of tree similarly to the Linux kernel.
-# To use, add O= to the make command line (make O=/tmp/build)
-BASE_DIR:=$(shell pwd)
-ifdef O
-ifeq ("$(origin O)", "command line")
-BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
-$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
-
+ifneq ("$(origin O)", "command line")
+O:=output
+else
 # other packages might also support Linux-style out of tree builds
 # with the O=<dir> syntax (E.G. Busybox does). As make automatically
 # forwards command line variable definitions those packages get very
 # confused. Fix this by telling make to not do so
 MAKEOVERRIDES =
 endif
-endif
+
+BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
+$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
 
 TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_
 TOPDIR_SUFFIX:=_$(call qstrip,$(BR2_TOPDIR_SUFFIX))
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 4/6] Remove BR2_TOPDIR_PREFIX and BR2_TOPDIR_SUFFIX
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2009-09-16 21:07 ` [Buildroot] [PATCH 3/6] By default, put the output in an output/ directory Thomas Petazzoni
@ 2009-09-16 21:07 ` Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 5/6] Rename the output directories Thomas Petazzoni
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

The same effect can be done using out-of-tree build with O=

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Config.in           |   18 ------------------
 Makefile            |   11 +----------
 package/Makefile.in |    6 +++---
 3 files changed, 4 insertions(+), 31 deletions(-)

diff --git a/Config.in b/Config.in
index 146bb17..2573643 100644
--- a/Config.in
+++ b/Config.in
@@ -106,24 +106,6 @@ config BR2_FPU_SUFFIX
 	  the "_nofpu" suffix will be added to the toolchain build
 	  directory name and to any rootfs image name
 
-config BR2_TOPDIR_PREFIX
-	string "Custom build dir prefix"
-	default ""
-	help
-	  Add a custom string to the beginning of the build directories.
-
-	  build_ARCH -> [PREFIX]_build_ARCH
-	  toolchain_build_ARCH -> [PREFIX]_toolchain_build_ARCH
-
-config BR2_TOPDIR_SUFFIX
-	string "Custom build dir suffix"
-	default ""
-	help
-	  Add a custom string to the end of the build directories.
-
-	  build_ARCH -> build_ARCH_[SUFFIX]
-	  toolchain_build_ARCH -> toolchain_build_ARCH_[SUFFIX]
-
 config BR2_GNU_BUILD_SUFFIX
 	string "GNU build hostname suffix"
 	default "pc-linux-gnu"
diff --git a/Makefile b/Makefile
index 8b07786..d493200 100644
--- a/Makefile
+++ b/Makefile
@@ -230,21 +230,12 @@ endif
 BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
 $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
 
-TOPDIR_PREFIX:=$(call qstrip,$(BR2_TOPDIR_PREFIX))_
-TOPDIR_SUFFIX:=_$(call qstrip,$(BR2_TOPDIR_SUFFIX))
-ifeq ($(TOPDIR_PREFIX),_)
-TOPDIR_PREFIX:=
-endif
-ifeq ($(TOPDIR_SUFFIX),_)
-TOPDIR_SUFFIX:=
-endif
-
 DL_DIR=$(call qstrip,$(BR2_DL_DIR))
 ifeq ($(DL_DIR),)
 DL_DIR:=$(BASE_DIR)/dl
 endif
 
-BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
+BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
 
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
diff --git a/package/Makefile.in b/package/Makefile.in
index 0ae5bdb..093108d 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -112,7 +112,7 @@ COND_ARCH_FPU_SUFFIX:=
 endif
 
 ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
-TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
+TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)
 
 # Quotes are needed for spaces et al in path components.
 TARGET_PATH="$(TOOL_BUILD_DIR)/bin:$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(PATH)"
@@ -124,8 +124,8 @@ KERNEL_CROSS=$(TARGET_CROSS)
 else
 TOOLCHAIN_EXTERNAL_PREFIX:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
 TOOLCHAIN_EXTERNAL_PATH:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
-#TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX)
-TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
+#TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)
 TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)"
 #IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX)
 IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX)
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 5/6] Rename the output directories
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2009-09-16 21:07 ` [Buildroot] [PATCH 4/6] Remove BR2_TOPDIR_PREFIX and BR2_TOPDIR_SUFFIX Thomas Petazzoni
@ 2009-09-16 21:07 ` Thomas Petazzoni
  2009-09-16 21:07 ` [Buildroot] [PATCH 6/6] documentation: update after major changes Thomas Petazzoni
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

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>
---
 Config.in           |    4 ++--
 Makefile            |   10 +++++-----
 package/Makefile.in |    5 ++---
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/Config.in b/Config.in
index 2573643..9897a17 100644
--- a/Config.in
+++ b/Config.in
@@ -88,7 +88,7 @@ source	"target/device/Config.in.mirrors"
 
 config BR2_STAGING_DIR
 	string "Toolchain and header file location?"
-	default "$(BUILD_DIR)/staging_dir"
+	default "$(BASE_DIR)/staging"
 	help
 	  This is the location where the toolchain will be installed.  The
 	  toolchain will not work if it is moved from this location.
@@ -97,7 +97,7 @@ config BR2_STAGING_DIR
 	  will be used.
 
 	  Most people will leave this set to the default value of
-	  "$(BUILD_DIR)/staging_dir".
+	  "$(BASE_DIR)/staging".
 
 config BR2_FPU_SUFFIX
 	bool "Add '_nofpu' suffix for softfloat toolchains"
diff --git a/Makefile b/Makefile
index d493200..c7697c9 100644
--- a/Makefile
+++ b/Makefile
@@ -235,20 +235,20 @@ ifeq ($(DL_DIR),)
 DL_DIR:=$(BASE_DIR)/dl
 endif
 
-BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
+BUILD_DIR:=$(BASE_DIR)/build
 
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
 STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
 
 # packages compiled for the host goes here
-HOST_DIR:=$(BUILD_DIR)/host_dir
+HOST_DIR:=$(BASE_DIR)/host
 
 # stamp (dependency) files go here
-STAMP_DIR:=$(BUILD_DIR)/stamps
+STAMP_DIR:=$(BASE_DIR)/stamps
 
-BINARIES_DIR:=$(BASE_DIR)/binaries/
-TARGET_DIR:=$(BUILD_DIR)/target_dir
+BINARIES_DIR:=$(BASE_DIR)/images
+TARGET_DIR:=$(BASE_DIR)/target
 
 # define values for prepatched source trees for toolchains
 VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
diff --git a/package/Makefile.in b/package/Makefile.in
index 093108d..1c21924 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -112,7 +112,7 @@ COND_ARCH_FPU_SUFFIX:=
 endif
 
 ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
-TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)
+TOOL_BUILD_DIR=$(BASE_DIR)/toolchain
 
 # Quotes are needed for spaces et al in path components.
 TARGET_PATH="$(TOOL_BUILD_DIR)/bin:$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(PATH)"
@@ -124,8 +124,7 @@ KERNEL_CROSS=$(TARGET_CROSS)
 else
 TOOLCHAIN_EXTERNAL_PREFIX:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
 TOOLCHAIN_EXTERNAL_PATH:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
-#TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX)
-TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)
+TOOL_BUILD_DIR=$(BASE_DIR)/toolchain
 TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)"
 #IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX)
 IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX)
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 6/6] documentation: update after major changes
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2009-09-16 21:07 ` [Buildroot] [PATCH 5/6] Rename the output directories Thomas Petazzoni
@ 2009-09-16 21:07 ` Thomas Petazzoni
  2009-09-19 15:27 ` [Buildroot] [pull request] Buildroot cleanup, v2 Peter Korsgaard
  2009-09-22 22:16 ` H Hartley Sweeten
  7 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 21:07 UTC (permalink / raw)
  To: buildroot

 * Remove the huge section describing the design of the removed
   "project" feature

 * Update all references to the output directory hierarchy to match
   the new one

 * Add new sections on how to rebuild single packages and how to
   create board support

 * Other updates, clarifications, reorganizations

 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 docs/buildroot.html |  669 ++++++++++++++++++++-------------------------------
 1 files changed, 265 insertions(+), 404 deletions(-)

diff --git a/docs/buildroot.html b/docs/buildroot.html
index 8cd705d..45876d7 100644
--- a/docs/buildroot.html
+++ b/docs/buildroot.html
@@ -24,32 +24,30 @@
       <li><a href="#about">About Buildroot</a></li>
       <li><a href="#download">Obtaining Buildroot</a></li>
       <li><a href="#using">Using Buildroot</a></li>
-      <li><a href="#custom_targetfs">Customizing the target filesystem</a></li>
+      <li><a href="#custom_targetfs">Customizing the generated target filesystem</a></li>
       <li><a href="#custom_busybox">Customizing the Busybox
       configuration</a></li>
       <li><a href="#custom_uclibc">Customizing the uClibc
       configuration</a></li>
+      <li><a href="#rebuilding_packages">Understanding how to rebuild packages</a></li>
       <li><a href="#buildroot_innards">How Buildroot works</a></li>
-      <li><a href="#multi_project">Building several projects in the
-      same buildroot source tree</a></li>
       <li><a href="#using_toolchain">Using the uClibc toolchain
       outside Buildroot</a></li>
       <li><a href="#external_toolchain">Use an external toolchain</a></li>
       <li><a href="#downloaded_packages">Location of downloaded packages</a>
       </li>
-      <li><a href="#adapting_rootfs">Adapting the rootfs for own binaries</a></li>
       <li><a href="#add_software">Extending Buildroot with more
       Software</a></li>
+      <li><a href="#board_support">Creating your own board support</a></li>
       <li><a href="#links">Resources</a></li>
     </ul>
 
     <h2><a name="about" id="about"></a>About Buildroot</h2>
 
-    <p>Buildroot is a set of Makefiles and patches that allow to easily
-    generate both a cross-compilation toolchain and a root filesystem for your
-    target. The cross-compilation toolchain uses uClibc (<a href=
-    "http://www.uclibc.org/">http://www.uclibc.org/</a>), a tiny C standard
-    library. </p>
+    <p>Buildroot is a set of Makefiles and patches that allow to
+    easily generate a cross-compilation toolchain, a root filesystem
+    and a Linux kernel image for your target. Buildroot can be used
+    for either one, two or all of these options, independently.</p>
 
     <p>Buildroot is useful mainly for people working with embedded systems.
     Embedded systems often use processors that are not the regular x86
@@ -169,10 +167,6 @@
     <p>For each entry of the configuration tool, you can find associated help
     that describes the purpose of the entry. </p>
 
-    <p>One of the key configuration items is the <code>PROJECT</code> which
-    determines where some board specific packages are built and where the
-    results are stored. </p>
-
     <p>Once everything is configured, the configuration tool has generated a
     <code>.config</code> file that contains the description of your
     configuration. It will be used by the Makefiles to do what's needed. </p>
@@ -184,48 +178,51 @@
  $ make
 </pre>
 
-    <p>This command will download, configure and compile all the selected
-    tools, and finally generate a target filesystem. The target filesystem will
-    be named <code>root_fs_ARCH.EXT</code> where <code>ARCH</code> is your
-    architecture and <code>EXT</code> depends on the type of target filesystem
-    selected in the <code>Target options</code> section of the configuration
-    tool.
-    The file is stored in the "binaries/<code>$(PROJECT)</code>/" directory</p>
-
-    <h3><a name="local_board_support" id="local_board_support"></a>
-    Creating your own board support</h3>
-
-    <p>Once a package has been unpacked, it is possible to manually update
-    configuration files. Buildroot can automatically save the configuration
-    of buildroot, linux, busybox, uclibc and u-boot in "local/$(PROJECT) by
-    using the command:
-    </p>
-
-<pre>
- $ make saveconfig
-</pre>
+    <p>This command will download, configure and compile all the
+    selected tools, and finally generate a toolchain, a root
+    filesystem image and a kernel image (or only one of these
+    elements, depending on the configuration).</p>
 
-     <p>Once a buildroot configuration has been created by saveconfig,
-     the default "$(TOPDIR)/.config" file can be overridden by</p>
+    <p>Buildroot output is stored in a single directory,
+    <code>output/</code>. This directory contains several
+    subdirectories:</p>
 
-<pre>
- $ make BOARD=&lt;project&gt;
-</pre>
-
-    <p>Buildroot will then use "local/&lt;project&gt;/&lt;project&gt;.config"
-    instead of ".config". </p>
-
-    <p>If you want to modify your board, you can copy the project configuration
-     file to ".config" by using the command:</p>
-
-<pre>
- $ make BOARD=&lt;project&gt; getconfig
-</pre>
+    <ul>
 
-    <p>You can share your custom board support directory between several buildroot trees
-    by setting the environment variable <code>BUILDROOT_LOCAL</code> to this directory,
-    </p>
+      <li><code>images/</code> where all the images (kernel image,
+      bootloader and root filesystem images) are stored.</li>
+
+      <li><code>build/</code> where all the components are built
+      (tools needed to run Buildroot on the host and packages compiled
+      for the target). The <code>build/</code> directory contains one
+      subdirectory for each of these components. The toolchain
+      components are however built in a separate directory.</li>
+
+      <li><code>staging/</code> which contains a hierarchy similar to
+      a root filesystem hierarchy. This directory contains the
+      installation of cross-compilation toolchain and all the
+      userspace packages selected for the target. However, this
+      directory is <i>not</i> intended to be the root filesystem for
+      the target: it contains a lot of development files, unstripped
+      binaries and libraries, that make it far too big for an embedded
+      system.</li>
+
+      <li><code>target/<code> which contains the root filesystem for
+      the target. Only the necessary files to run the libraries and
+      applications are installed in this directory. However,
+      <code>target/dev/</code> doesn't contain the device files, as
+      creating device files requires the root access. The device files
+      only exist in the root filesystem image produced by
+      Buildroot.</li>
+
+      <li><code>host/</code> contains the installation of tools
+      compiled for the host that are needed for the proper execution
+      of Buildroot.</li>
+
+      <li><code>toolchain/</code> contains the build directories for
+      the various components of the cross-compilation toolchain.</li>
 
+    </ul>
 
     <h3><a name="offline_builds" id="offline_builds"></a>
     Offline builds</h3>
@@ -259,13 +256,18 @@
     <p>Buildroot optionally honors some environment variables that are passed
     to <code>make</code> :</p>
     <ul>
-    <li>HOSTCXX</li>
-    <li>HOSTCC</li>
-    <li>UCLIBC_CONFIG_FILE=&lt;path/to/.config&gt;</li>
-    <li>BUSYBOX_CONFIG_FILE=&lt;path/to/.config&gt;</li>
-    <li>BUILDROOT_COPYTO</li>
-    <li>BUILDROOT_DL_DIR</li>
-    <li>BUILDROOT_LOCAL</li>
+    <li><code>HOSTCXX</code>, the host C++ compiler to use</li>
+    <li><code>HOSTCC</code>, the host C compiler to use</li>
+    <li><code>UCLIBC_CONFIG_FILE=&lt;path/to/.config&gt;</code>, path
+    to the uClibc configuration file to use to compile uClibc if an
+    internal toolchain is selected</li>
+    <li><code>BUSYBOX_CONFIG_FILE=&lt;path/to/.config&gt;</code>, path
+    to the Busybox configuration file</li>
+    <li><code>BUILDROOT_COPYTO</code>, an additional location at which
+    the binary images of the root filesystem, kernel, etc. built by
+    Buildroot are copied</li>
+    <li><code>BUILDROOT_DL_DIR</code> to override the directory in
+    which Buildroot stores/retrieves downloaded files</li>
     </ul>
 
     <p>An example that uses config files located in the toplevel directory and
@@ -289,43 +291,14 @@ $ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD
 $ export BUILDROOT_COPYTO=/tftpboot
 </pre>
 
-
-    <h3><a name="helper_completion" id="helper_completion"></a>
-    Using auto-completion</h3>
-
-    <p>If you are lazy enough that you don't want to type the entire <i>make
-    menuconfig</i> command line, you can enable auto-completion in your shell.
-    Here is how you can do that using <i>bash</i>:</p>
-<pre>
-$ complete -W menuconfig make
-</pre>
-
-    <p>Then just enter the beginning of the line, and ask <i>bash</i> to
-    complete it for you by pressing the <i>TAB</i> key:</p>
-<pre>
-$ make me&lt;TAB&gt;
-</pre>
-
-    <p>will result in <i>bash</i> to append <i>nuconfig</i> for you!</p>
-
-    <p>Alternatively, some distributions (of which Debian and Mandriva are but
-    an example) have more powerful make completion. Depending on you
-    distribution, you may have to install a package to enable completion. Under
-    Mandriva, this is <i>bash-completion</i>, while Debian ships it as part of
-    the <i>bash</i> package.</p>
-
-    <p>Other shells, such as <i>zsh</i>, also have completion facilities. See
-    the documentation for your shell.</p>
-
     <h2><a name="custom_targetfs" id="custom_targetfs"></a>Customizing the
-    target filesystem</h2>
+    generated target filesystem</h2>
 
     <p>There are a few ways to customize the resulting target filesystem:</p>
 
     <ul>
       <li>Customize the target filesystem directly, and rebuild the image. The
-      target filesystem is available under <code>project_build_ARCH/root/</code>
-      where <code>ARCH</code> is the chosen target architecture.
+      target filesystem is available under <code>output/target/</code>.
       You can simply make your changes here, and run make afterwards, which will
       rebuild the target filesystem image. This method allows to do everything
       on the target filesystem, but if you decide to completely rebuild your
@@ -347,14 +320,31 @@ $ make me&lt;TAB&gt;
       inside the skeleton because it contains symlinks that would be broken
       otherwise. <br />
       These customizations are deployed into
-      <code>project_build_ARCH/root/</code> just before the actual image
+      <code>output/target/</code> just before the actual image
       is made. So simply rebuilding the image by running
       make should propagate any new changes to the image. </li>
 
-      <li>When configuring the build system, using <code>make
-      menuconfig</code> or <code>make xconfig</code>, you can specify
-      the contents of the /etc/hostname and /etc/issue (the welcome
-      banner) in the <code>PROJECT</code> section</li>
+      <li>Add support for your own target in Buildroot so that you
+      have your own target skeleton, see <a href="#board_support">this
+      section</a> for details</li>
+
+      <li>In Buildroot configuration, you can specify the path to a
+      post-build script that gets called <i>after</i> Buildroot built
+      all the selected software, but <i>before</i> the the rootfs
+      packages are assembled. The destination root filesystem folder
+      is given as first argument to this script, and this script can
+      then be used to copy programs, static data or any other needed
+      file to your target filesystem.<br/>You should, however, use
+      that feature with care. Whenever you find that a certain package
+      generates wrong or unneeded files, you should rather fix than
+      package than working around it with a cleanup script.</li>
+
+      <li>A special package, <i>customize</i>, stored in
+      <code>package/customize</code> can be used. You can put all the
+      files that you want to see in the final target root filesystem
+      in <code>package/customize/source</code>, and then enable this
+      special package from the configuration system.</li>
+
     </ul>
 
     <h2><a name="custom_busybox" id="custom_busybox"></a>Customizing the
@@ -423,6 +413,73 @@ $ make me&lt;TAB&gt;
     <p>If you want to use an existing config file for uclibc, then see
     section <a href="#environment_variables">environment variables</a>. </p>
 
+    <h2><a name="#rebuilding_packages"
+    id="rebuilding_packages">Understanding how to rebuild
+    packages</a></h2>
+
+    <p>One of the most common question and issue about Buildroot
+    encountered by users is how to rebuild a given package or how to
+    remove a package without rebuilding everything from scratch.</p>
+
+    <p>Removing a package is currently unsupported by Buildroot
+    without rebuilding from scratch. This is because Buildroot doesn't
+    keep track of which package installs what files in the
+    <code>output/staging</code> and <code>output/target</code>
+    directories. However, implement clean package removal is on the
+    TODO-list of Buildroot developers.</p>
+
+    <p>To rebuild a single package from scratch, the easiest way is to
+    remove its build directory in <code>output/build</code>. Buildroot
+    will then re-extract, re-configure, re-compile and re-install this
+    package from scratch.</p>
+
+    <p>However, if you don't want to rebuild the package completely
+    from scratch, a better understanding of the Buildroot internals is
+    needed. Internally, to keep track of which steps have been done
+    and which steps remains to be done, Buildroot maintains stamps
+    files (i.e, empty files that just tell whether this or this action
+    has been done). The problem is that these stamps files are not
+    uniformely named and handled by the different packages, so some
+    understanding of the particular package is needed.</p>
+
+    <p>For packages relying on the <i>autotools</i> Buildroot
+    infrastructure (see <a href="#add_software">this section</a> for
+    details), the following stamps files are interesting:</p>
+
+    <ul>
+
+      <li><code>output/build/packagename-version/.stamp_configured</code>. If
+      removed, Buildroot will trigger the recompilation of the package
+      from the configuration step (execution of
+      <code>./configure</code>)</li>
+
+      <li><code>output/build/packagename-version/.stamp_built</code>. If
+      removed, Buildroot will trigger the recompilation of the package
+      from the compilation step (execution of <code>make</code>)</li>
+
+    </ul>
+
+    <p>For other packages, an analysis of the specific
+    <i>package.mk</i> file is needed. For example, the zlib Makefile
+    looks like:</p>
+
+    <pre>
+$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
+        (cd $(ZLIB_DIR); rm -rf config.cache; \
+                        [...]
+        )
+        touch $@
+
+$(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
+        $(MAKE) -C $(ZLIB_DIR) all libz.a
+        touch -c $@
+    </pre>
+
+    <p>So, if you want to trigger the reconfiguration, you need to
+    remove <code>output/build/zlib-version/.configured</code> and if
+    you want to trigger only the recompilation, you need to remove
+    <code>output/build/zlib-version/libz.a</code>.</p>
+
     <h2><a name="buildroot_innards" id="buildroot_innards"></a>How Buildroot
     works</h2>
 
@@ -477,334 +534,154 @@ $ make me&lt;TAB&gt;
     configuration is done) :</p>
 
     <ol>
-      <li>Create the download directory (<code>dl/</code> by default). This is
-      where the tarballs will be downloaded. It is interesting to know that the
-      tarballs are in this directory because it may be useful to save them
-      somewhere to avoid further downloads. </li>
-
-      <li>Create the shared build directory (<code>build_ARCH/</code> by
-      default, where <code>ARCH</code> is your architecture). This is where all
-      non configurable user-space tools will be compiled.When building two or
-      more targets using the same architecture, the first build will go through
-      the full download, configure, make process, but the second and later
-      builds will only copy the result from the first build to its project
-      specific target directory significantly speeding up the build process</li>
-
-      <li>Create the project specific build directory
-      (<code>project_build_ARCH/$(PROJECT)</code> by default, where
-      <code>ARCH</code> is your architecture). This is where all configurable
-      user-space tools will be compiled. The project specific build directory
-      is neccessary, if two different targets needs to use a specific package,
-      but the packages have different configuration for both targets. Some
-      examples of packages built in this directory are busybox and linux.
-      </li>
 
-      <li>Create the project specific result directory
-      (<code>binaries/$(PROJECT)</code> by default, where <code>ARCH</code>
-      is your architecture). This is where the root filesystem images are
-      stored, It is also used to store the linux kernel image and any
-      utilities, boot-loaders etc. needed for a target.
-      </li>
+      <li>Create all the output directories: <code>staging</code>,
+      <code>target</code>, <code>build</code>, <code>stamps</code>,
+      etc. in the output directory (<code>output/</code> by default,
+      another value can be specified using <code>O=</code>)</li>
+
+      <li>Generate all the targets listed in the
+      <code>BASE_TARGETS</code> variable. When an internal toolchain
+      is used, it means generating the cross-compilation
+      toolchain. When an external toolchain is used, it means checking
+      the features of the external toolchain and importing it into the
+      Buildroot environment.</li>
+
+      <li>Generate all the targets listed in the <code>TARGETS</code>
+      variable. This variable is filled by all the individual
+      components Makefiles. So, generating all these targets will
+      trigger the compilation of the userspace packages (libraries,
+      programs), the kernel, the bootloader and the generation of the
+      root filesystem images, depending on the configuration.</li>
 
-      <li>Create the toolchain build directory
-      (<code>toolchain_build_ARCH/</code> by default, where <code>ARCH</code>
-      is your architecture). This is where the cross compilation toolchain will
-      be compiled. </li>
-
-      <li>Setup the staging directory (<code>build_ARCH/staging_dir/</code> by
-      default). This is where the cross-compilation toolchain will be
-      installed. If you want to use the same cross-compilation toolchain for
-      other purposes, such as compiling third-party applications, you can add
-      <code>build_ARCH/staging_dir/usr/bin</code> to your PATH, and then use
-      <code>arch-linux-gcc</code> to compile your application. In order to
-      setup this staging directory, it first removes it, and then it creates
-      various subdirectories and symlinks inside it. </li>
-
-      <li>Create the target directory (<code>project_build_ARCH/root/</code> by
-      default) and the target filesystem skeleton. This directory will contain
-      the final root filesystem. To setup it up, it first deletes it, then it
-      uncompress the <code>target/generic/skel.tar.gz</code> file to create the
-      main subdirectories and symlinks, copies the skeleton available in
-      <code>target/generic/target_skeleton</code> and then removes useless
-      <code>.svn/CVS</code> directories. </li>
-
-      <li>Add the <code>TARGETS</code> dependency. This should generally check
-      if the configuration option for this package is enabled, and if so then
-      &quot;subscribe&quot; this package to be compiled by adding it to the
-      TARGETS global variable. </li>
     </ol>
 
-    <h2><a name="multi_project" id="multi_project"></a>Building several
-      projects in the same buildroot source tree</h2>
-
-    <p><i>Note: the contents of this section are obsolete since this
-    feature has been implemented.</i></p>
-
-    <h3>Background</h3>
-
-    <p>Buildroot has always supported building several projects in the same
-    tree if each project was for a different architecture. </p>
+    <h2><a name="board_support" id="board_support"></a>
+    Creating your own board support</h2>
 
-    <p>The root file system has been created in the
-    <code>&quot;build_&lt;ARCH&gt;/root&quot;</code>
-    directory which is unique for each architecture.
-    Toolchains have been built in
-    <code>&quot;toolchain_build_&lt;ARCH&gt;&quot;</code>. </p>
+    <p>Creating your own board support in Buildroot allows you to have
+    a convenient place to store the Busybox, uClibc, kernel
+    configurations, your target filesystem skeleton, and a Buildroot
+    configuration that match your project.</p>
 
-    <p> It the user wanted to build several root file systems for the same
-    architecture, a prefix or suffix could be added in the configuration file
-    so the root file system would be built in
-    <code>&quot;&lt;PREFIX&gt;_build_&lt;ARCH&gt;_&lt;SUFFIX&gt;/root&quot;</code>
-    By supplying <u>unique</u> combinations of
-    <code>&quot;&lt;PREFIX&gt;&quot;</code> and
-    <code>&quot;&lt;SUFFIX&gt;&quot;</code>
-    each project would get a <u>unique</u> root file system tree. </p>
+    <p>Follow these steps to integrate your board in Buildroot:</p>
 
-    <p>The disadvantage of this approach is that a new toolchain was
-    built for each project,  adding considerable time to the build
-    process, even if it was two projects for the same chip. </p>
-
-    <p>This drawback has been somewhat lessened with
-    <code>gcc-4.x.y</code> which allows buildroot to use an external
-    toolchain. Certain packages requires special
-    features in the toolchain, and if an external toolchain is selected,
-    this may lack the neccessary features to complete the build of the root
-     file system.</p>
-
-    <p>A bigger problem was that the
-    <code>&quot;build_&lt;ARCH&gt;&quot;</code> tree
-    was also duplicated, so each </code>package</code> would also
-    be rebuilt once per project, resulting in even longer build times.</p>
-
-    <h3>Project to share toolchain and package builds</h3>
-
-    <p>Work has started on a project which will allow the user to build
-    multiple root file systems for the same architecture in the same tree.
-    The toolchain and the package build directory will be shared, but each
-    project will have a dedicated directory tree for project specific
-    builds. </p>
-
-    <p>With this approach, most, if not all packages will be compiled
-    when the first project is built.
-    The process is almost identical to the original process.
-    Packages are downloaded and extracted to the shared
-    <code>&quot;build_&lt;ARCH&gt;/&lt;package&gt;&quot;</code>
-    directory. They are configured and compiled. </p>
-
-    <p>Package libraries and headers are installed in the shared $(STAGING_DIR),
-    and then the project specific root file system &quot;$(TARGET_DIR)&quot;
-    is populated. </p>
-
-    <p>At the end of the build, the root file system will be used
-    to generate the resulting root file system binaries. </p>
-
-    <p>Once the first project has been built, building other projects will
-    typically involve populating the new project's root file system directory
-    from the existing binaries generated in the shared
-    <code>&quot;build_&lt;ARCH&gt;/&lt;&gt;&quot;</code> directory. </p>
-
-    <p>Only packages, not used by the first project, will have to go
-    through the normal extract-configure-compile flow. </p>
-
-    <h3>Implementation</h3>
-
-    <p>The core of the solution is the introduction
-    of two new directories: </p>
-
-    <ul>
-    <li><code>project_build_&lt;ARCH&gt;</code></li>
+    <ol>
 
-    <li><code>binaries;</code></li>
-    </ul>
+      <li>Create a new directory in <code>target/device/</code>, named
+      after your company or organization</li>
 
-    <p>Each of the directories contain one subdirectory per project.
-    The name of the subdirectory is configured by the user in the
-    normal buildroot configuration, using the value of: </p>
+      <li>Add a line <code>source
+      "target/device/yourcompany/Config.in"</code> in
+      <code>target/device/Config.in</code> so that your board appears
+      in the configuration system</li>
 
-    <p><code>Project Options ---> Project name</code></p>
+      <li>In <code>target/device/yourcompany/</code>, create a
+      directory for your project. This way, you'll be able to store
+      several projects of your company/organization inside
+      Buildroot.</li>
 
-    <p>The configuration defines the $(PROJECT) variable.</p>
+      <li>Create a <code>target/device/yourcompany/Config.in</code>
+      file that looks like the following:
 
-    <p>The default project name is <code>&quot;uclibc&quot;</code>.</p>
+      <pre>
+menuconfig BR2_TARGET_COMPANY
+       bool "Company projects"
 
-    <p><code>&quot;package/Makefile.in&quot;</code> defines:
-    <pre>
-    <code>PROJECT_BUILD_DIR:=project_build_$(ARCH)/$(PROJECT)</code>
-    <code>BINARIES_DIR:=binaries/$(PROJECT)</code>
-    </pre>
-    </p>
-
-    <p>It also defines the location for the target root file system:
-    <pre>
-    <code>TARGET_DIR:=$(PROJECT_BUILD_DIR)/$(PROJECT)/root</code>
-    </pre>
-    </p>
+if BR2_TARGET_COMPANY
 
-    <p>I.E: If the user has choosen
-    <code>&quot;myproject&quot;</code>
-    as the $(PROJECT) name:
+config BR2_TARGET_COMPANY_PROJECT_FOOBAR
+       bool "Support for Company project Foobar"
+       help
+         This option enables support for Company project Foobar
 
-    <ul>
-    <li><code>&quot;project_build_&lt;ARCH&gt;/myproject&quot;</code></li>
-    <li><code>&quot;binaries/myproject&quot;</code></li>
-    </ul>
-
-    <p>will be created. </p>
-
-    <p>Currently, the <u>root file system</u>, <u>busybox</u> and an Atmel
-    customized version of
-    <u><code>U-Boot</code></u>, as well as some Atmel specific
-    bootloaders like <u>at91-bootstrap</u> and <u>dataflashboot.bin</u>
-    are built in
-    <code>&quot;$(PROJECT_BUILD_DIR)&quot;</code>
-
-    <p>The resulting binaries for all architectures are stored in the
-    <code>&quot;$(BINARIES_DIR)&quot;</code> directory. <p>
-
-    <h3>Summary</h3>
+endif
+      </pre>
 
-    <p>The project will share directories which can be share without
-    conflicts, but will use unique build directories, where the user
-    can configure the build. </p>
+      Of course, customize the different values to match your
+      company/organization and your project. This file will create a
+      menu entry that contains the different projects of your
+      company/organization.</li>
 
-    <h2><a name="Linux" id="Linux"></a>Linux</h2>
+      <li>Create a <code>target/device/yourcompany/Makefile.in</code>
+      file that looks like the following:
 
-     <p>The user can select from three different Linux strategies:
+      <pre>
+ifeq ($(BR2_TARGET_COMPANY_PROJECT_FOOBAR),y)
+include target/device/yourcompany/project-foobar/Makefile.in
+endif
+      </pre>
+      </li>
 
-     <ul>
-     <li>Legacy: Only use version supported by the kernel headers</li>
-     <li>Advanced: Allow any 2.6.X.Y combination.
-	(Minimum 2.6.19)</li>
-     <li>Power-User Strategy: Allow
-     <code>&quot;-git&quot;</code>, or
-     <code>&quot;-mm&quot;</code>, or user downloadable kernels</li>
-     </ul>
+      <li>Now, create the
+      <code>target/device/yourcompany/project-foobar/Makefile.in</code>
+      file. It is first recommended to define a
+      <code>BOARD_PATH</code> variable set to
+      <code>target/device/yourcompany/project-foobar</code>, as it
+      will simplify further definitions. Then, the file might define
+      one or several of the following variables:
+
+      <ul>
+
+	<li><code>TARGET_SKELETON</code> to a directory that contains
+	the target skeleton for your project. If this variable is
+	defined, this target skeleton will be used instead of the
+	default one. If defined, the convention is to define it to
+	<code>$(BOARD_PATH)/target_skeleton</code>, so that the target
+	skeletonn is stored in the board specific directory.</li>
+
+	<li><code>TARGET_DEVICE_TABLE</code> to a file that contains
+	the target device table, i.e the list of device files (in
+	<code>/dev/</code>) created by the root filesystem building
+	procedure. If this variable is defined, the given device table
+	will be used instead of the default one. If defined, the
+	convention is to define it to
+	<code>$(BOARD_PATH)/target_device_table.txt</code>. See
+	<code>target/generic/device_table.txt</code> for an example
+	file.</li>
+
+      </ul>
 
-     <p>The current kernel patches can be applied to the
-     linux source tree even if the version differs from the
-     kernel header version. </p>
+      </li>
 
-     <p>Since the user can select any kernel-patch
-     he/she will be able to select a non-working combination.
-     If the patch fails, the user will have to generate a new
-     proprietary kernel-patch or decide to not apply the kernel
-     patches</p>
+      <li>Then, in the
+      <code>target/device/yourcompany/project-foobar/</code>
+      directory, you can store different files:
 
-     <p>There is also support for <u>board specific</u> and
-     <u>architecture specific</u> patches. </p>
+      <ul>
 
-     <p>There will also be a way for the user to supply absolute
-     or relative paths to patches, possibly outside the main tree.
-     This can be used to apply custom kernel-header-patches, if
-     the versions available in buildroot cannot be applied to the
-     specific linux version used</p>
+	<li>One or more Buildroot configurations, under file named
+	<code>something_defconfig</code>. Your users will then be able
+	to run <code>make something_defconfig</code> and get the right
+	configuration for your project</li>
 
-     <p>Maybe, there will also be a possibility to supply an
-     <code>&quot;URL&quot;</code> to a patch available on Internet. </p>
+	<li>Configuration files for the kernel, for Busybox or
+	uClibc. These files can then be referenced by the Buildroot
+	configuration described above</li>
 
-     <p>
-	If there is no linux config file available,
-	buildroot starts the linux configuration system, which
-	defaults to "make menuconfig".
-     </p>
+      </ul>
 
-    <h3>Todo</h3>
-    <ol>
+      </li>
 
-     <li>Configurable packages</li>
-     <p>Many packages can, on top of the simple
-     &quot;enable/disable build&quot;,
-     be further configured using Kconfig.
-     Currently these packages will be compiled using the
-     configuration specified in the
-     <code>&quot;.config&quot;</code> file of the <u>first</u>
-     project demanding the build of the package.</p>
-
-     <p>If <u>another</u> project uses the same packages, but with
-     a different configuration,these packages will <u>not</u> be rebuilt,
-     and the root file system for the new project will be populated
-     with files from the build of the <u>first</u> project</p>
-
-     <p>If multiple project are built, and a specific package
-     needs two different configuration, then the user must
-     delete the package from the
-     <code>&quot;build_&lt;ARCH&gt;&quot;</code> directory
-     before rebuilding the new project.<p>
-
-     <p>A long term solution is to edit the package makefile and move
-     the build of the configurable packages from
-     <code>&quot;build_&lt;ARCH&gt;&quot;</code> to
-     <code>&quot;project_build_&lt;ARCH&gt;/&lt;project name&gt;&quot;</code>
-     and send a patch to the buildroot mailing list.
-
-     <li>Naming conventions</li>
-
-     <p>Names of resulting binaries should reflect the
-     &quot;project name&quot;
-
-     <li>Generating File System binaries</li>
-     <p>
-     Packages which needs to be installed with the &quot;root&quot;
-     as owner, will generate a
-     <code>&quot;.fakeroot.&lt;package&gt;&quot;</code> file
-     which will be used for the final build of the root file system binary. </p>
-
-     <p>This was previously located in the
-     <code>&quot;$(STAGING_DIR)&quot;</code> directory, but was
-     recently moved to the
-     <code>&quot;$(PROJECT_BUILD_DIR)&quot;</code> directory. </p>
-
-     <p>Currently only three packages:
-     <code>&quot;at&quot;</code>,
-     <code>&quot;ltp-testsuite&quot;</code> and
-     <code>&quot;nfs-utils&quot;</code>
-     requests fakeroot. <p>
-
-     <p>The makefile fragments for each file system type like
-     <code>&quot;ext2&quot;</code>,
-     <code>&quot;jffs2&quot;</code> or
-     <code>&quot;squashfs&quot;</code>
-     will, when the file system binary is generated,
-     collect all present
-     <code>&quot;.fakeroot.&lt;package&gt;&quot;</code> files
-     to a single <code>&quot;_fakeroot.&lt;file system&gt;&quot;</code>
-     file and call fakeroot.</p>
-     <code>&quot;.fakeroot.&lt;package&gt;&quot;</code>
-     files are deleted as the last action of the Buildroot Makefile. </p>
-
-     <p>It needs to be evaluated if any further action for the
-     file system binary build is needed. </p>
-
-     </ol>
+    </ol>
 
     <h2><a name="using_toolchain" id="using_toolchain"></a>Using the
-    uClibc toolchain outside Buildroot</h2>
+    generated toolchain outside Buildroot</h2>
 
     <p>You may want to compile your own programs or other software
     that are not packaged in Buildroot. In order to do this, you can
     use the toolchain that was generated by Buildroot. </p>
 
     <p>The toolchain generated by Buildroot by default is located in
-    <code>build_ARCH/staging_dir/</code>. The simplest way to use it
-    is to add <code>build_ARCH/staging_dir/usr/bin/</code> to your PATH
+    <code>output/staging/</code>. The simplest way to use it
+    is to add <code>output/staging/usr/bin/</code> to your PATH
     environnement variable, and then to use
-    <code>arch-linux-gcc</code>, <code>arch-linux-objdump</code>,
-    <code>arch-linux-ld</code>, etc. </p>
-
-    <p>For example, you may add the following to your
-    <code>.bashrc</code> (considering you're building for the MIPS
-    architecture and that Buildroot is located in
-    <code>~/buildroot/</code>) :</p>
-
-<pre>
-export PATH=&quot;$PATH:~/buildroot/build_mips/staging_dir/usr/bin/&quot;
-</pre>
+    <code>ARCH-linux-gcc</code>, <code>ARCH-linux-objdump</code>,
+    <code>ARCH-linux-ld</code>, etc. </p>
 
-    <p>Then you can simply do :</p>
-
-<pre>
-mips-linux-gcc -o foo foo.c
-</pre>
+    <p>The easiest way is of course to add the
+    <code>output/staging/usr/bin/</code> directory to your PATH
+    environment variable.</p>
 
      <p><b>Important</b> : do not try to move a gcc-3.x toolchain to an other
      directory, it won't work. There are some hardcoded paths in the
@@ -815,8 +692,8 @@ mips-linux-gcc -o foo foo.c
      might be cumbersome.</p>
 
      <p>It is also possible to generate the Buildroot toolchain in
-     another directory than <code>build_ARCH/staging_dir</code> using
-     the <code>Build options -&gt; Toolchain and header file
+     another directory than <code>build/staging</code> using the
+     <code>Build options -&gt; Toolchain and header file
      location</code> option. This could be useful if the toolchain
      must be shared with other users.</p>
 
@@ -890,22 +767,6 @@ It allows to generate toolchains based on <i>uClibc</i>, <i>glibc</i>
 and <i>eglibc</i> for a wide range of architectures, and has good
 community support.</p>
 
-      <h2><a name="adapting_rootfs" id="adapting_rootfs">Adapting the rootfs
-      for own binaries</h2>
-
-      <p>When using BR2 in an environment where own software binaries or
-      static data should be part of the generated rootfs package, the
-      <code>BR2_ROOTFS_POST_BUILD_SCRIPT</code> feature might interest
-      you. You can specify a command here which is called <i>after</i> BR2
-      built all the selected software, but <i>before</i> the the rootfs
-      packages are assembled. The destination rootfs folder is given as
-      first argument. You can add own components here, change
-      default configurations and remove unwanted files.</p>
-      <p>You should, however, use that feature with care. Whenever you
-      find that a certain package generates wrong or unneeded files, you
-      should rather fix than package than working around it with a
-      cleanup script.</p>
-
     <h2><a name="add_software" id="add_software"></a>Extending Buildroot with
     more software</h2>
 
@@ -992,7 +853,7 @@ endif
 
     <p>On <a href="#ex1line9">line 9</a>, we tell Buildroot to install
     the application to the staging directory. The staging directory,
-    located in <code>build_ARCH/staging_dir/</code> is the directory
+    located in <code>output/staging/</code> is the directory
     where all the packages are installed, including their
     documentation, etc. By default, packages are installed in this
     location using the <code>make install</code> command.</p>
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature
  2009-09-16 21:07 ` [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature Thomas Petazzoni
@ 2009-09-16 22:00   ` Thiago A. Corrêa
  2009-09-16 22:08     ` Thomas Petazzoni
  0 siblings, 1 reply; 23+ messages in thread
From: Thiago A. Corrêa @ 2009-09-16 22:00 UTC (permalink / raw)
  To: buildroot

Hi,

On Wed, Sep 16, 2009 at 6:07 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 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.
>

That would be nice. I tried to figure a way to do that, but since
Kconfig doesn't support things like source *.in I couldn't figure a
way.

Kind Regards,
    Thiago A. Correa

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature
  2009-09-16 22:00   ` Thiago A. Corrêa
@ 2009-09-16 22:08     ` Thomas Petazzoni
  2009-09-16 22:21       ` Thiago A. Corrêa
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-16 22:08 UTC (permalink / raw)
  To: buildroot

Le Wed, 16 Sep 2009 19:00:26 -0300,
Thiago A. Corr?a <thiago.correa@gmail.com> a ?crit :

> That would be nice. I tried to figure a way to do that, but since
> Kconfig doesn't support things like source *.in I couldn't figure a
> way.

I've already prototyped something for that. I don't really like the
solution, but as you said, the Kconfig syntax is pretty limited, so I
haven't found any other solution than:

http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=external-boards&id=ed47f42a598c665bf42c4e797187f233b955e285

This works for me. You just do:

export BUILDROOT_EXTERNAL_BOARDS=/some/directory
make menuconfig
 # you see your external boards directly in the configuration
make

And that's it.

What do you think ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature
  2009-09-16 22:08     ` Thomas Petazzoni
@ 2009-09-16 22:21       ` Thiago A. Corrêa
  2009-09-17  5:43         ` Thomas Petazzoni
  0 siblings, 1 reply; 23+ messages in thread
From: Thiago A. Corrêa @ 2009-09-16 22:21 UTC (permalink / raw)
  To: buildroot

Hi

On Wed, Sep 16, 2009 at 7:08 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> export BUILDROOT_EXTERNAL_BOARDS=/some/directory
> make menuconfig
> ?# you see your external boards directly in the configuration
> make

Exporting a variable all the time is a bit anoying, but one could
always create a script to do that.

> And that's it.
>
> What do you think ?

Looks good. It would be nice to add BUILDROOT_EXTERNAL_BOARDS to the
find command at the %_defconfig rule, so things like this would work:
make mycustomboard_defconfig

Kind Regards,
    Thiago A. Correa

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature
  2009-09-16 22:21       ` Thiago A. Corrêa
@ 2009-09-17  5:43         ` Thomas Petazzoni
  2009-09-17 12:02           ` Peter Korsgaard
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-17  5:43 UTC (permalink / raw)
  To: buildroot

Le Wed, 16 Sep 2009 19:21:54 -0300,
Thiago A. Corr?a <thiago.correa@gmail.com> a ?crit :

> Exporting a variable all the time is a bit anoying, but one could
> always create a script to do that.

Well, you can also do :

 make BUILDROOT_EXTERNAL_BOARDS=/path/to menuconfig
 make BUILDROOT_EXTERNAL_BOARDS=/path/to

but I find it even more annoying.

The issue is that it is not possible to store this information in the
configuration, since depending on this value we must change some
Config.in file, which has to be done *before* we run the configuration
system.

> Looks good. It would be nice to add BUILDROOT_EXTERNAL_BOARDS to the
> find command at the %_defconfig rule, so things like this would work:
> make mycustomboard_defconfig

Well, it's already done by the patch (and works). Since a symbolic link
to the BUILDROOT_EXTERNAL_BOARDS directory is added in target/device/,
I just added the -L option to find and it is able to find the defconfig
of the external boards. See the patch for the one-liner
implementation :-)

Sincerly,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature
  2009-09-17  5:43         ` Thomas Petazzoni
@ 2009-09-17 12:02           ` Peter Korsgaard
  0 siblings, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2009-09-17 12:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> Well, it's already done by the patch (and works). Since a
 Thomas> symbolic link to the BUILDROOT_EXTERNAL_BOARDS directory is
 Thomas> added in target/device/, I just added the -L option to find and
 Thomas> it is able to find the defconfig of the external boards. See
 Thomas> the patch for the one-liner implementation :-)

Doesn't that give problems with the symlinks to /tmp and similar in the
target_skeleton's? Especially if you build in /tmp.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 1/6] Remove the "project" feature
  2009-09-16 21:07 ` [Buildroot] [PATCH 1/6] Remove the "project" feature Thomas Petazzoni
@ 2009-09-17 16:17   ` Bernhard Reutner-Fischer
  2009-09-17 17:30     ` Thomas Petazzoni
  2009-09-19 15:26     ` Peter Korsgaard
  2009-09-19 15:15   ` Peter Korsgaard
  1 sibling, 2 replies; 23+ messages in thread
From: Bernhard Reutner-Fischer @ 2009-09-17 16:17 UTC (permalink / raw)
  To: buildroot

On Wed, Sep 16, 2009 at 11:07:41PM +0200, Thomas Petazzoni wrote:

> flush:
>-	rm -f $(PROJECT_BUILD_DIR)/tgt-config.cache
>+	rm -f $(BUILD_DIR)/tgt-config.cache
> 
> %_defconfig: $(CONFIG)/conf
> 	cp $(shell find ./target/ -name $@) .config
> 	-@$(MAKE) oldconfig

That find is gross. $(wildcard $(TOPDIR)/target/*/$(@)_defconfig)
and we have $(Q) that is either set to '@' or is empty.
Apart from that a failing oldconfig is and should be fatal.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 1/6] Remove the "project" feature
  2009-09-17 16:17   ` Bernhard Reutner-Fischer
@ 2009-09-17 17:30     ` Thomas Petazzoni
  2009-09-19 15:26     ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-17 17:30 UTC (permalink / raw)
  To: buildroot

Le Thu, 17 Sep 2009 18:17:13 +0200,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> a ?crit :

> That find is gross. $(wildcard $(TOPDIR)/target/*/$(@)_defconfig)
> and we have $(Q) that is either set to '@' or is empty.
> Apart from that a failing oldconfig is and should be fatal.

Thanks for noticing. Will fix in another patch.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 1/6] Remove the "project" feature
  2009-09-16 21:07 ` [Buildroot] [PATCH 1/6] Remove the "project" feature Thomas Petazzoni
  2009-09-17 16:17   ` Bernhard Reutner-Fischer
@ 2009-09-19 15:15   ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2009-09-19 15:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> -config BR2_HOSTNAME
 Thomas> -	string "hostname"
 Thomas> -	default "uclibc"
 Thomas> -	help
 Thomas> -	  The hostname string is stored in "/etc/hostname"
 Thomas> -
 Thomas> -config BR2_BANNER
 Thomas> -	string "banner"
 Thomas> -	default "Welcome to Buildroot"
 Thomas> -	help
 Thomas> -	  The banner string is stored in "/etc/issue"

I'm not sure removing these is a good idea. They are imho nice to get a
"little bit" of customization without having to have a dedicated
target_skeleton. Perhaps we should move them to target/device/generic
similar to the serial console stuff we already have?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 1/6] Remove the "project" feature
  2009-09-17 16:17   ` Bernhard Reutner-Fischer
  2009-09-17 17:30     ` Thomas Petazzoni
@ 2009-09-19 15:26     ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2009-09-19 15:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Bernhard" == Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> writes:

Hi,

 Bernhard> On Wed, Sep 16, 2009 at 11:07:41PM +0200, Thomas Petazzoni wrote:
 >> flush:
 >> -	rm -f $(PROJECT_BUILD_DIR)/tgt-config.cache
 >> +	rm -f $(BUILD_DIR)/tgt-config.cache
 >> 
 >> %_defconfig: $(CONFIG)/conf
 >> cp $(shell find ./target/ -name $@) .config
 >> -@$(MAKE) oldconfig

 Bernhard> That find is gross. $(wildcard $(TOPDIR)/target/*/$(@)_defconfig)
 Bernhard> and we have $(Q) that is either set to '@' or is empty.
 Bernhard> Apart from that a failing oldconfig is and should be fatal.

Yes - Notice that it's not something new Thomas is introducing, it has
been in the tree for a long time (Ulf afaik added it).

I think I would actually prefer having all defconfigs together in
something like configs/ just like the Linux kernel has it instead of
spread over the tree. That has a number of advantages:

 - %_defconfig rule gets a lot simpler - E.G. something like:
%_defconfig: $(TOPDIR)/config/%_defconfig:
             cp $^ $(TOPDIR)/.config

 - We could display the available defconfigs in make help:
         @$(foreach b, $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig)), \
          printf "  %-22s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));)

 - It's easy to build all defconfigs before a release with simple shell
   scripting, and it's easy for newcomers to see what configs are
   available

The disadvantage is that the defconfig isn't together with the other
target/device/* files.

I implemented something like that for the company I work for, but Ulf
added the current implementation before I got mine committed.

Comments, anyone?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2009-09-16 21:07 ` [Buildroot] [PATCH 6/6] documentation: update after major changes Thomas Petazzoni
@ 2009-09-19 15:27 ` Peter Korsgaard
  2009-09-20  9:08   ` Thomas Petazzoni
  2009-09-22 22:16 ` H Hartley Sweeten
  7 siblings, 1 reply; 23+ messages in thread
From: Peter Korsgaard @ 2009-09-19 15:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> A discussion on this cleanup already took place, and I think
 Thomas> that most of the objections have found answers through the
 Thomas> proposal of alternative solutions.

 Thomas> Therefore, could the huge-cleanup branch at
 Thomas> git://git.busybox.net/~tpetazzoni/git/buildroot be pulled into the
 Thomas> master repository ?

Pulled and pushed - Thanks a lot!

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-19 15:27 ` [Buildroot] [pull request] Buildroot cleanup, v2 Peter Korsgaard
@ 2009-09-20  9:08   ` Thomas Petazzoni
  2009-09-21  2:37     ` Steve Calfee
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-20  9:08 UTC (permalink / raw)
  To: buildroot

Hi,

Le Sat, 19 Sep 2009 17:27:51 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> Pulled and pushed - Thanks a lot!

Thanks for pulling the series and taking the risk of introducing such
disruptive changes. I'm quite sure they will be some issues here and
there since I obviously couldn't test the numerous ways of
using Buildroot. But I'm quite confident that the bug fixing period
will allow to fix these before the release.

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-20  9:08   ` Thomas Petazzoni
@ 2009-09-21  2:37     ` Steve Calfee
  0 siblings, 0 replies; 23+ messages in thread
From: Steve Calfee @ 2009-09-21  2:37 UTC (permalink / raw)
  To: buildroot

--- On Sun, 9/20/09, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Subject: Re: [Buildroot] [pull request] Buildroot cleanup, v2
> To: buildroot at busybox.net
> Date: Sunday, September 20, 2009, 2:08 AM
> Hi,
> 
> Le Sat, 19 Sep 2009 17:27:51 +0200,
> Peter Korsgaard <jacmet@uclibc.org>
> a ?crit :
> 
> > Pulled and pushed - Thanks a lot!
> 
> Thanks for pulling the series and taking the risk of
> introducing such
> disruptive changes. I'm quite sure they will be some issues
> here and
> there since I obviously couldn't test the numerous ways of
> using Buildroot. But I'm quite confident that the bug
> fixing period
> will allow to fix these before the release.
> 
> Thanks,
> 
> Thomas
> -- 
Hi Thomas,

I would like to thank you and Peter for doing so much for buildroot. I completely agree with your simplifications. People who have simple needs and are just starting with buildroot should have an easy startup. People with complex multiple arch, multiple platforms should know enough to be able to do it. 

It is central to the unix philosophy in the separation of mechanism and policy. The kernel should provide mechanism, the user policy. Similarly a complete build environment should provide a mechanism and users should implement their own requirements. It should be possible to do complex things, not required for all.

Regards, Steve


      

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2009-09-19 15:27 ` [Buildroot] [pull request] Buildroot cleanup, v2 Peter Korsgaard
@ 2009-09-22 22:16 ` H Hartley Sweeten
  2009-09-22 22:38   ` Thomas Petazzoni
  7 siblings, 1 reply; 23+ messages in thread
From: H Hartley Sweeten @ 2009-09-22 22:16 UTC (permalink / raw)
  To: buildroot

On Wednesday, September 16, 2009 2:08 PM, Thomas Petazzoni wrote:
> Here is a resend of my patch series to cleanup various aspects of
> Buildroot. Changes against the previous version are the following:
> 
>  * Modified the patch on using "output" as the default output
>    directory to match Peter suggestion regarding simplification of the
>    implementation
> 
>  * Added a documentation patch that updates the documentation with the
>    proposed modifications and also adds informations about various
>    other things
> 
>  * Rebased on top of the current git
> 
> A discussion on this cleanup already took place, and I think that most
> of the objections have found answers through the proposal of
> alternative solutions.
> 
> Therefore, could the huge-cleanup branch at
> git://git.busybox.net/~tpetazzoni/git/buildroot be pulled into the
> master repository ?
> 
> If not, please tell me whether other fixes are needed or if I should
> give up with the whole idea for design reasons.
> 

Thomas,

Nice work with the cleanup!

To further cleanup the build do you think it's worthwhile to create a
"Makefile.autotools.host.in" or just extend "Makefile.autotools.in" to
handle the various packages that do a make for the host?  At a quick
glance it appears they all go thru the same steps for the host build.

Regards,
Hartley

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-22 22:16 ` H Hartley Sweeten
@ 2009-09-22 22:38   ` Thomas Petazzoni
  2009-09-22 22:56     ` H Hartley Sweeten
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-22 22:38 UTC (permalink / raw)
  To: buildroot

Le Tue, 22 Sep 2009 18:16:48 -0400,
"H Hartley Sweeten" <hartleys@visionengravers.com> a ?crit :

> Nice work with the cleanup!

Thanks!

> To further cleanup the build do you think it's worthwhile to create a
> "Makefile.autotools.host.in" or just extend "Makefile.autotools.in" to
> handle the various packages that do a make for the host?  At a quick
> glance it appears they all go thru the same steps for the host build.

That's definitely on my TODO-list. But don't hesitate to step-up with a
patch, since I'm very busy these days and don't know when I'll be able
to work on this again (next week ?).

However, for me, it's not only about Makefile.autotools.in. I also
would like to see all packages use some infrastructure similar to
Makefile.autotools.in. Of course, this infrastructure would be more
flexible that Makefile.autotools.in, but could at least automate the
download, extraction and patch process, and could allow to do some
common things before/after the configuration, compilation and
installation to the staging/target. This will be very useful to, for
example, properly handle the removal of a package from the target.

I've started to prototype such a thing, and got something simple such
as zlib.mk working, with a significant reduction in size of zlib.mk.
However, with slightly more complex things such as icu.mk (which
requires the tool for the host), my prototype isn't yet advanced enough.

Sincerly,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-22 22:38   ` Thomas Petazzoni
@ 2009-09-22 22:56     ` H Hartley Sweeten
  2009-09-22 23:13       ` Thomas Petazzoni
  0 siblings, 1 reply; 23+ messages in thread
From: H Hartley Sweeten @ 2009-09-22 22:56 UTC (permalink / raw)
  To: buildroot

On Tuesday, September 22, 2009 3:39 PM, Thomas Petazzoni wrote:
> Le Tue, 22 Sep 2009 18:16:48 -0400,
> "H Hartley Sweeten" <hartleys@visionengravers.com> a ?crit :
> 
>> Nice work with the cleanup!
> 
> Thanks!

One thing I did notice.

You default BR2_DL_DIR to $(BASE_DIR)/dl a better default might be
$(TOPDIR)/dl.  This would make the default work for multiple
make O=<directory> without having to create the <directory>/dl symlink
or export BUILDROOT_DL_DIR.

>> To further cleanup the build do you think it's worthwhile to create a
>> "Makefile.autotools.host.in" or just extend "Makefile.autotools.in" to
>> handle the various packages that do a make for the host?  At a quick
>> glance it appears they all go thru the same steps for the host build.
> 
> That's definitely on my TODO-list. But don't hesitate to step-up with a
> patch, since I'm very busy these days and don't know when I'll be able
> to work on this again (next week ?).

I'll just wait for you to reach it on your TODO-list ;-)

> However, for me, it's not only about Makefile.autotools.in. I also
> would like to see all packages use some infrastructure similar to
> Makefile.autotools.in. Of course, this infrastructure would be more
> flexible that Makefile.autotools.in, but could at least automate the
> download, extraction and patch process, and could allow to do some
> common things before/after the configuration, compilation and
> installation to the staging/target. This will be very useful to, for
> example, properly handle the removal of a package from the target.

Having a common package removal would be great!  Removing a single
package from the filesystem can be a real pain...

> I've started to prototype such a thing, and got something simple such
> as zlib.mk working, with a significant reduction in size of zlib.mk.
> However, with slightly more complex things such as icu.mk (which
> requires the tool for the host), my prototype isn't yet advanced enough.

zlib.mk isn't even the worse one.  That one at least looks like it
could be converted to the a Makefile.autotools.in target.  Some of the
older *.mk files are a real mess...

Regards,
Hartley

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [pull request] Buildroot cleanup, v2
  2009-09-22 22:56     ` H Hartley Sweeten
@ 2009-09-22 23:13       ` Thomas Petazzoni
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2009-09-22 23:13 UTC (permalink / raw)
  To: buildroot

Le Tue, 22 Sep 2009 18:56:32 -0400,
"H Hartley Sweeten" <hartleys@visionengravers.com> a ?crit :

> One thing I did notice.
> 
> You default BR2_DL_DIR to $(BASE_DIR)/dl a better default might be
> $(TOPDIR)/dl.  This would make the default work for multiple
> make O=<directory> without having to create the <directory>/dl symlink
> or export BUILDROOT_DL_DIR.

True. It always bothered me as well. Care to prepare a patch and submit
it ?

> > That's definitely on my TODO-list. But don't hesitate to step-up
> > with a patch, since I'm very busy these days and don't know when
> > I'll be able to work on this again (next week ?).
> 
> I'll just wait for you to reach it on your TODO-list ;-)

Ooh, come on :-)

> Having a common package removal would be great!  Removing a single
> package from the filesystem can be a real pain...

It is basically unsupported these days. Some packages work more or
less, but on overall it just doesn't work.

> zlib.mk isn't even the worse one.  That one at least looks like it
> could be converted to the a Makefile.autotools.in target.  Some of the
> older *.mk files are a real mess...

Yes, they are. They are part of the work, but it will take quite some
time to implement the infrastructure and then convert the packages.

Cheers,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-09-22 23:13 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 21:07 [Buildroot] [pull request] Buildroot cleanup, v2 Thomas Petazzoni
2009-09-16 21:07 ` [Buildroot] [PATCH 1/6] Remove the "project" feature Thomas Petazzoni
2009-09-17 16:17   ` Bernhard Reutner-Fischer
2009-09-17 17:30     ` Thomas Petazzoni
2009-09-19 15:26     ` Peter Korsgaard
2009-09-19 15:15   ` Peter Korsgaard
2009-09-16 21:07 ` [Buildroot] [PATCH 2/6] Remove the BOARD/LOCAL feature Thomas Petazzoni
2009-09-16 22:00   ` Thiago A. Corrêa
2009-09-16 22:08     ` Thomas Petazzoni
2009-09-16 22:21       ` Thiago A. Corrêa
2009-09-17  5:43         ` Thomas Petazzoni
2009-09-17 12:02           ` Peter Korsgaard
2009-09-16 21:07 ` [Buildroot] [PATCH 3/6] By default, put the output in an output/ directory Thomas Petazzoni
2009-09-16 21:07 ` [Buildroot] [PATCH 4/6] Remove BR2_TOPDIR_PREFIX and BR2_TOPDIR_SUFFIX Thomas Petazzoni
2009-09-16 21:07 ` [Buildroot] [PATCH 5/6] Rename the output directories Thomas Petazzoni
2009-09-16 21:07 ` [Buildroot] [PATCH 6/6] documentation: update after major changes Thomas Petazzoni
2009-09-19 15:27 ` [Buildroot] [pull request] Buildroot cleanup, v2 Peter Korsgaard
2009-09-20  9:08   ` Thomas Petazzoni
2009-09-21  2:37     ` Steve Calfee
2009-09-22 22:16 ` H Hartley Sweeten
2009-09-22 22:38   ` Thomas Petazzoni
2009-09-22 22:56     ` H Hartley Sweeten
2009-09-22 23:13       ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.