All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders
@ 2011-07-05 19:53 Thomas Petazzoni
  2011-07-05 19:53 ` [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
                   ` (28 more replies)
  0 siblings, 29 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

Hello,

We have a package infrastructure that allows to share a lot of common
behaviour between packages, and allows to add new features easily to
all existing packages (Git/Mercurial download support, or usage of an
external source tree, etc.).

Unfortunately, some of the packages that would most benefit from those
new infrastructure features are the bootloader and kernel, since it's
typically the software components that have to be modified/tuned
during the course of an embedded Linux project.

Therefore, this series converts all bootloaders makefiles and the
kernel makefile to the package infrastructure, and adds the
possibility of fetching the kernel and u-boot through Git (it can be
added to other bootloaders with just a few lines of changes, mostly at
the Config.in level).

It also does various other things :

 * Integrate Allan Nielsen patch that allows package to override the
   default extract command. Allan wrote it for the ATI fglrx drivers,
   but this is also required by this patchset for the AT91Bootstrap
   bootloader, which is provided as a .zip file.

 * Allow the kernel to be installed in /boot in the root
   filesystem. This is mostly useful for x86 and x86_64 systems, where
   it is traditional to have the kernel inside the root filesystem.

 * Modify the way the kernel is configured, to always use a defconfig
   mechanism. This allows to make a silent oldconfig after linux.mk
   has tuned the kernel configuration according to various Buildroot
   configuration options (see the commit log for details).

 * Modify the package infrastructure to provide a <pkg>_INSTALL_IMAGE
   knob in addition to <pkg>_INSTALL_STAGING and <pkg>_INSTALL_TARGET.

 * Fix the patching procedure for host packages. It was incorrect,
   because it required the target package to exist even if only the
   host package was actually useful.

 * Adds support for post-download hooks at the package infrastructure
   level. This is needed for the kernel, as the kernel requires to
   download a custom list of patches.

 * Integrate Philippe Reynes patch that adds support for the x-loader
   first stage bootloader (for OMAP-based platforms).

The changes have already been tested sucessfully by Luca
Ceresoli. Thanks to him for testing this patch set and for the
feedback provided, as well as the bug fixes. Many, many thanks!

Changes since v2 (July, 4th) :

 - When the kernel is selected for installation in /boot, do not
   install into the images/ output directory.

 - Make sure that the installation of the kernel in /boot cannot be
   selected when initramfs is used.

 - Use := instead of = in various places, at least do not use = where
   := was used in the past.

 - Improve generation of RAWNAME in the package infrastructure, using
   patsubst instead of subst.

 - Fixed a Linux 2.6 comment in linux/linux.mk

 - Rebase on top of current master.

Changes since v1 (May, 30th) :

 - Made the option that allows to have the kernel installed in /boot
   available to all architectures, not only x86 and x86_64

 - Fixed the package infrastructure modifications so that packages in
   subdirectories (such as package/multimedia/) continue to work
   properly.

 - Add the x-loader bootloader, contributed by Philippe Reynes

 - Bump Barebox version

Regards,

Thomas

The following changes since commit 0387830b2e6c6cb2513802b8abe86914d49f605c:

  lame: fix build if host has libgtk12-dev (gtk-config) (2011-07-05 14:58:20 +0200)

are available in the git repository at:
  http://free-electrons.com/~thomas/buildroot.git for-2011.08/bootloaders

Allan W. Nielsen (1):
      Makefile.package.in: Makes it possible to override the default extract commands

Philippe Reynes (1):
      Add x-loader bootloader

Thomas Petazzoni (26):
      Fix quoting in default extract command
      linux: make it possible to install the kernel in /boot
      linux: use the defconfig mechanism after tuning the config
      package: add infrastructure to install things in images/
      package: fix patching procedure for host packages
      barebox: re-indent variable definitions
      barebox: convert to GENTARGETS
      at91bootstrap: indent properly variable definitions
      at91bootstrap: convert to GENTARGETS
      at91dataflashboot: indent properly variable definitions
      at91dataflashboot: convert to GENTARGETS
      syslinux: convert to GENTARGETS
      grub: convert to AUTOTARGETS
      grub2: remove package
      u-boot: convert to GENTARGETS
      uboot-mkimage: new package
      linux: rename LINUX26 to LINUX
      linux: indent and align some definitions
      package: add support for post-download hooks
      linux: convert to the GENTARGETS infrastructure
      boot: rename BR2_TARGET_* to BR2_BOOT_*
      u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT*
      Improve TARGETS handling for bootloaders and kernel
      linux: allow specification of a custom Git repository as a source
      u-boot: allow specification of custom Git repo as source
      barebox: bump version

 boot/Config.in                                     |    2 +-
 boot/at91bootstrap/Config.in                       |   18 +-
 boot/at91bootstrap/at91bootstrap.mk                |   69 ++----
 boot/at91dataflashboot/Config.in                   |   24 +--
 boot/at91dataflashboot/at91dataflashboot.mk        |   48 +---
 boot/barebox/Config.in                             |    8 +-
 boot/barebox/barebox.mk                            |   74 +++----
 boot/grub/Config.in                                |   94 ++++----
 boot/grub/grub.500-build-fix.patch                 |   14 ++
 boot/grub/grub.mk                                  |  157 +++++--------
 boot/grub2/Config.in                               |    9 -
 boot/grub2/grub2.mk                                |   93 --------
 boot/syslinux/Config.in                            |   16 +-
 boot/syslinux/syslinux.mk                          |   59 ++----
 boot/u-boot/Config.in                              |   89 ++++----
 boot/u-boot/u-boot.mk                              |  234 +++++++-------------
 boot/x-loader/Config.in                            |   15 ++
 boot/x-loader/x-loader.mk                          |   35 +++
 linux/Config.in                                    |   23 ++
 linux/linux.mk                                     |  213 +++++++++---------
 package/Makefile.package.in                        |   72 +++++--
 .../uboot-mkimage-2011.03-drop-configh.patch       |    0
 package/uboot-mkimage/uboot-mkimage.mk             |   16 ++
 23 files changed, 614 insertions(+), 768 deletions(-)
 create mode 100644 boot/grub/grub.500-build-fix.patch
 delete mode 100644 boot/grub2/Config.in
 delete mode 100644 boot/grub2/grub2.mk
 create mode 100644 boot/x-loader/Config.in
 create mode 100644 boot/x-loader/x-loader.mk
 rename boot/u-boot/u-boot-2011.03-drop-configh.patch => package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch (100%)
 create mode 100644 package/uboot-mkimage/uboot-mkimage.mk

Thanks,
-- 
Thomas Petazzoni

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

* [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-07 21:00   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 02/28] Fix quoting in default extract command Thomas Petazzoni
                   ` (27 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

From: Allan W. Nielsen <a@awn.dk>

When using GENTARGETS (or macroes depending on it), there is no way of
specifying a custom extraction procedure. When using the patch one can
simply define $(PACKAGE_NAME)_EXTRACT_CMDS which will override the
default. If non is defined it will fall back to the default extract
procedure.

An example could look like this:

=== PACKAGE BEGIN ===
FGLRX_VERSION=11-3
FGLRX_SOURCE:=ati-driver-installer-$(FGLRX_VERSION)-x86.x86_64.run
FGLRX_SITE:=http://www2.ati.com/drivers/linux/

define FGLRX_EXTRACT_CMDS
	sh $(DL_DIR)/$(FGLRX_SOURCE) --extract $(@D)
endef

$(eval $(call GENTARGETS,package,fglrx))
=== PACKAGE END ===

Signed-off-by: Allan W. Nielsen <a@awn.dk>
Cc: Allan W. Nielsen <a@awn.dk>
---
 package/Makefile.package.in |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index bf4e1b4..9949b58 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -243,8 +243,7 @@ endif
 $(BUILD_DIR)/%/.stamp_extracted:
 	@$(call MESSAGE,"Extracting")
 	$(Q)mkdir -p $(@D)
-	$(Q)$(if $($(PKG)_SOURCE),$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \
-	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -)
+	$($(PKG)_EXTRACT_CMDS)
 # some packages have messed up permissions inside
 	$(Q)chmod -R ug+rw $(@D)
 	$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
@@ -425,6 +424,10 @@ $(2)_TARGET_UNINSTALL =		$$($(2)_DIR)/.stamp_uninstalled
 $(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 
+# default extract command
+$(2)_EXTRACT_CMDS ?= $(if $($(2)_SOURCE),$(INFLATE$(suffix $($(2)_SOURCE))) $(DL_DIR)/$($(2)_SOURCE) | \
+	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
+
 # post-steps hooks
 $(2)_POST_EXTRACT_HOOKS         ?=
 $(2)_POST_PATCH_HOOKS           ?=
-- 
1.7.4.1

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

* [Buildroot] [PATCH 02/28] Fix quoting in default extract command
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
  2011-07-05 19:53 ` [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-07 21:05   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot Thomas Petazzoni
                   ` (26 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
---
 package/Makefile.package.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 9949b58..0a4c220 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -425,7 +425,8 @@ $(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 
 # default extract command
-$(2)_EXTRACT_CMDS ?= $(if $($(2)_SOURCE),$(INFLATE$(suffix $($(2)_SOURCE))) $(DL_DIR)/$($(2)_SOURCE) | \
+$(2)_EXTRACT_CMDS ?= \
+	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \
 	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
 
 # post-steps hooks
-- 
1.7.4.1

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

* [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
  2011-07-05 19:53 ` [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
  2011-07-05 19:53 ` [Buildroot] [PATCH 02/28] Fix quoting in default extract command Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-07 19:08   ` Sven Neumann
  2011-07-07 21:17   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
                   ` (25 subsequent siblings)
  28 siblings, 2 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/Config.in |    8 ++++++++
 linux/linux.mk  |    4 ++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/linux/Config.in b/linux/Config.in
index 1f1a69c..bdfa5b7 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -153,6 +153,14 @@ config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
 	  Specify the kernel make target to build the kernel that you
 	  need.
 
+config BR2_LINUX_KERNEL_INSTALL_TARGET
+	bool "Install kernel image to /boot in target"
+	depends on !BR2_TARGET_ROOTFS_INITRAMFS
+	help
+	  Select this option to have the kernel image installed to
+	  /boot in the target root filesystem, as is typically done on
+	  x86/x86_64 systems.
+
 endif # BR2_LINUX_KERNEL
 
 endmenu
diff --git a/linux/linux.mk b/linux/linux.mk
index 43ca87b..cb2c89b 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -157,7 +157,11 @@ $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/
 # Installation
 $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled
 	@$(call MESSAGE,"Installing kernel")
+ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
+	install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME)
+else
 	cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR)
+endif
 	# Install modules and remove symbolic links pointing to build
 	# directories, not relevant on the target
 	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then 	\
-- 
1.7.4.1

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

* [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2011-07-05 19:53 ` [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-07 21:46   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/ Thomas Petazzoni
                   ` (24 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

Currently, the kernel configuration mechanism works as follows for
custom configuration files:

 * Copy the custom config file to buildroot_defconfig in the kernel
   tree
 * Run "make buildroot_defconfig"
 * Remove the buildroot_defconfig
 * Tune the .config depending on some Buildroot options (EABI, MDEV,
   etc.)
 * Run oldconfig

And for a defconfig-based configuration:

 * Run "make XXX_defconfig"
 * Tune the .config depending on some Buildroot options (EABI, MDEV,
   etc.)
 * Run oldconfig

The problem is that the tuning done on the .config file can lead to
have new options available for which no value has been set. Therefore,
the "oldconfig" at the end of the process will hang the build process,
waiting for the user to confirm what should be done.

Instead, we would like the kernel to automatically select the default
value for those options.

Therefore, the configuration process when a configuration file is
given is now the following one :

 * Copy the custom config file to buildroot_defconfig in the kernel
   tree
 * Tune the buildroot_defconfig depending on some Buildroot options
   (EABI, MDEV, etc.)
 * Run "make buildroot_defconfig"
 * Remove the buildroot_defconfig

And similarly, for defconfig-based configuration, the process is now
the following one:

 * Copy the defconfig file to buildroot_defconfig in the kernel tree
 * Tune the buildroot_defconfig depending on some Buildroot options
   (EABI, MDEV, etc.)
 * Run "make buildroot_defconfig"
 * Remove the buildroot_defconfig

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
---
 linux/linux.mk |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index cb2c89b..944ff29 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -105,21 +105,28 @@ $(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted
 	done
 	$(Q)touch $@
 
+# As we are tweaking the kernel configuration file, we want to run a
+# silent oldconfig pass on the configuration file after having done
+# our tweaks. The normal 'oldconfig' target prompts the user for new
+# values that appeared, which hangs the build. Therefore, what we do
+# is that we create a new defconfig file called buildroot_defconfig,
+# which we tweak, and then use as the basis for the kernel
+# configuration. This temporary defconfig file is removed right after.
+KERNEL_DEFCONFIG_NAME = buildroot_defconfig
+KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME)
 
 # Configuration
 $(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched
 	@$(call MESSAGE,"Configuring kernel")
 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
-	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
+	cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH)
 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
-	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
-	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig
-	rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
+	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_DEFCONFIG_PATH)
 endif
 ifeq ($(BR2_ARM_EABI),y)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH))
 else
-	$(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH))
 endif
 ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
 	# As the kernel gets compiled before root filesystems are
@@ -127,21 +134,22 @@ ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
 	# replaced later by the real list, and the kernel will be
 	# rebuilt using the linux26-rebuild-with-initramfs target.
 	touch $(BINARIES_DIR)/rootfs.initramfs
-	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)
-	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config)
-	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
-	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH))
+	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH))
+	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH))
+	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH))
+	$(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH))
 endif
 ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH))
 endif
 ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
-	$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config)
+	$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH))
 endif
-	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) oldconfig
+	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME)
+	rm $(KERNEL_DEFCONFIG_PATH)
 	$(Q)touch $@
 
 # Compilation. We make sure the kernel gets rebuilt when the
-- 
1.7.4.1

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

* [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2011-07-05 19:53 ` [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-07 21:47   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages Thomas Petazzoni
                   ` (23 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

This will allow the bootloader makefiles and the kernel makefile to
rely on the GENTARGETS infrastructure.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.package.in |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 0a4c220..6126e6b 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -304,6 +304,13 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
 	$(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
 	$(Q)touch $@
 
+# Install to images dir
+$(BUILD_DIR)/%/.stamp_images_installed:
+	@$(call MESSAGE,'Installing to images directory')
+	$($(PKG)_INSTALL_IMAGES_CMDS)
+	$(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep))
+	$(Q)touch $@
+
 # Install to target dir
 $(BUILD_DIR)/%/.stamp_target_installed:
 	@$(call MESSAGE,"Installing to target")
@@ -408,12 +415,14 @@ endif
 
 $(2)_DEPENDENCIES		?=
 $(2)_INSTALL_STAGING		?= NO
+$(2)_INSTALL_IMAGES		?= NO
 $(2)_INSTALL_TARGET		?= YES
 $(2)_DIR_PREFIX			= $(if $(4),$(4),$(TOP_SRCDIR)/package)
 
 # define sub-target stamps
 $(2)_TARGET_INSTALL_TARGET =	$$($(2)_DIR)/.stamp_target_installed
 $(2)_TARGET_INSTALL_STAGING =	$$($(2)_DIR)/.stamp_staging_installed
+$(2)_TARGET_INSTALL_IMAGES =	$$($(2)_DIR)/.stamp_images_installed
 $(2)_TARGET_INSTALL_HOST =      $$($(2)_DIR)/.stamp_host_installed
 $(2)_TARGET_BUILD =		$$($(2)_DIR)/.stamp_built
 $(2)_TARGET_CONFIGURE =		$$($(2)_DIR)/.stamp_configured
@@ -438,6 +447,7 @@ $(2)_POST_BUILD_HOOKS           ?=
 $(2)_POST_INSTALL_HOOKS         ?=
 $(2)_POST_INSTALL_STAGING_HOOKS ?=
 $(2)_POST_INSTALL_TARGET_HOOKS  ?=
+$(2)_POST_INSTALL_IMAGES_HOOKS  ?=
 
 # human-friendly targets and target sequencing
 $(1):			$(1)-install
@@ -445,7 +455,7 @@ $(1):			$(1)-install
 ifeq ($$($(2)_TYPE),host)
 $(1)-install:	        $(1)-install-host
 else
-$(1)-install:		$(1)-install-staging $(1)-install-target
+$(1)-install:		$(1)-install-staging $(1)-install-target $(1)-install-images
 endif
 
 ifeq ($$($(2)_INSTALL_TARGET),YES)
@@ -462,6 +472,13 @@ else
 $(1)-install-staging:
 endif
 
+ifeq ($$($(2)_INSTALL_IMAGES),YES)
+$(1)-install-images:	$(1)-build \
+			$$($(2)_TARGET_INSTALL_IMAGES)
+else
+$(1)-install-images:
+endif
+
 $(1)-install-host:      $(1)-build $$($(2)_TARGET_INSTALL_HOST)
 
 $(1)-build:		$(1)-configure \
@@ -493,6 +510,7 @@ $(1)-dirclean:		$$($(2)_TARGET_DIRCLEAN)
 # uppercase package variable prefix
 $$($(2)_TARGET_INSTALL_TARGET):		PKG=$(2)
 $$($(2)_TARGET_INSTALL_STAGING):	PKG=$(2)
+$$($(2)_TARGET_INSTALL_IMAGES):		PKG=$(2)
 $$($(2)_TARGET_INSTALL_HOST):           PKG=$(2)
 $$($(2)_TARGET_BUILD):			PKG=$(2)
 $$($(2)_TARGET_CONFIGURE):		PKG=$(2)
-- 
1.7.4.1

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

* [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2011-07-05 19:53 ` [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/ Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-07 21:50   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions Thomas Petazzoni
                   ` (22 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

The patching procedure was using $($(NOHOSTPKG)_NAME) to find the name
of the package without the host- prefix for host packages, which is
needed to find the package directory and the prefix of the patches.

However, this $($(NOHOSTPKG)_NAME) variable is empty when there is
only an host variant for the package and no target variant for it.

Therefore, instead of using this $($(NOHOSTPKG)_NAME) variable, we now
use a new $(RAWNAME) variable, which is always the name of the package
without the host- prefix, even for host packages.

Thanks to Yann E. Morin for providing the tip on using patsubst
instead of subst.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.package.in |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 6126e6b..e407cdb 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -251,23 +251,21 @@ $(BUILD_DIR)/%/.stamp_extracted:
 
 # Patch
 #
-# The NOHOSTPKG variable is the uppercased package name, without the
-# HOST_ prefix, even for host packages. This allows to find the
-# patches in the package directory, because $($(NOHOSTPKG)_NAME)
-# expands to the package directory name.
-#
-$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION)
+# The RAWNAME variable is the lowercased package name, which allows to
+# find the package directory (typically package/<pkgname>) and the
+# prefix of the patches
+$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
 $(BUILD_DIR)/%/.stamp_patched:
-	@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)")
+	@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
 	$(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
 	$(Q)( \
-	if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \
-	  if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \
-	    toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
+	if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
+	  if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \
+	    toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
 	  else \
-	    toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $($(NOHOSTPKG)_NAME)\*.patch $($(NOHOSTPKG)_NAME)\*.patch.$(ARCH) || exit 1; \
-	    if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER); then \
-	      toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
+	    toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
+	    if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \
+	      toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
 	    fi; \
 	  fi; \
 	fi; \
@@ -515,7 +513,7 @@ $$($(2)_TARGET_INSTALL_HOST):           PKG=$(2)
 $$($(2)_TARGET_BUILD):			PKG=$(2)
 $$($(2)_TARGET_CONFIGURE):		PKG=$(2)
 $$($(2)_TARGET_PATCH):			PKG=$(2)
-$$($(2)_TARGET_PATCH):			NOHOSTPKG=$(3)
+$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))
 $$($(2)_TARGET_EXTRACT):		PKG=$(2)
 $$($(2)_TARGET_SOURCE):			PKG=$(2)
 $$($(2)_TARGET_UNINSTALL):		PKG=$(2)
-- 
1.7.4.1

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

* [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2011-07-05 19:53 ` [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-10  8:57   ` Peter Korsgaard
  2011-07-05 19:53 ` [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS Thomas Petazzoni
                   ` (21 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/barebox/barebox.mk |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index f3e769f..88f222e 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -4,12 +4,13 @@
 #
 #############################################################
 
-BAREBOX_VERSION:=2011.05.0
-BAREBOX_SOURCE:=barebox-$(BAREBOX_VERSION).tar.bz2
-BAREBOX_SITE:=http://www.barebox.org/download/
-BAREBOX_DIR:=$(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
-BAREBOX_CAT:=$(BZCAT)
-BAREBOX_BOARD_DEFCONFIG:=$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
+BAREBOX_VERSION := 2011.05.0
+BAREBOX_SOURCE  := barebox-$(BAREBOX_VERSION).tar.bz2
+BAREBOX_SITE    := http://www.barebox.org/download/
+BAREBOX_DIR     := $(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
+BAREBOX_CAT     := $(BZCAT)
+
+BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
 
 ifeq ($(KERNEL_ARCH),i386)
 BAREBOX_ARCH=x86
-- 
1.7.4.1

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

* [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2011-07-05 19:53 ` [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions Thomas Petazzoni
@ 2011-07-05 19:53 ` Thomas Petazzoni
  2011-07-10 13:03   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 09/28] at91bootstrap: indent properly variable definitions Thomas Petazzoni
                   ` (20 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:53 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/barebox/barebox.mk |   59 +++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 32 deletions(-)

diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 88f222e..65a4f66 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -7,8 +7,11 @@
 BAREBOX_VERSION := 2011.05.0
 BAREBOX_SOURCE  := barebox-$(BAREBOX_VERSION).tar.bz2
 BAREBOX_SITE    := http://www.barebox.org/download/
-BAREBOX_DIR     := $(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
-BAREBOX_CAT     := $(BZCAT)
+
+BAREBOX_INSTALL_IMAGES = YES
+ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+BAREBOX_INSTALL_TARGET = NO
+endif
 
 BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
 
@@ -22,41 +25,33 @@ endif
 
 BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
 
-$(DL_DIR)/$(BAREBOX_SOURCE):
-	 $(call DOWNLOAD,$(BAREBOX_SITE),$(BAREBOX_SOURCE))
-
-$(BAREBOX_DIR)/.unpacked: $(DL_DIR)/$(BAREBOX_SOURCE)
-	mkdir -p $(@D)
-	$(INFLATE$(suffix $(BAREBOX_SOURCE))) $(DL_DIR)/$(BAREBOX_SOURCE) \
-		| tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
-	touch $@
+define BAREBOX_CONFIGURE_CMDS
+	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
+endef
 
-$(BAREBOX_DIR)/.patched: $(BAREBOX_DIR)/.unpacked
-	toolchain/patch-kernel.sh $(BAREBOX_DIR) boot/barebox \
-		barebox-$(BAREBOX_VERSION)-\*.patch \
-		barebox-$(BAREBOX_VERSION)-\*.patch.$(ARCH)
-	touch $@
-
-$(BAREBOX_DIR)/.configured: $(BAREBOX_DIR)/.patched
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
-	touch $@
+ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+define BAREBOX_BUILD_BAREBOXENV_CMDS
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
+		$(@D)/scripts/bareboxenv.c
+endef
+endif
 
-$(BAREBOX_DIR)/.built: $(BAREBOX_DIR)/.configured
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR)
-	touch $@
+define BAREBOX_BUILD_CMDS
+	$(BAREBOX_BUILD_BAREBOXENV_CMDS)
+	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
+endef
 
-$(BAREBOX_DIR)/.installed: $(BAREBOX_DIR)/.built
-	cp $(BAREBOX_DIR)/barebox.bin $(BINARIES_DIR)
-	touch $@
+define BAREBOX_INSTALL_IMAGES_CMDS
+	cp $(@D)/barebox.bin $(BINARIES_DIR)
+endef
 
-# bareboxenv for the target
-$(TARGET_DIR)/usr/bin/bareboxenv: $(BAREBOX_DIR)/.configured
-	mkdir -p $(@D)
-	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $@ \
-		$(BAREBOX_DIR)/scripts/bareboxenv.c
+ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+define BAREBOX_INSTALL_TARGET_CMDS
+	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
+endef
+endif
 
-barebox: $(BAREBOX_DIR)/.installed \
-	$(if $(BR2_TARGET_BAREBOX_BAREBOXENV),$(TARGET_DIR)/usr/bin/bareboxenv)
+$(eval $(call GENTARGETS,boot,barebox))
 
 ifeq ($(BR2_TARGET_BAREBOX),y)
 TARGETS+=barebox
-- 
1.7.4.1

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

* [Buildroot] [PATCH 09/28] at91bootstrap: indent properly variable definitions
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2011-07-05 19:53 ` [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/at91bootstrap/at91bootstrap.mk |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
index 3d4308e..d753d5b 100644
--- a/boot/at91bootstrap/at91bootstrap.mk
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -3,17 +3,17 @@
 # at91bootstrap
 #
 #############################################################
-AT91BOOTSTRAP_VERSION:=1.16
-AT91BOOTSTRAP_NAME:=AT91Bootstrap$(AT91BOOTSTRAP_VERSION)
-AT91BOOTSTRAP_SITE:=http://www.atmel.com/dyn/resources/prod_documents/
-AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).zip
-AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION)
+AT91BOOTSTRAP_VERSION := 1.16
+AT91BOOTSTRAP_NAME    := AT91Bootstrap$(AT91BOOTSTRAP_VERSION)
+AT91BOOTSTRAP_SITE    := http://www.atmel.com/dyn/resources/prod_documents/
+AT91BOOTSTRAP_SOURCE  := $(AT91BOOTSTRAP_NAME).zip
+AT91BOOTSTRAP_DIR     := $(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION)
 
-AT91BOOTSTRAP_BOARD:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
-AT91BOOTSTRAP_MEMORY:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
-AT91BOOTSTRAP_BINARY:=$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
-AT91BOOTSTRAP_BUILD_DIR:=$(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
-AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY)
+AT91BOOTSTRAP_BOARD     := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
+AT91BOOTSTRAP_MEMORY    := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
+AT91BOOTSTRAP_BINARY    := $(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
+AT91BOOTSTRAP_BUILD_DIR := $(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
+AT91BOOTSTRAP_TARGET    := $(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY)
 
 $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE):
 	 $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE))
-- 
1.7.4.1

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

* [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 09/28] at91bootstrap: indent properly variable definitions Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 13:10   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 11/28] at91dataflashboot: indent properly variable definitions Thomas Petazzoni
                   ` (18 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/at91bootstrap/at91bootstrap.mk |   53 ++++++++++++-----------------------
 1 files changed, 18 insertions(+), 35 deletions(-)

diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
index d753d5b..66fc961 100644
--- a/boot/at91bootstrap/at91bootstrap.mk
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -4,49 +4,32 @@
 #
 #############################################################
 AT91BOOTSTRAP_VERSION := 1.16
-AT91BOOTSTRAP_NAME    := AT91Bootstrap$(AT91BOOTSTRAP_VERSION)
 AT91BOOTSTRAP_SITE    := http://www.atmel.com/dyn/resources/prod_documents/
-AT91BOOTSTRAP_SOURCE  := $(AT91BOOTSTRAP_NAME).zip
-AT91BOOTSTRAP_DIR     := $(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION)
+AT91BOOTSTRAP_SOURCE  := AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip
 
-AT91BOOTSTRAP_BOARD     := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
-AT91BOOTSTRAP_MEMORY    := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
-AT91BOOTSTRAP_BINARY    := $(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
-AT91BOOTSTRAP_BUILD_DIR := $(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
-AT91BOOTSTRAP_TARGET    := $(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY)
+AT91BOOTSTRAP_BOARD       := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
+AT91BOOTSTRAP_MEMORY      := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
+AT91BOOTSTRAP_MAKE_SUBDIR := board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
+AT91BOOTSTRAP_BINARY      := $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
 
-$(DL_DIR)/$(AT91BOOTSTRAP_SOURCE):
-	 $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE))
+AT91BOOTSTRAP_INSTALL_IMAGES = YES
+AT91BOOTSTRAP_INSTALL_TARGET = NO
 
-$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
-	mkdir -p $(BUILD_DIR)
+define AT91BOOTSTRAP_EXTRACT_CMDS
 	unzip -d $(BUILD_DIR) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
-	mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) $(AT91BOOTSTRAP_DIR)
-	touch $@
+	mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)/* $(@D)
+	rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)
+endef
 
-$(AT91BOOTSTRAP_DIR)/.patched: $(AT91BOOTSTRAP_DIR)/.unpacked
-	toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
-	touch $@
+define AT91BOOTSTRAP_BUILD_CMDS
+	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR)
+endef
 
-$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.patched
-	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
-		-C $(AT91BOOTSTRAP_BUILD_DIR)
+define AT91BOOTSTRAP_INSTALL_IMAGES_CMDS
+	cp $(@D)/$(AT91BOOTSTRAP_BINARY) $(BINARIES_DIR)
+endef
 
-$(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY): $(AT91BOOTSTRAP_TARGET)
-	mkdir -p $(dir $@)
-	cp $^ $@
-
-at91bootstrap: $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY)
-
-at91bootstrap-source: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
-
-at91bootstrap-unpacked: $(AT91BOOTSTRAP_DIR)/.unpacked
-
-at91bootstrap-clean:
-	make -C $(AT91BOOTSTRAP_BUILD_DIR) clean
-
-at91bootstrap-dirclean:
-	rm -rf $(AT91BOOTSTRAP_DIR)
+$(eval $(call GENTARGETS,boot,at91bootstrap))
 
 #############################################################
 #
-- 
1.7.4.1

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

* [Buildroot] [PATCH 11/28] at91dataflashboot: indent properly variable definitions
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/at91dataflashboot/at91dataflashboot.mk |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk
index 32591f7..d661616 100644
--- a/boot/at91dataflashboot/at91dataflashboot.mk
+++ b/boot/at91dataflashboot/at91dataflashboot.mk
@@ -3,12 +3,12 @@
 # DataFlashBoot
 #
 #############################################################
-DATAFLASHBOOT_VERSION:=1.05
-DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION)
-DATAFLASHBOOT_SITE:=ftp://www.at91.com/pub/buildroot/
-DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2
-DATAFLASHBOOT_DIR:=$(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION)
-DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin
+DATAFLASHBOOT_VERSION := 1.05
+DATAFLASHBOOT_NAME    := DataflashBoot-$(DATAFLASHBOOT_VERSION)
+DATAFLASHBOOT_SITE    := ftp://www.at91.com/pub/buildroot/
+DATAFLASHBOOT_SOURCE  := $(DATAFLASHBOOT_NAME).tar.bz2
+DATAFLASHBOOT_DIR     := $(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION)
+DATAFLASHBOOT_BINARY  := $(DATAFLASHBOOT_NAME).bin
 
 $(DL_DIR)/$(DATAFLASHBOOT_SOURCE):
 	 $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE))
-- 
1.7.4.1

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

* [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (10 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 11/28] at91dataflashboot: indent properly variable definitions Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 13:16   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 13/28] syslinux: " Thomas Petazzoni
                   ` (16 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

This commit converts the at91dataflashboot bootloader build process to
GENTARGETS. It also does the following changes :

 * As the package directory name is at91dataflashboot, the
   configuration options and make variables are renamed to
   AT91DATAFLASHBOOT instead of DATAFLASHBOOT.

 * Since the board selection in Kconfig wasn't used anywhere, get rid
   of it. at91dataflashboot is only for AT91RM9200 apparently anyway.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/at91dataflashboot/Config.in            |   24 +--------------
 boot/at91dataflashboot/at91dataflashboot.mk |   43 +++++++++------------------
 2 files changed, 15 insertions(+), 52 deletions(-)

diff --git a/boot/at91dataflashboot/Config.in b/boot/at91dataflashboot/Config.in
index 25b9723..88cd058 100644
--- a/boot/at91dataflashboot/Config.in
+++ b/boot/at91dataflashboot/Config.in
@@ -1,25 +1,3 @@
-menuconfig BR2_TARGET_DATAFLASHBOOT
+menuconfig BR2_TARGET_AT91DATAFLASHBOOT
        depends on BR2_arm
        bool "AT91 DataFlashBoot"
-
-if BR2_TARGET_DATAFLASHBOOT
-
-choice
-	prompt "Target Architecture"
-	default BR2_TARGET_DATAFLASHBOOT_AT91RM9200
-	help
-	  Select Chip for which Dataflash boot should be built
-	  Currently only AT91RM9200 Supported
-
-config BR2_TARGET_DATAFLASHBOOT_AT91RM9200
-	bool "AT91RM9200"
-
-config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261
-	bool "AT91SAM9261"
-
-config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261S
-	bool "AT91SAM9261S"
-
-endchoice
-
-endif # BR2_TARGET_DATAFLASHBOOT
diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk
index d661616..652b861 100644
--- a/boot/at91dataflashboot/at91dataflashboot.mk
+++ b/boot/at91dataflashboot/at91dataflashboot.mk
@@ -3,44 +3,29 @@
 # DataFlashBoot
 #
 #############################################################
-DATAFLASHBOOT_VERSION := 1.05
-DATAFLASHBOOT_NAME    := DataflashBoot-$(DATAFLASHBOOT_VERSION)
-DATAFLASHBOOT_SITE    := ftp://www.at91.com/pub/buildroot/
-DATAFLASHBOOT_SOURCE  := $(DATAFLASHBOOT_NAME).tar.bz2
-DATAFLASHBOOT_DIR     := $(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION)
-DATAFLASHBOOT_BINARY  := $(DATAFLASHBOOT_NAME).bin
 
-$(DL_DIR)/$(DATAFLASHBOOT_SOURCE):
-	 $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE))
+AT91DATAFLASHBOOT_VERSION := 1.05
+AT91DATAFLASHBOOT_SOURCE  := DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).tar.bz2
+AT91DATAFLASHBOOT_SITE    := ftp://www.at91.com/pub/buildroot/
 
-$(DATAFLASHBOOT_DIR)/.unpacked: $(DL_DIR)/$(DATAFLASHBOOT_SOURCE)
-	mkdir -p $(@D)
-	$(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
-	touch $@
+AT91DATAFLASHBOOT_INSTALL_TARGET = NO
+AT91DATAFLASHBOOT_INSTALL_IMAGES = YES
 
-$(DATAFLASHBOOT_DIR)/.patched: $(DATAFLASHBOOT_DIR)/.unpacked
-	toolchain/patch-kernel.sh $(@D) boot/at91dataflashboot \
-		at91dataflashboot-$(DATAFLASHBOOT_VERSION)-\*.patch
-	touch $@
+define AT91DATAFLASHBOOT_BUILD_CMDS
+	make -C $(@D) CROSS_COMPILE=$(TARGET_CROSS)
+endef
 
-$(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY): $(DATAFLASHBOOT_DIR)/.patched
-	ls $(DATAFLASHBOOT_DIR)/.unpacked
-	make -C $(DATAFLASHBOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS)
+define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS
+	cp $(@D)/DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).bin $(BINARIES_DIR)
+endef
 
-dataflashboot-clean:
-	make -C $(DATAFLASHBOOT_DIR) clean
-
-dataflashboot-dirclean:
-	rm -rf $(DATAFLASHBOOT_DIR)
-
-dataflash:	 $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY)
-	cp $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY) $(BINARIES_DIR)
+$(eval $(call GENTARGETS,boot,at91dataflashboot))
 
 #############################################################
 #
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_TARGET_DATAFLASHBOOT),y)
-TARGETS+=dataflash
+ifeq ($(BR2_TARGET_AT91DATAFLASHBOOT),y)
+TARGETS+=at91dataflashboot
 endif
-- 
1.7.4.1

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

* [Buildroot] [PATCH 13/28] syslinux: convert to GENTARGETS
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (11 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 13:27   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS Thomas Petazzoni
                   ` (15 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Moreover, the installation of pxelinux and/or isolinux is now selected
to suboptions, as we traditionally do for other packages. This allows
to have a single option (BR2_TARGET_SYSLINUX) that enables the
syslinux package.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/syslinux/Config.in   |   14 ++++++++----
 boot/syslinux/syslinux.mk |   50 +++++++++++++++-----------------------------
 2 files changed, 26 insertions(+), 38 deletions(-)

diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in
index 5650f91..60f3b8f 100644
--- a/boot/syslinux/Config.in
+++ b/boot/syslinux/Config.in
@@ -5,8 +5,12 @@ config BR2_TARGET_SYSLINUX
 	  The syslinux bootloader for x86 systems.
 	  This includes: syslinux, pxelinux, extlinux.
 
-config BR2_TARGET_PXELINUX
-	bool "pxelinux"
-	depends on BR2_i386 || BR2_x86_64
-	help
-	  The pxelinux loader for x86 systems.
+config BR2_TARGET_SYSLINUX_ISOLINUX
+	bool "Install isolinux"
+	depends on BR2_TARGET_SYSLINUX
+	default y
+
+config BR2_TARGET_SYSLINUX_PXELINUX
+	bool "Install pxelinux"
+	depends on BR2_TARGET_SYSLINUX
+	default y
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index 192e905..d1b2907 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -4,42 +4,29 @@
 #
 #############################################################
 
-SYSLINUX_VERSION:=3.85
-SYSLINUX_DIR=$(BUILD_DIR)/syslinux-$(SYSLINUX_VERSION)
-SYSLINUX_SOURCE=syslinux-$(SYSLINUX_VERSION).tar.bz2
-SYSLINUX_CAT:=$(BZCAT)
-SYSLINUX_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/3.xx/
+SYSLINUX_VERSION = 3.85
+SYSLINUX_SOURCE  = syslinux-$(SYSLINUX_VERSION).tar.bz2
+SYSLINUX_SITE    = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/3.xx/
 
-$(DL_DIR)/$(SYSLINUX_SOURCE):
-	 $(call DOWNLOAD,$(SYSLINUX_SITE),$(SYSLINUX_SOURCE))
+SYSLINUX_INSTALL_TARGET = NO
+SYSLINUX_INSTALL_IMAGES = YES
 
-syslinux-source: $(DL_DIR)/$(SYSLINUX_SOURCE)
+SYSLINUX_DEPENDENCIES = host-nasm
 
-$(SYSLINUX_DIR)/.unpacked: $(DL_DIR)/$(SYSLINUX_SOURCE) $(SYSLINUX_PATCH)
-	mkdir -p $(@D)
-	$(SYSLINUX_CAT) $(DL_DIR)/$(SYSLINUX_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(@D) boot/syslinux/ \*.patch
-	touch -c $@
+define SYSLINUX_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(@D)
+endef
 
-$(SYSLINUX_DIR)/.compiled: $(SYSLINUX_DIR)/.unpacked
-	$(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(SYSLINUX_DIR)
-	touch -c $@
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += isolinux.bin
+SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += pxelinux.bin
 
-$(BINARIES_DIR)/isolinux.bin: $(SYSLINUX_DIR)/.compiled
-	cp -a $(SYSLINUX_DIR)/core/isolinux.bin $@
+define SYSLINUX_INSTALL_IMAGES_CMDS
+	for i in $(SYSLINUX_IMAGES-y); do \
+		$(INSTALL) -D -m 0755 $(@D)/core/$$i $(BINARIES_DIR)/`basename $$i`; \
+	done
+endef
 
-$(BINARIES_DIR)/pxelinux.bin: $(SYSLINUX_DIR)/.compiled
-	cp -a $(SYSLINUX_DIR)/core/pxelinux.bin $@
-
-syslinux: host-nasm $(BINARIES_DIR)/isolinux.bin
-pxelinux: host-nasm $(BINARIES_DIR)/pxelinux.bin
-
-pxelinux-clean syslinux-clean:
-	rm -f $(BINARIES_DIR)/isolinux.bin $(BINARIES_DIR)/pxelinux.bin
-	-$(MAKE) -C $(SYSLINUX_DIR) clean
-
-pxelinux-dirclean syslinux-dirclean:
-	rm -rf $(SYSLINUX_DIR)
+$(eval $(call GENTARGETS,boot,syslinux))
 
 #############################################################
 #
@@ -49,6 +36,3 @@ pxelinux-dirclean syslinux-dirclean:
 ifeq ($(BR2_TARGET_SYSLINUX),y)
 TARGETS+=syslinux
 endif
-ifeq ($(BR2_TARGET_PXELINUX),y)
-TARGETS+=pxelinux
-endif
-- 
1.7.4.1

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

* [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (12 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 13/28] syslinux: " Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 13:30   ` Peter Korsgaard
  2011-08-20  9:22   ` Darius Augulis
  2011-07-05 19:54 ` [Buildroot] [PATCH 15/28] grub2: remove package Thomas Petazzoni
                   ` (14 subsequent siblings)
  28 siblings, 2 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/grub/grub.500-build-fix.patch |   14 +++++
 boot/grub/grub.mk                  |  102 ++++++++++++++----------------------
 2 files changed, 53 insertions(+), 63 deletions(-)
 create mode 100644 boot/grub/grub.500-build-fix.patch

diff --git a/boot/grub/grub.500-build-fix.patch b/boot/grub/grub.500-build-fix.patch
new file mode 100644
index 0000000..b096b7b
--- /dev/null
+++ b/boot/grub/grub.500-build-fix.patch
@@ -0,0 +1,14 @@
+--- grub-0.97.orig/netboot/main.c       2004-05-21 00:19:33.000000000 +0200
++++ grub-0.97/netboot/main.c    2007-07-20 02:31:28.000000000 +0200
+@@ -54,9 +54,9 @@
+ 
+ static int vendorext_isvalid;
+ static unsigned long netmask;
+-static struct bootpd_t bootp_data;
++struct bootpd_t bootp_data;
+ static unsigned long xid;
+-static unsigned char *end_of_rfc1533 = NULL;
++unsigned char *end_of_rfc1533 = NULL;
+
+ #ifndef        NO_DHCP_SUPPORT
+ #endif /* NO_DHCP_SUPPORT */
diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
index 9461d1c..4938416 100644
--- a/boot/grub/grub.mk
+++ b/boot/grub/grub.mk
@@ -3,23 +3,17 @@
 # grub
 #
 #############################################################
-GRUB_SOURCE:=grub_0.97.orig.tar.gz
-GRUB_PATCH:=grub_0.97-35.diff.gz
-GRUB_SITE:=http://snapshot.debian.org/archive/debian/20080329T000000Z/pool/main/g/grub/
-GRUB_PATCH_SITE:=$(GRUB_SITE)
-GRUB_CAT:=$(ZCAT)
-GRUB_DIR:=$(BUILD_DIR)/grub-0.97
-GRUB_BINARY:=grub/grub
-GRUB_TARGET_BINARY:=sbin/grub
-GRUB_SPLASHIMAGE=$(TOPDIR)/boot/grub/splash.xpm.gz
 
+GRUB_VERSION = 0.97
+GRUB_SOURCE = grub_$(GRUB_VERSION).orig.tar.gz
+GRUB_PATCH  = grub_$(GRUB_VERSION)-35.diff.gz
+GRUB_SITE   = http://snapshot.debian.org/archive/debian/20080329T000000Z/pool/main/g/grub/
 
 GRUB_CFLAGS=-DSUPPORT_LOOPDEV
 ifeq ($(BR2_LARGEFILE),)
 GRUB_CFLAGS+=-U_FILE_OFFSET_BITS
 endif
 
-
 GRUB_CONFIG-$(BR2_TARGET_GRUB_SPLASH) += --enable-graphics
 GRUB_CONFIG-$(BR2_TARGET_GRUB_DISKLESS) += --enable-diskless
 GRUB_CONFIG-$(BR2_TARGET_GRUB_3c595) += --enable-3c595
@@ -44,69 +38,51 @@ GRUB_CONFIG-$(BR2_TARGET_GRUB_undi) += --enable-undi
 GRUB_CONFIG-$(BR2_TARGET_GRUB_via_rhine) += --enable-via-rhine
 GRUB_CONFIG-$(BR2_TARGET_GRUB_w89c840) += --enable-w89c840
 
-$(DL_DIR)/$(GRUB_SOURCE):
-	 $(call DOWNLOAD,$(GRUB_SITE),$(GRUB_SOURCE))
-
-$(DL_DIR)/$(GRUB_PATCH):
-	 $(call DOWNLOAD,$(GRUB_PATCH_SITE),$(GRUB_PATCH))
+define GRUB_DEBIAN_PATCHES
+	# Apply the patches from the Debian patch
+	(cd $(@D) ; for f in `cat debian/patches/00list | grep -v ^#` ; do \
+		cat debian/patches/$$f | patch -p1 ; \
+	done)
+endef
 
-grub-source: $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH)
+GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES
 
-$(GRUB_DIR)/.unpacked: $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH)
-	$(GRUB_CAT) $(DL_DIR)/$(GRUB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
-	toolchain/patch-kernel.sh $(GRUB_DIR) $(DL_DIR) $(GRUB_PATCH)
-	for i in `grep -v "^#" $(GRUB_DIR)/debian/patches/00list`; do \
-		cat $(GRUB_DIR)/debian/patches/$$i | patch -p1 -d $(GRUB_DIR); \
-	done
-	toolchain/patch-kernel.sh $(GRUB_DIR) boot/grub grub.\*.patch{,.bz2}
-	touch $@
+GRUB_CONF_ENV = \
+	CFLAGS="$(TARGET_CFLAGS) $(GRUB_CFLAGS)"
 
-$(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked
-	(cd $(GRUB_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		CPPFLAGS="$(GRUB_CFLAGS)" \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/ \
-		--mandir=/usr/man \
-		--infodir=/usr/info \
-		--disable-auto-linux-mem-opt \
-		$(GRUB_CONFIG-y) \
-	)
-	touch $@
+GRUB_CONF_OPT = \
+	--disable-auto-linux-mem-opt \
+	$(GRUB_CONFIG-y)
 
-$(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured
-	$(MAKE) CC="$(TARGET_CC)" -C $(GRUB_DIR)
-	rm -f $(GRUB_DIR)/$(GRUB_BINARY)
-	$(MAKE) CC="$(TARGET_CC)" CFLAGS+=-static -C $(GRUB_DIR)/grub grub
-	mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY))
-	mv $(GRUB_DIR)/$(GRUB_BINARY) $(STAGING_DIR)/$(GRUB_TARGET_BINARY).static
-	$(MAKE) CC="$(TARGET_CC)" -C $(GRUB_DIR)/grub
+define GRUB_INSTALL_STAGING_CMDS
+	install -m 0755 -D $(@D)/grub/grub $(STAGING_DIR)/sbin/grub
+endef
 
-$(GRUB_DIR)/.installed: $(GRUB_DIR)/$(GRUB_BINARY)
-	cp $(GRUB_DIR)/$(GRUB_BINARY) $(TARGET_DIR)/$(GRUB_TARGET_BINARY)
-	test -d $(TARGET_DIR)/boot/grub || mkdir -p $(TARGET_DIR)/boot/grub
-	cp $(GRUB_DIR)/stage1/stage1 $(GRUB_DIR)/stage2/*1_5 $(GRUB_DIR)/stage2/stage2 $(TARGET_DIR)/boot/grub/
 ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
-	test -f $(TARGET_DIR)/boot/grub/$(GRUB_SPLASHIMAGE) || \
-		cp $(GRUB_SPLASHIMAGE) $(TARGET_DIR)/boot/grub/
+define GRUB_INSTALL_SPLASH
+	cp boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/
+endef
 endif
-	touch $@
 
-grub: $(GRUB_DIR)/.installed
+define GRUB_INSTALL_TARGET_CMDS
+	install -m 0755 -D $(@D)/grub/grub $(TARGET_DIR)/sbin/grub
+	mkdir -p $(TARGET_DIR)/boot/grub
+	cp $(@D)/stage1/stage1 $(TARGET_DIR)/boot/grub
+	cp $(@D)/stage2/*1_5   $(TARGET_DIR)/boot/grub
+	cp $(@D)/stage2/stage2 $(TARGET_DIR)/boot/grub
+	$(GRUB_INSTALL_SPLASH)
+endef
+
+define GRUB_UNINSTALL_STAGING_CMDS
+	rm -f $(STAGING_DIR)/sbin/grub
+endef
 
-grub-clean:
-	$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GRUB_DIR) uninstall
-	-$(MAKE) -C $(GRUB_DIR) clean
-	rm -f $(TARGET_DIR)/boot/grub/$(GRUB_SPLASHIMAGE) \
-		$(TARGET_DIR)/sbin/$(GRUB_BINARY) \
-		$(TARGET_DIR)/boot/grub/{stage{1,2},*1_5}
+define GRUB_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/sbin/grub
+	rm -rf $(TARGET_DIR)/boot/grub
+endef
 
-grub-dirclean:
-	rm -rf $(GRUB_DIR)
+$(eval $(call AUTOTARGETS,boot,grub))
 
 #############################################################
 #
-- 
1.7.4.1

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

* [Buildroot] [PATCH 15/28] grub2: remove package
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (13 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 13:31   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS Thomas Petazzoni
                   ` (13 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Grub 2 has been marked BROKEN in June 2010, and nobody cared to fix it
since then.

At that time, it was marked broken because the build process needed a
Ruby interpreter available on the host, and it's really a pain that
building a bootloader needs such a thing.

I've tried to upgrade the package to Grub2 1.99-rcX, and now it does
not need a Ruby interpreter anymore, but instead requires a tool
called "autogen", which itself needs the Guile Scheme interpreter.

Since we haven't heard any complaints about Grub2 being marked broken,
and since it's such a pain to package, let's get rid of it. Of course,
anybody interested in Grub2 is invited to contribute a working
package.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/Config.in       |    1 -
 boot/grub2/Config.in |    9 -----
 boot/grub2/grub2.mk  |   93 --------------------------------------------------
 3 files changed, 0 insertions(+), 103 deletions(-)
 delete mode 100644 boot/grub2/Config.in
 delete mode 100644 boot/grub2/grub2.mk

diff --git a/boot/Config.in b/boot/Config.in
index 6bcc98a..67ab8ac 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -2,7 +2,6 @@ menu "Bootloaders"
 
 source "boot/barebox/Config.in"
 source "boot/grub/Config.in"
-source "boot/grub2/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/u-boot/Config.in"
 source "boot/at91bootstrap/Config.in"
diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in
deleted file mode 100644
index 1301b5b..0000000
--- a/boot/grub2/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_TARGET_GRUB2
-	bool "grub2"
-	# Only supports PC, Mac (Power, x86 and x86-64), Pegasos
-	depends on BR2_i386 || BR2_powerpc
-	# Build process is broken (./configure doesn't work, Ruby
-	# required, etc.)
-	depends on BROKEN
-	help
-	  The GRand Unified Bootloader for x86 systems, take #2.
diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
deleted file mode 100644
index f939d9a..0000000
--- a/boot/grub2/grub2.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-#############################################################
-#
-# grub2
-#
-# TODO
-#
-#  * grub2's autogen uses ruby, which isn't part of the core Debian
-#    installation. So either decide it is a requirement for Buildroot,
-#    or build it for the host.
-#
-#  * improve the installation procedure. For the moment, it just
-#    installs everything in $(TARGET_DIR).
-#
-#############################################################
-GRUB2_SOURCE:=grub2_1.98.orig.tar.gz
-GRUB2_PATCH:=grub2_1.98-1.diff.gz
-GRUB2_SITE=$(BR2_DEBIAN_MIRROR)/debian/pool/main/g/grub2
-GRUB2_PATCH_SITE:=$(GRUB2_SITE)
-GRUB2_CAT:=$(ZCAT)
-GRUB2_DIR:=$(BUILD_DIR)/grub-1.98
-
-GRUB2_CFLAGS=-DSUPPORT_LOOPDEV
-ifeq ($(BR2_LARGEFILE),)
-GRUB2_CFLAGS+=-U_FILE_OFFSET_BITS
-endif
-
-$(DL_DIR)/$(GRUB2_SOURCE):
-	 $(call DOWNLOAD,$(GRUB2_SITE),$(GRUB2_SOURCE))
-
-$(DL_DIR)/$(GRUB2_PATCH):
-	 $(call DOWNLOAD,$(GRUB2_PATCH_SITE),$(GRUB2_PATCH))
-
-grub2-source: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH)
-
-$(GRUB2_DIR)/.unpacked: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH)
-	mkdir -p $(@D)
-	$(GRUB2_CAT) $(DL_DIR)/$(GRUB2_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) -xvf -
-	toolchain/patch-kernel.sh $(@D) $(DL_DIR) $(GRUB2_PATCH)
-	for i in `grep -v "^#" $(@D)/debian/patches/00list`; do \
-		cat $(@D)/debian/patches/$$i | patch -p1 -d $(@D); \
-	done
-	toolchain/patch-kernel.sh $(@D) boot/grub2 grub-\*.patch
-	touch $@
-
-$(GRUB2_DIR)/.configured: $(GRUB2_DIR)/.unpacked
-	(cd $(GRUB2_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) ; \
-		./autogen.sh ; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		CPPFLAGS="$(GRUB2_CFLAGS)" \
-		grub_cv_i386_check_nested_functions=no \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/ \
-		--mandir=/usr/man \
-		--infodir=/usr/info \
-		--disable-grub-mkfont \
-		--disable-grub-fstest \
-		--disable-grub-emu-usb \
-		--disable-werror \
-		$(DISABLE_LARGEFILE) \
-		$(GRUB2_CONFIG-y) \
-	)
-	touch $@
-
-$(GRUB2_DIR)/.compiled: $(GRUB2_DIR)/.configured
-	$(MAKE) CC="$(TARGET_CC)" -C $(@D)
-	touch $@
-
-$(GRUB2_DIR)/.installed: $(GRUB2_DIR)/.compiled
-	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
-	touch $@
-
-grub2: host-automake host-autoconf $(GRUB2_DIR)/.installed
-
-grub2-clean:
-	$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GRUB2_DIR) uninstall
-	-$(MAKE) -C $(GRUB2_DIR) clean
-
-grub2-dirclean:
-	rm -rf $(GRUB2_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_TARGET_GRUB2),y)
-TARGETS+=grub2
-endif
-- 
1.7.4.1

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

* [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (14 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 15/28] grub2: remove package Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 20:07   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 17/28] uboot-mkimage: new package Thomas Petazzoni
                   ` (12 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

The feature of building mkimage for the target is removed, it wasn't
building with current U-Boot, and doesn't make a lot of sense (mkimage
is needed only to prepare a kernel image, or an U-Boot script).

The feature of building mkimage for the host is moved to a proper
package. It duplicates a few things (U-Boot URL, etc.) but it makes
things a lot cleaner than having it handled by boot/u-boot/u-boot.mk.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/u-boot/Config.in |    5 -
 boot/u-boot/u-boot.mk |  218 +++++++++++++++++--------------------------------
 2 files changed, 74 insertions(+), 149 deletions(-)

diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in
index 00a4a5f..aada346 100644
--- a/boot/u-boot/Config.in
+++ b/boot/u-boot/Config.in
@@ -77,11 +77,6 @@ config BR2_TARGET_UBOOT_FORMAT_LDR
 
 endchoice
 
-config BR2_TARGET_UBOOT_TOOL_MKIMAGE
-	bool "mkimage tool in target"
-	help
-	  Install mkimage tool in target.
-
 config BR2_TARGET_UBOOT_TOOL_ENV
 	bool "fw_printenv tool in target"
 	help
diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk
index 047f2c8..215b1c7 100644
--- a/boot/u-boot/u-boot.mk
+++ b/boot/u-boot/u-boot.mk
@@ -3,43 +3,31 @@
 # U-Boot
 #
 #############################################################
-U_BOOT_VERSION:=$(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
-U_BOOT_BOARD_NAME:=$(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
-
-# U-Boot may not be selected in the configuration, but mkimage might
-# be needed to build/prepare a kernel image. In this case, we just
-# pick some random stable U-Boot version that will be used just to
-# build mkimage.
-ifeq ($(U_BOOT_VERSION),)
-U_BOOT_VERSION=2011.03
-endif
+U_BOOT_VERSION    = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
+U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
+
+U_BOOT_INSTALL_IMAGES = YES
 
 ifeq ($(U_BOOT_VERSION),custom)
 # Handle custom U-Boot tarballs as specified by the configuration
-U_BOOT_TARBALL=$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
-U_BOOT_SITE:=$(dir $(U_BOOT_TARBALL))
-U_BOOT_SOURCE:=$(notdir $(U_BOOT_TARBALL))
+U_BOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
+U_BOOT_SITE    = $(dir $(U_BOOT_TARBALL))
+U_BOOT_SOURCE  = $(notdir $(U_BOOT_TARBALL))
 else
 # Handle stable official U-Boot versions
-U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot
-U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
+U_BOOT_SITE    = ftp://ftp.denx.de/pub/u-boot
+U_BOOT_SOURCE  = u-boot-$(U_BOOT_VERSION).tar.bz2
 endif
 
-U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
-U_BOOT_CAT:=$(BZCAT)
-
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
-U_BOOT_BIN:=u-boot.kwb
-U_BOOT_MAKE_OPT:=$(U_BOOT_BIN)
+U_BOOT_BIN          = u-boot.kwb
+U_BOOT_MAKE_TARGET  = $(U_BOOT_BIN)
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y)
-U_BOOT_BIN:=u-boot.ldr
+U_BOOT_BIN          = u-boot.ldr
 else
-U_BOOT_BIN:=u-boot.bin
+U_BOOT_BIN          = u-boot.bin
 endif
 
-MKIMAGE:=$(HOST_DIR)/usr/bin/mkimage
-
-U_BOOT_TARGETS:=$(BINARIES_DIR)/$(U_BOOT_BIN) $(MKIMAGE)
 U_BOOT_ARCH=$(KERNEL_ARCH)
 
 # u-boot in the past used arch=ppc for powerpc
@@ -47,139 +35,81 @@ ifneq ($(findstring x2010.03,x$(U_BOOT_VERSION)),)
 U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc)
 endif
 
-U_BOOT_INC_CONF_FILE:=$(U_BOOT_DIR)/include/config.h
-
-ifeq ($(BR2_TARGET_UBOOT_TOOL_MKIMAGE),y)
-U_BOOT_TARGETS+=$(TARGET_DIR)/usr/bin/mkimage
-endif
-ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
-U_BOOT_TARGETS+=$(TARGET_DIR)/usr/sbin/fw_printenv
-endif
-
 U_BOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1
-
-# Define a helper function
+U_BOOT_MAKE_OPTS += \
+	CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
+	ARCH=$(U_BOOT_ARCH)
+
+# Helper function to fill the U-Boot config.h file.
+# Argument 1: option name
+# Argument 2: option value
+# If the option value is empty, this function does nothing.
 define insert_define
- at echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
- at echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
- at echo "#endif" >> $(U_BOOT_INC_CONF_FILE)
- at echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(U_BOOT_INC_CONF_FILE)
+$(if $(call qstrip,$(2)),
+	@echo "#ifdef $(strip $(1))" >> $(@D)/include/config.h
+	@echo "#undef $(strip $(1))" >> $(@D)/include/config.h
+	@echo "#endif" >> $(@D)/include/config.h
+	@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h)
 endef
 
-$(DL_DIR)/$(U_BOOT_SOURCE):
-	 $(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE))
-
-$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE)
-	mkdir -p $(@D)
-	$(INFLATE$(suffix $(U_BOOT_SOURCE))) $(DL_DIR)/$(U_BOOT_SOURCE) \
-		| tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
-	touch $@
-
-$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
-	toolchain/patch-kernel.sh $(U_BOOT_DIR) boot/u-boot \
-		u-boot-$(U_BOOT_VERSION)-\*.patch \
-		u-boot-$(U_BOOT_VERSION)-\*.patch.$(ARCH)
 ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
-	toolchain/patch-kernel.sh $(U_BOOT_DIR) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) u-boot-$(U_BOOT_VERSION)-\*.patch
-endif
-	touch $@
+define U_BOOT_APPLY_CUSTOM_PATCHES
+	toolchain/patch-kernel.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
+		u-boot-$(U_BOOT_VERSION)-\*.patch
+endef
 
-$(U_BOOT_DIR)/.configured: $(U_BOOT_DIR)/.patched
-ifeq ($(U_BOOT_BOARD_NAME),)
-	$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
+U_BOOT_POST_PATCH_HOOKS += U_BOOT_APPLY_CUSTOM_PATCHES
 endif
-	$(TARGET_CONFIGURE_OPTS)		\
-		$(U_BOOT_CONFIGURE_OPTS) \
-		$(MAKE) -C $(U_BOOT_DIR) \
-		CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \
+
+define U_BOOT_CONFIGURE_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(U_BOOT_CONFIGURE_OPTS) 	\
+		$(MAKE) -C $(@D) $(U_BOOT_MAKE_OPTS)		\
 		$(U_BOOT_BOARD_NAME)_config
-	touch $@
-
-$(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured
-	# Modify configuration header in $(U_BOOT_INC_CONF_FILE)
-ifdef BR2_TARGET_UBOOT_NETWORK
-	@echo >> $(U_BOOT_INC_CONF_FILE)
-	@echo "/* Add a wrapper around the values Buildroot sets. */" >> $(U_BOOT_INC_CONF_FILE)
-	@echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
-	@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_TARGET_UBOOT_IPADDR)),"")
-	$(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR))
-endif
-ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"")
-	$(call insert_define, CONFIG_GATEWAYIP, $(BR2_TARGET_UBOOT_GATEWAY))
-endif
-ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"")
-	$(call insert_define, CONFIG_NETMASK, $(BR2_TARGET_UBOOT_NETMASK))
-endif
-ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"")
-	$(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP))
-endif
-ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"")
-	$(call insert_define, CONFIG_ETHADDR, $(BR2_TARGET_UBOOT_ETHADDR))
-endif
-ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"")
-	$(call insert_define, CONFIG_ETH1ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR))
-endif
-	@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE)
-endif # BR2_TARGET_UBOOT_NETWORK
-	touch $@
-
-# Build U-Boot itself
-$(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified
-	$(TARGET_CONFIGURE_OPTS) \
-		$(U_BOOT_CONFIGURE_OPTS) \
-		$(MAKE) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \
-		$(U_BOOT_MAKE_OPT) -C $(U_BOOT_DIR)
-
-# Copy the result to the images/ directory
-$(BINARIES_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN)
-	rm -f $(BINARIES_DIR)/$(U_BOOT_BIN)
-	cp -dpf $(U_BOOT_DIR)/$(U_BOOT_BIN) $(BINARIES_DIR)/
-
-# Build just mkimage for the host. It might have already been built by
-# the U-Boot build procedure, but mkimage may also be needed even if
-# U-Boot isn't selected in the configuration, to generate a kernel
-# uImage.
-$(MKIMAGE): $(U_BOOT_DIR)/.patched
-	mkdir -p $(@D)
-	$(MAKE) -C $(U_BOOT_DIR) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) tools
-	cp -dpf $(U_BOOT_DIR)/tools/mkimage $(@D)
-
-# Build manually mkimage for the target
-$(TARGET_DIR)/usr/bin/mkimage: $(U_BOOT_DIR)/.configured
-	mkdir -p $(@D)
-	$(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(U_BOOT_DIR)/tools \
-		-DUSE_HOSTCC -o $@ \
-		$(U_BOOT_DIR)/common/image.c \
-		$(wildcard $(addprefix $(U_BOOT_DIR)/tools/,default_image.c \
-			fit_image.c imximage.c kwbimage.c mkimage.c)) \
-		$(addprefix $(U_BOOT_DIR)/lib*/,crc32.c md5.c sha1.c) \
-		$(U_BOOT_DIR)/tools/os_support.c \
-		$(wildcard $(U_BOOT_DIR)/libfdt/fdt*.c $(U_BOOT_DIR)/lib/libfdt/fdt*.c)
-
-# Build manually fw_printenv for the target
-$(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/.configured
-	$(TARGET_CONFIGURE_OPTS) \
-		$(MAKE) HOSTCC="$(TARGET_CC)" -C $(U_BOOT_DIR) env
-	$(INSTALL) -m 0755 -D $(U_BOOT_DIR)/tools/env/fw_printenv $@
-	ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
+	@echo >> $(@D)/include/config.h
+	@echo "/* Add a wrapper around the values Buildroot sets. */" >> $(@D)/include/config.h
+	@echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h
+	@echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h
+	$(call insert_define,DATE,$(DATE))
+	$(call insert_define,CONFIG_LOAD_SCRIPTS,1)
+	$(call insert_define,CONFIG_IPADDR,$(BR2_TARGET_UBOOT_IPADDR))
+	$(call insert_define,CONFIG_GATEWAYIP,$(BR2_TARGET_UBOOT_GATEWAY))
+	$(call insert_define,CONFIG_NETMASK,$(BR2_TARGET_UBOOT_NETMASK))
+	$(call insert_define,CONFIG_SERVERIP,$(BR2_TARGET_UBOOT_SERVERIP))
+	$(call insert_define,CONFIG_ETHADDR,$(BR2_TARGET_UBOOT_ETHADDR))
+	$(call insert_define,CONFIG_ETH1ADDR,$(BR2_TARGET_UBOOT_ETH1ADDR))
+	@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h
+endef
 
-u-boot: $(U_BOOT_TARGETS)
+ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
+define U_BOOT_BUILD_TARGET_ENV_UTILS
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) HOSTCC="$(TARGET_CC)" -C $(@D) env
+endef
+endif
 
-u-boot-clean:
-	-$(MAKE) -C $(U_BOOT_DIR) clean
-	rm -f $(MKIMAGE)
+define U_BOOT_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(U_BOOT_CONFIGURE_OPTS) 	\
+		$(MAKE) -C $(@D) $(U_BOOT_MAKE_OPTS) 		\
+		$(U_BOOT_MAKE_TARGET)
+	$(U_BOOT_BUILD_TARGET_ENV_UTILS)
+endef
 
-u-boot-dirclean:
-	rm -rf $(U_BOOT_DIR)
+define U_BOOT_INSTALL_IMAGES_CMDS
+	cp -dpf $(@D)/$(U_BOOT_BIN) $(BINARIES_DIR)/
+endef
 
-u-boot-source: $(DL_DIR)/$(U_BOOT_SOURCE)
+ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
+define U_BOOT_INSTALL_TARGET_ENV_UTILS
+	$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv \
+		$(TARGET_DIR)/usr/sbin/fw_printenv
+	ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
+endef
+endif
 
-u-boot-unpacked: $(U_BOOT_DIR)/.patched
+define U_BOOT_INSTALL_TARGET_CMDS
+	$(U_BOOT_INSTALL_TARGET_ENV_UTILS)
+endef
 
-u-boot-configured: $(U_BOOT_DIR)/.header_modified
+$(eval $(call GENTARGETS,boot,u-boot))
 
 #############################################################
 #
-- 
1.7.4.1

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

* [Buildroot] [PATCH 17/28] uboot-mkimage: new package
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (15 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 20:10   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 18/28] linux: rename LINUX26 to LINUX Thomas Petazzoni
                   ` (11 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

The mkimage for the host is now built by a package, so that
boot/u-boot/u-boot.mk is no longer responsible for doing this. It
makes things a lot easier to handle, as linux/linux.mk now simply
depends on host-uboot-mkimage.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../uboot-mkimage-2011.03-drop-configh.patch       |    0
 package/uboot-mkimage/uboot-mkimage.mk             |   16 ++++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
 rename boot/u-boot/u-boot-2011.03-drop-configh.patch => package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch (100%)
 create mode 100644 package/uboot-mkimage/uboot-mkimage.mk

diff --git a/boot/u-boot/u-boot-2011.03-drop-configh.patch b/package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch
similarity index 100%
rename from boot/u-boot/u-boot-2011.03-drop-configh.patch
rename to package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch
diff --git a/package/uboot-mkimage/uboot-mkimage.mk b/package/uboot-mkimage/uboot-mkimage.mk
new file mode 100644
index 0000000..055348c
--- /dev/null
+++ b/package/uboot-mkimage/uboot-mkimage.mk
@@ -0,0 +1,16 @@
+UBOOT_MKIMAGE_VERSION = 2011.03
+UBOOT_MKIMAGE_SOURCE  = u-boot-$(UBOOT_MKIMAGE_VERSION).tar.bz2
+UBOOT_MKIMAGE_SITE    = ftp://ftp.denx.de/pub/u-boot
+
+define HOST_UBOOT_MKIMAGE_BUILD_CMDS
+	$(MAKE) -C $(@D) 			\
+		CROSS_COMPILE="$(TARGET_CROSS)" \
+		ARCH=$(U_BOOT_ARCH) 		\
+		tools
+endef
+
+define HOST_UBOOT_MKIMAGE_INSTALL_CMDS
+	install -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin
+endef
+
+$(eval $(call GENTARGETS,package,uboot-mkimage,host))
-- 
1.7.4.1

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

* [Buildroot] [PATCH 18/28] linux: rename LINUX26 to LINUX
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (16 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 17/28] uboot-mkimage: new package Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 19/28] linux: indent and align some definitions Thomas Petazzoni
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

We also support Linux 3.x :-)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/linux.mk |  110 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 944ff29..8e685fd 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -1,24 +1,24 @@
 ###############################################################################
 #
-# Linux kernel 2.6 target
+# Linux kernel target
 #
 ###############################################################################
-LINUX26_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
+LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
 
-# Compute LINUX26_SOURCE and LINUX26_SITE from the configuration
-ifeq ($(LINUX26_VERSION),custom)
-LINUX26_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
-LINUX26_SITE:=$(dir $(LINUX26_TARBALL))
-LINUX26_SOURCE:=$(notdir $(LINUX26_TARBALL))
+# Compute LINUX_SOURCE and LINUX_SITE from the configuration
+ifeq ($(LINUX_VERSION),custom)
+LINUX_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
+LINUX_SITE:=$(dir $(LINUX_TARBALL))
+LINUX_SOURCE:=$(notdir $(LINUX_TARBALL))
 else
-LINUX26_SOURCE:=linux-$(LINUX26_VERSION).tar.bz2
-LINUX26_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
+LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2
+LINUX_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
 endif
 
-LINUX26_DIR:=$(BUILD_DIR)/linux-$(LINUX26_VERSION)
-LINUX26_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
+LINUX_DIR:=$(BUILD_DIR)/linux-$(LINUX_VERSION)
+LINUX_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
 
-LINUX26_MAKE_FLAGS = \
+LINUX_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC)" \
 	HOSTCFLAGS="$(HOSTCFLAGS)" \
 	ARCH=$(KERNEL_ARCH) \
@@ -28,27 +28,27 @@ LINUX26_MAKE_FLAGS = \
 
 # Get the real Linux version, which tells us where kernel modules are
 # going to be installed in the target filesystem.
-LINUX26_VERSION_PROBED = $(shell $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) --no-print-directory -s kernelrelease)
+LINUX_VERSION_PROBED = $(shell $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease)
 
 ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
-LINUX26_IMAGE_NAME=$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME))
+LINUX_IMAGE_NAME=$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME))
 else
 ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y)
 ifeq ($(KERNEL_ARCH),blackfin)
 # a uImage, but with a different file name
-LINUX26_IMAGE_NAME=vmImage
+LINUX_IMAGE_NAME=vmImage
 else
-LINUX26_IMAGE_NAME=uImage
+LINUX_IMAGE_NAME=uImage
 endif
-LINUX26_DEPENDENCIES+=$(MKIMAGE)
+LINUX_DEPENDENCIES+=host-uboot-mkimage
 else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y)
-LINUX26_IMAGE_NAME=bzImage
+LINUX_IMAGE_NAME=bzImage
 else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y)
-LINUX26_IMAGE_NAME=zImage
+LINUX_IMAGE_NAME=zImage
 else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y)
-LINUX26_IMAGE_NAME=vmlinux.bin
+LINUX_IMAGE_NAME=vmlinux.bin
 else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
-LINUX26_IMAGE_NAME=vmlinux
+LINUX_IMAGE_NAME=vmlinux
 endif
 endif
 
@@ -57,44 +57,44 @@ endif
 # for bzImage, arch/i386 and arch/x86_64 do not exist when copying the
 # defconfig file.
 ifeq ($(KERNEL_ARCH),i386)
-KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86
+KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/x86
 else ifeq ($(KERNEL_ARCH),x86_64)
-KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86
+KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/x86
 else
-KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)
+KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/$(KERNEL_ARCH)
 endif
 
 ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
-LINUX26_IMAGE_PATH=$(LINUX26_DIR)/$(LINUX26_IMAGE_NAME)
+LINUX_IMAGE_PATH=$(LINUX_DIR)/$(LINUX_IMAGE_NAME)
 else
 ifeq ($(KERNEL_ARCH),avr32)
-LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX26_IMAGE_NAME)
+LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX_IMAGE_NAME)
 else
-LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX26_IMAGE_NAME)
+LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME)
 endif
 endif # BR2_LINUX_KERNEL_VMLINUX
 
 # Download
-$(LINUX26_DIR)/.stamp_downloaded:
+$(LINUX_DIR)/.stamp_downloaded:
 	@$(call MESSAGE,"Downloading kernel")
-	$(call DOWNLOAD,$(LINUX26_SITE),$(LINUX26_SOURCE))
-	$(foreach patch,$(filter ftp://% http://%,$(LINUX26_PATCH)),\
+	$(call DOWNLOAD,$(LINUX_SITE),$(LINUX_SOURCE))
+	$(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCH)),\
 		$(call DOWNLOAD,$(dir $(patch)),$(notdir $(patch)))$(sep))
 	mkdir -p $(@D)
 	touch $@
 
 # Extraction
-$(LINUX26_DIR)/.stamp_extracted: $(LINUX26_DIR)/.stamp_downloaded
+$(LINUX_DIR)/.stamp_extracted: $(LINUX_DIR)/.stamp_downloaded
 	@$(call MESSAGE,"Extracting kernel")
 	mkdir -p $(@D)
-	$(Q)$(INFLATE$(suffix $(LINUX26_SOURCE))) $(DL_DIR)/$(LINUX26_SOURCE) | \
+	$(Q)$(INFLATE$(suffix $(LINUX_SOURCE))) $(DL_DIR)/$(LINUX_SOURCE) | \
 		tar -C $(@D) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) -
 	$(Q)touch $@
 
 # Patch
-$(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted
+$(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted
 	@$(call MESSAGE,"Patching kernel")
-	for p in $(LINUX26_PATCH) ; do \
+	for p in $(LINUX_PATCH) ; do \
 		if echo $$p | grep -q -E "^ftp://|^http://" ; then \
 			toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \
 		elif test -d $$p ; then \
@@ -116,7 +116,7 @@ KERNEL_DEFCONFIG_NAME = buildroot_defconfig
 KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME)
 
 # Configuration
-$(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched
+$(LINUX_DIR)/.stamp_configured: $(LINUX_DIR)/.stamp_patched
 	@$(call MESSAGE,"Configuring kernel")
 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
 	cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH)
@@ -148,63 +148,63 @@ endif
 ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
 	$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH))
 endif
-	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME)
+	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME)
 	rm $(KERNEL_DEFCONFIG_PATH)
 	$(Q)touch $@
 
 # Compilation. We make sure the kernel gets rebuilt when the
 # configuration has changed.
-$(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/.config
+$(LINUX_DIR)/.stamp_compiled: $(LINUX_DIR)/.stamp_configured $(LINUX_DIR)/.config
 	@$(call MESSAGE,"Compiling kernel")
-	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) $(LINUX26_IMAGE_NAME)
-	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then 	\
-		$(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) modules ;	\
+	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
+	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then 	\
+		$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ;	\
 	fi
 	$(Q)touch $@
 
 # Installation
-$(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled
+$(LINUX_DIR)/.stamp_installed: $(LINUX_DIR)/.stamp_compiled
 	@$(call MESSAGE,"Installing kernel")
 ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
-	install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME)
+	install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
 else
-	cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR)
+	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
 endif
 	# Install modules and remove symbolic links pointing to build
 	# directories, not relevant on the target
-	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then 	\
-		$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) 		\
+	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then 	\
+		$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) 		\
 			DEPMOD="$(HOST_DIR)/usr/sbin/depmod" modules_install ;		\
-		rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/build ;	\
-		rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/source ;	\
+		rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ;	\
+		rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ;	\
 	fi
 	$(Q)touch $@
 
-linux linux26: host-module-init-tools $(LINUX26_DEPENDENCIES) $(LINUX26_DIR)/.stamp_installed
+linux linux26: host-module-init-tools $(LINUX_DEPENDENCIES) $(LINUX_DIR)/.stamp_installed
 
-linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX26_DIR)/.stamp_configured
-	$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \
+linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX_DIR)/.stamp_configured
+	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \
 		$(subst linux-,,$(subst linux26-,,$@))
 
 # Support for rebuilding the kernel after the initramfs file list has
 # been generated in $(BINARIES_DIR)/rootfs.initramfs.
-$(LINUX26_DIR)/.stamp_initramfs_rebuilt: $(LINUX26_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs
+$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs
 	@$(call MESSAGE,"Rebuilding kernel with initramfs")
 	# Remove the previously generated initramfs which was empty,
 	# to make sure the kernel will actually regenerate it.
 	$(RM) -f $(@D)/usr/initramfs_data.cpio*
 	# Build the kernel.
-	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) $(LINUX26_IMAGE_NAME)
+	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
 	# Copy the kernel image to its final destination
-	cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR)
+	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
 	$(Q)touch $@
 
 # The initramfs building code must make sure this target gets called
 # after it generated the initramfs list of files.
-linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX26_DIR)/.stamp_initramfs_rebuilt
+linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
 
 ifeq ($(BR2_LINUX_KERNEL),y)
-TARGETS+=linux26
+TARGETS+=linux
 endif
 
 # Checks to give errors that the user can understand
-- 
1.7.4.1

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

* [Buildroot] [PATCH 19/28] linux: indent and align some definitions
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (17 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 18/28] linux: rename LINUX26 to LINUX Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 20/28] package: add support for post-download hooks Thomas Petazzoni
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/linux.mk |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 8e685fd..83af4e2 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -3,20 +3,20 @@
 # Linux kernel target
 #
 ###############################################################################
-LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
+LINUX_VERSION := $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
 
 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
 ifeq ($(LINUX_VERSION),custom)
-LINUX_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
-LINUX_SITE:=$(dir $(LINUX_TARBALL))
-LINUX_SOURCE:=$(notdir $(LINUX_TARBALL))
+LINUX_TARBALL := $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
+LINUX_SITE    := $(dir $(LINUX_TARBALL))
+LINUX_SOURCE  := $(notdir $(LINUX_TARBALL))
 else
-LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2
-LINUX_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
+LINUX_SOURCE  := linux-$(LINUX_VERSION).tar.bz2
+LINUX_SITE    := $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
 endif
 
-LINUX_DIR:=$(BUILD_DIR)/linux-$(LINUX_VERSION)
-LINUX_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
+LINUX_DIR     := $(BUILD_DIR)/linux-$(LINUX_VERSION)
+LINUX_PATCH   := $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
 
 LINUX_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC)" \
-- 
1.7.4.1

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

* [Buildroot] [PATCH 20/28] package: add support for post-download hooks
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (18 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 19/28] linux: indent and align some definitions Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 20:25   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 21/28] linux: convert to the GENTARGETS infrastructure Thomas Petazzoni
                   ` (8 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

This will be needed for the Linux kernel package, which needs to
download patches in a custom way.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.package.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index e407cdb..0236024 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -234,6 +234,7 @@ ifeq ($(DL_MODE),DOWNLOAD)
 endif
 	$(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE)))
 	$(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH)))
+	$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
 ifeq ($(DL_MODE),DOWNLOAD)
 	$(Q)mkdir -p $(@D)
 	$(Q)touch $@
@@ -437,6 +438,7 @@ $(2)_EXTRACT_CMDS ?= \
 	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
 
 # post-steps hooks
+$(2)_POST_DOWNLOAD_HOOKS        ?=
 $(2)_POST_EXTRACT_HOOKS         ?=
 $(2)_POST_PATCH_HOOKS           ?=
 $(2)_PRE_CONFIGURE_HOOKS        ?=
-- 
1.7.4.1

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

* [Buildroot] [PATCH 21/28] linux: convert to the GENTARGETS infrastructure
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (19 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 20/28] package: add support for post-download hooks Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/linux.mk |  111 +++++++++++++++++++++++++++-----------------------------
 1 files changed, 53 insertions(+), 58 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 83af4e2..e3a485e 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -15,8 +15,10 @@ LINUX_SOURCE  := linux-$(LINUX_VERSION).tar.bz2
 LINUX_SITE    := $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
 endif
 
-LINUX_DIR     := $(BUILD_DIR)/linux-$(LINUX_VERSION)
-LINUX_PATCH   := $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
+LINUX_PATCHES   := $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
+
+LINUX_INSTALL_IMAGES = YES
+LINUX_DEPENDENCIES  += host-module-init-tools
 
 LINUX_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC)" \
@@ -74,27 +76,17 @@ LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME)
 endif
 endif # BR2_LINUX_KERNEL_VMLINUX
 
-# Download
-$(LINUX_DIR)/.stamp_downloaded:
-	@$(call MESSAGE,"Downloading kernel")
-	$(call DOWNLOAD,$(LINUX_SITE),$(LINUX_SOURCE))
-	$(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCH)),\
+define LINUX_DOWNLOAD_PATCHES
+	$(if $(LINUX_PATCHES),
+		@$(call MESSAGE,"Download additional patches"))
+	$(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCHES)),\
 		$(call DOWNLOAD,$(dir $(patch)),$(notdir $(patch)))$(sep))
-	mkdir -p $(@D)
-	touch $@
-
-# Extraction
-$(LINUX_DIR)/.stamp_extracted: $(LINUX_DIR)/.stamp_downloaded
-	@$(call MESSAGE,"Extracting kernel")
-	mkdir -p $(@D)
-	$(Q)$(INFLATE$(suffix $(LINUX_SOURCE))) $(DL_DIR)/$(LINUX_SOURCE) | \
-		tar -C $(@D) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) -
-	$(Q)touch $@
+endef
+
+LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES
 
-# Patch
-$(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted
-	@$(call MESSAGE,"Patching kernel")
-	for p in $(LINUX_PATCH) ; do \
+define LINUX_APPLY_PATCHES
+	for p in $(LINUX_PATCHES) ; do \
 		if echo $$p | grep -q -E "^ftp://|^http://" ; then \
 			toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \
 		elif test -d $$p ; then \
@@ -103,7 +95,9 @@ $(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted
 			toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \
 		fi \
 	done
-	$(Q)touch $@
+endef
+
+LINUX_POST_PATCH_HOOKS += LINUX_APPLY_PATCHES
 
 # As we are tweaking the kernel configuration file, we want to run a
 # silent oldconfig pass on the configuration file after having done
@@ -115,61 +109,60 @@ $(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted
 KERNEL_DEFCONFIG_NAME = buildroot_defconfig
 KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME)
 
-# Configuration
-$(LINUX_DIR)/.stamp_configured: $(LINUX_DIR)/.stamp_patched
-	@$(call MESSAGE,"Configuring kernel")
 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
-	cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH)
+KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
-	cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_DEFCONFIG_PATH)
+KERNEL_SOURCE_CONFIG = $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)
 endif
-ifeq ($(BR2_ARM_EABI),y)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH))
-else
-	$(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH))
-endif
-ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+
+define LINUX_CONFIGURE_CMDS
+	cp $(KERNEL_SOURCE_CONFIG) $(KERNEL_DEFCONFIG_PATH)
+	$(if $(BR2_ARM_EABI),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)),
+		$(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)))
 	# As the kernel gets compiled before root filesystems are
 	# built, we create a fake initramfs file list. It'll be
 	# replaced later by the real list, and the kernel will be
 	# rebuilt using the linux26-rebuild-with-initramfs target.
-	touch $(BINARIES_DIR)/rootfs.initramfs
-	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH))
-	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH))
-	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH))
-	$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH))
-endif
-ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH))
-endif
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
-	$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH))
-endif
+	$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
+		touch $(BINARIES_DIR)/rootfs.initramfs
+		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH))
+		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH))
+		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH))
+		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH))
+		$(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH)))
+	$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH)))
+	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
+		$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH)))
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME)
 	rm $(KERNEL_DEFCONFIG_PATH)
-	$(Q)touch $@
+endef
 
 # Compilation. We make sure the kernel gets rebuilt when the
 # configuration has changed.
-$(LINUX_DIR)/.stamp_compiled: $(LINUX_DIR)/.stamp_configured $(LINUX_DIR)/.config
-	@$(call MESSAGE,"Compiling kernel")
+define LINUX_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
 	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then 	\
 		$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ;	\
 	fi
-	$(Q)touch $@
+endef
+
 
-# Installation
-$(LINUX_DIR)/.stamp_installed: $(LINUX_DIR)/.stamp_compiled
-	@$(call MESSAGE,"Installing kernel")
 ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
+define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
 	install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
+endef
 else
+define LINUX_INSTALL_IMAGES_CMDS
 	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
+endef
 endif
+
+define LINUX_INSTALL_TARGET_CMDS
+	$(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET)
 	# Install modules and remove symbolic links pointing to build
 	# directories, not relevant on the target
 	@if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then 	\
@@ -178,17 +171,18 @@ endif
 		rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ;	\
 		rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ;	\
 	fi
-	$(Q)touch $@
+endef
 
-linux linux26: host-module-init-tools $(LINUX_DEPENDENCIES) $(LINUX_DIR)/.stamp_installed
+$(eval $(call GENTARGETS,,linux))
 
 linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX_DIR)/.stamp_configured
 	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \
 		$(subst linux-,,$(subst linux26-,,$@))
+	rm -f $(LINUX_DIR)/.stamp_{built,target_installed,images_installed}
 
 # Support for rebuilding the kernel after the initramfs file list has
 # been generated in $(BINARIES_DIR)/rootfs.initramfs.
-$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs
+$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.initramfs
 	@$(call MESSAGE,"Rebuilding kernel with initramfs")
 	# Remove the previously generated initramfs which was empty,
 	# to make sure the kernel will actually regenerate it.
@@ -203,6 +197,7 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_installed $(BINARIES_
 # after it generated the initramfs list of files.
 linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
 
+
 ifeq ($(BR2_LINUX_KERNEL),y)
 TARGETS+=linux
 endif
-- 
1.7.4.1

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

* [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_*
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (20 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 21/28] linux: convert to the GENTARGETS infrastructure Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-10 20:27   ` Peter Korsgaard
  2011-07-05 19:54 ` [Buildroot] [PATCH 23/28] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Thomas Petazzoni
                   ` (6 subsequent siblings)
  28 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/at91bootstrap/Config.in                |   18 +++---
 boot/at91bootstrap/at91bootstrap.mk         |    8 +-
 boot/at91dataflashboot/Config.in            |    2 +-
 boot/at91dataflashboot/at91dataflashboot.mk |    2 +-
 boot/barebox/Config.in                      |    8 +-
 boot/barebox/barebox.mk                     |   12 ++--
 boot/grub/Config.in                         |   94 +++++++++++++-------------
 boot/grub/grub.mk                           |   50 +++++++-------
 boot/syslinux/Config.in                     |   10 ++--
 boot/syslinux/syslinux.mk                   |    6 +-
 boot/u-boot/Config.in                       |   70 ++++++++++----------
 boot/u-boot/u-boot.mk                       |   34 +++++-----
 12 files changed, 157 insertions(+), 157 deletions(-)

diff --git a/boot/at91bootstrap/Config.in b/boot/at91bootstrap/Config.in
index f022dd5..26af93a 100644
--- a/boot/at91bootstrap/Config.in
+++ b/boot/at91bootstrap/Config.in
@@ -1,4 +1,4 @@
-menuconfig BR2_TARGET_AT91BOOTSTRAP
+menuconfig BR2_BOOT_AT91BOOTSTRAP
 	depends on BR2_arm
 	bool "AT91 Bootstrap"
 	help
@@ -8,9 +8,9 @@ menuconfig BR2_TARGET_AT91BOOTSTRAP
 	  - Peripheral drivers such as PIO, PMC or SDRAMC...
 	  - Physical media algorithm such as DataFlash, NandFlash, NOR Flash...
 
-if	BR2_TARGET_AT91BOOTSTRAP
+if	BR2_BOOT_AT91BOOTSTRAP
 
-config BR2_TARGET_AT91BOOTSTRAP_BOARD
+config BR2_BOOT_AT91BOOTSTRAP_BOARD
 	string "Bootstrap board"
 	default ""
 	help
@@ -18,22 +18,22 @@ config BR2_TARGET_AT91BOOTSTRAP_BOARD
 
 choice
 	prompt "Boot Memory"
-	default BR2_TARGET_AT91BOOTSTRAP_DATAFLASH
+	default BR2_BOOT_AT91BOOTSTRAP_DATAFLASH
 	help
 	  Select Chip for which AT91 bootstrap should be built
 
-config BR2_TARGET_AT91BOOTSTRAP_DATAFLASH
+config BR2_BOOT_AT91BOOTSTRAP_DATAFLASH
 	bool "Data Flash"
 
-config BR2_TARGET_AT91BOOTSTRAP_NANDFLASH
+config BR2_BOOT_AT91BOOTSTRAP_NANDFLASH
 	bool "NAND Flash"
 
 endchoice
 
-config BR2_TARGET_AT91BOOTSTRAP_MEMORY
+config BR2_BOOT_AT91BOOTSTRAP_MEMORY
 	string
-	default	"dataflash"	if	BR2_TARGET_AT91BOOTSTRAP_DATAFLASH
-	default	"nandflash"	if	BR2_TARGET_AT91BOOTSTRAP_NANDFLASH
+	default	"dataflash"	if	BR2_BOOT_AT91BOOTSTRAP_DATAFLASH
+	default	"nandflash"	if	BR2_BOOT_AT91BOOTSTRAP_NANDFLASH
 
 endif
 
diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
index 66fc961..46627de 100644
--- a/boot/at91bootstrap/at91bootstrap.mk
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -7,8 +7,8 @@ AT91BOOTSTRAP_VERSION := 1.16
 AT91BOOTSTRAP_SITE    := http://www.atmel.com/dyn/resources/prod_documents/
 AT91BOOTSTRAP_SOURCE  := AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip
 
-AT91BOOTSTRAP_BOARD       := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
-AT91BOOTSTRAP_MEMORY      := $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
+AT91BOOTSTRAP_BOARD       := $(call qstrip,$(BR2_BOOT_AT91BOOTSTRAP_BOARD))
+AT91BOOTSTRAP_MEMORY      := $(call qstrip,$(BR2_BOOT_AT91BOOTSTRAP_MEMORY))
 AT91BOOTSTRAP_MAKE_SUBDIR := board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY)
 AT91BOOTSTRAP_BINARY      := $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
 
@@ -36,13 +36,13 @@ $(eval $(call GENTARGETS,boot,at91bootstrap))
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y)
+ifeq ($(BR2_BOOT_AT91BOOTSTRAP),y)
 TARGETS+=at91bootstrap
 
 # we NEED a board name unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(AT91BOOTSTRAP_BOARD),)
-$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting)
+$(error No AT91Bootstrap board name set. Check your BR2_BOOT_AT91BOOTSTRAP_BOARD setting)
 endif
 endif
 
diff --git a/boot/at91dataflashboot/Config.in b/boot/at91dataflashboot/Config.in
index 88cd058..3ac2928 100644
--- a/boot/at91dataflashboot/Config.in
+++ b/boot/at91dataflashboot/Config.in
@@ -1,3 +1,3 @@
-menuconfig BR2_TARGET_AT91DATAFLASHBOOT
+menuconfig BR2_BOOT_AT91DATAFLASHBOOT
        depends on BR2_arm
        bool "AT91 DataFlashBoot"
diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk
index 652b861..fb698ce 100644
--- a/boot/at91dataflashboot/at91dataflashboot.mk
+++ b/boot/at91dataflashboot/at91dataflashboot.mk
@@ -26,6 +26,6 @@ $(eval $(call GENTARGETS,boot,at91dataflashboot))
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_TARGET_AT91DATAFLASHBOOT),y)
+ifeq ($(BR2_BOOT_AT91DATAFLASHBOOT),y)
 TARGETS+=at91dataflashboot
 endif
diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index a821c45..7f377a4 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -1,18 +1,18 @@
-menuconfig BR2_TARGET_BAREBOX
+menuconfig BR2_BOOT_BAREBOX
 	bool "Barebox"
 	help
 	  The Barebox bootloader, formerly known as U-Boot v2.
 
 	  http://www.barebox.org
 
-if BR2_TARGET_BAREBOX
-config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
+if BR2_BOOT_BAREBOX
+config BR2_BOOT_BAREBOX_BOARD_DEFCONFIG
 	string "board defconfig"
 	help
 	  Name of the board for which Barebox should be built, without
 	  the _defconfig suffix.
 
-config BR2_TARGET_BAREBOX_BAREBOXENV
+config BR2_BOOT_BAREBOX_BAREBOXENV
 	bool "bareboxenv tool in target"
 	help
 	  Install bareboxenv tool in target.
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 65a4f66..b844d43 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -9,11 +9,11 @@ BAREBOX_SOURCE  := barebox-$(BAREBOX_VERSION).tar.bz2
 BAREBOX_SITE    := http://www.barebox.org/download/
 
 BAREBOX_INSTALL_IMAGES = YES
-ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+ifneq ($(BR2_BOOT_BAREBOX_BAREBOXENV),y)
 BAREBOX_INSTALL_TARGET = NO
 endif
 
-BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
+BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_BOOT_BAREBOX_BOARD_DEFCONFIG))
 
 ifeq ($(KERNEL_ARCH),i386)
 BAREBOX_ARCH=x86
@@ -29,7 +29,7 @@ define BAREBOX_CONFIGURE_CMDS
 	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
 endef
 
-ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+ifeq ($(BR2_BOOT_BAREBOX_BAREBOXENV),y)
 define BAREBOX_BUILD_BAREBOXENV_CMDS
 	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
 		$(@D)/scripts/bareboxenv.c
@@ -45,7 +45,7 @@ define BAREBOX_INSTALL_IMAGES_CMDS
 	cp $(@D)/barebox.bin $(BINARIES_DIR)
 endef
 
-ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+ifeq ($(BR2_BOOT_BAREBOX_BAREBOXENV),y)
 define BAREBOX_INSTALL_TARGET_CMDS
 	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
 endef
@@ -53,13 +53,13 @@ endif
 
 $(eval $(call GENTARGETS,boot,barebox))
 
-ifeq ($(BR2_TARGET_BAREBOX),y)
+ifeq ($(BR2_BOOT_BAREBOX),y)
 TARGETS+=barebox
 
 # we NEED a board defconfig file unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
-$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting)
+$(error No Barebox defconfig file. Check your BR2_BOOT_BAREBOX_BOARD_DEFCONFIG setting)
 endif
 endif
 
diff --git a/boot/grub/Config.in b/boot/grub/Config.in
index bc7a73e..462ef70 100644
--- a/boot/grub/Config.in
+++ b/boot/grub/Config.in
@@ -1,146 +1,146 @@
-config BR2_TARGET_GRUB
+config BR2_BOOT_GRUB
 	bool "grub"
 	depends on BR2_i386 || BR2_x86_64
 	help
 	  The GRand Unified Bootloader for x86 systems.
 
-config BR2_TARGET_GRUB_SPLASH
+config BR2_BOOT_GRUB_SPLASH
 	bool "Splashimage support"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  Add support for splashimage.
 	
 	  A splashimage is a 14-color indexed .xpm picture which
 	  is displayed as background for the grub menu.
 
-config BR2_TARGET_GRUB_DISKLESS
+config BR2_BOOT_GRUB_DISKLESS
 	bool "diskless support"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable diskless support
 
-config BR2_TARGET_GRUB_3c595
+config BR2_BOOT_GRUB_3c595
 	bool "3Com595 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable 3Com595 driver
 
-config BR2_TARGET_GRUB_3c90x
+config BR2_BOOT_GRUB_3c90x
 	bool "3Com90x driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable 3Com90x driver
 
-config BR2_TARGET_GRUB_davicom
+config BR2_BOOT_GRUB_davicom
 	bool "Davicom driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Davicom driver
 
-config BR2_TARGET_GRUB_e1000
+config BR2_BOOT_GRUB_e1000
 	bool "Etherexpress Pro/1000 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Etherexpress Pro/1000 driver
 
-config BR2_TARGET_GRUB_eepro100
+config BR2_BOOT_GRUB_eepro100
 	bool "Etherexpress Pro/100 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Etherexpress Pro/100 driver
 
-config BR2_TARGET_GRUB_epic100
+config BR2_BOOT_GRUB_epic100
 	bool "SMC 83c170 EPIC/100 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable SMC 83c170 EPIC/100 driver
 
-config BR2_TARGET_GRUB_forcedeth
+config BR2_BOOT_GRUB_forcedeth
 	bool "Nvidia Geforce driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Nvidia Geforce driver
 
-config BR2_TARGET_GRUB_natsemi
+config BR2_BOOT_GRUB_natsemi
 	bool "NatSemi DP8381x driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable NatSemi DP8381x driver
 
-config BR2_TARGET_GRUB_ns83820
+config BR2_BOOT_GRUB_ns83820
 	bool "NS83820 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable NS83820 driver
 
-config BR2_TARGET_GRUB_ns8390
+config BR2_BOOT_GRUB_ns8390
 	bool "NE2000 PCI driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable NE2000 PCI driver
 
-config BR2_TARGET_GRUB_pcnet32
+config BR2_BOOT_GRUB_pcnet32
 	bool "AMD Lance/PCI PCNet/32 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable AMD Lance/PCI PCNet/32 driver
 
-config BR2_TARGET_GRUB_pnic
+config BR2_BOOT_GRUB_pnic
 	bool "Bochs Pseudo Nic driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Bochs Pseudo Nic driver
 
-config BR2_TARGET_GRUB_rtl8139
+config BR2_BOOT_GRUB_rtl8139
 	bool "Realtek 8139 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Realtek 8139 driver
 
-config BR2_TARGET_GRUB_r8169
+config BR2_BOOT_GRUB_r8169
 	bool "Realtek 8169 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Realtek 8169 driver
 
-config BR2_TARGET_GRUB_sis900
+config BR2_BOOT_GRUB_sis900
 	bool "SIS 900 and SIS 7016 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable SIS 900 and SIS 7016 driver
 
-config BR2_TARGET_GRUB_tg3
+config BR2_BOOT_GRUB_tg3
 	bool "Broadcom Tigon3 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Broadcom Tigon3 driver
 
-config BR2_TARGET_GRUB_tulip
+config BR2_BOOT_GRUB_tulip
 	bool "Tulip driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Tulip driver
 
-config BR2_TARGET_GRUB_tlan
+config BR2_BOOT_GRUB_tlan
 	bool "TI ThunderLAN driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable TI ThunderLAN driver
 
-config BR2_TARGET_GRUB_undi
+config BR2_BOOT_GRUB_undi
 	bool "PXE UNDI driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable PXE UNDI driver
 
-config BR2_TARGET_GRUB_via_rhine
+config BR2_BOOT_GRUB_via_rhine
 	bool "Rhine-I/II driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Rhine-I/II driver
 
-config BR2_TARGET_GRUB_w89c840
+config BR2_BOOT_GRUB_w89c840
 	bool "Winbond W89c840 driver"
-	depends on BR2_TARGET_GRUB
+	depends on BR2_BOOT_GRUB
 	help
 	  enable Winbond W89c840 driver
diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
index 4938416..93238cb 100644
--- a/boot/grub/grub.mk
+++ b/boot/grub/grub.mk
@@ -14,29 +14,29 @@ ifeq ($(BR2_LARGEFILE),)
 GRUB_CFLAGS+=-U_FILE_OFFSET_BITS
 endif
 
-GRUB_CONFIG-$(BR2_TARGET_GRUB_SPLASH) += --enable-graphics
-GRUB_CONFIG-$(BR2_TARGET_GRUB_DISKLESS) += --enable-diskless
-GRUB_CONFIG-$(BR2_TARGET_GRUB_3c595) += --enable-3c595
-GRUB_CONFIG-$(BR2_TARGET_GRUB_3c90x) += --enable-3c90x
-GRUB_CONFIG-$(BR2_TARGET_GRUB_davicom) += --enable-davicom
-GRUB_CONFIG-$(BR2_TARGET_GRUB_e1000) += --enable-e1000
-GRUB_CONFIG-$(BR2_TARGET_GRUB_eepro100) += --enable-eepro100
-GRUB_CONFIG-$(BR2_TARGET_GRUB_epic100) += --enable-epic100
-GRUB_CONFIG-$(BR2_TARGET_GRUB_forcedeth) += --enable-forcedeth
-GRUB_CONFIG-$(BR2_TARGET_GRUB_natsemi) += --enable-natsemi
-GRUB_CONFIG-$(BR2_TARGET_GRUB_ns83820) += --enable-ns83820
-GRUB_CONFIG-$(BR2_TARGET_GRUB_ns8390) += --enable-ns8390
-GRUB_CONFIG-$(BR2_TARGET_GRUB_pcnet32) += --enable-pcnet32
-GRUB_CONFIG-$(BR2_TARGET_GRUB_pnic) += --enable-pnic
-GRUB_CONFIG-$(BR2_TARGET_GRUB_rtl8139) += --enable-rtl8139
-GRUB_CONFIG-$(BR2_TARGET_GRUB_r8169) += --enable-r8169
-GRUB_CONFIG-$(BR2_TARGET_GRUB_sis900) += --enable-sis900
-GRUB_CONFIG-$(BR2_TARGET_GRUB_tg3) += --enable-tg3
-GRUB_CONFIG-$(BR2_TARGET_GRUB_tulip) += --enable-tulip
-GRUB_CONFIG-$(BR2_TARGET_GRUB_tlan) += --enable-tlan
-GRUB_CONFIG-$(BR2_TARGET_GRUB_undi) += --enable-undi
-GRUB_CONFIG-$(BR2_TARGET_GRUB_via_rhine) += --enable-via-rhine
-GRUB_CONFIG-$(BR2_TARGET_GRUB_w89c840) += --enable-w89c840
+GRUB_CONFIG-$(BR2_BOOT_GRUB_SPLASH) += --enable-graphics
+GRUB_CONFIG-$(BR2_BOOT_GRUB_DISKLESS) += --enable-diskless
+GRUB_CONFIG-$(BR2_BOOT_GRUB_3c595) += --enable-3c595
+GRUB_CONFIG-$(BR2_BOOT_GRUB_3c90x) += --enable-3c90x
+GRUB_CONFIG-$(BR2_BOOT_GRUB_davicom) += --enable-davicom
+GRUB_CONFIG-$(BR2_BOOT_GRUB_e1000) += --enable-e1000
+GRUB_CONFIG-$(BR2_BOOT_GRUB_eepro100) += --enable-eepro100
+GRUB_CONFIG-$(BR2_BOOT_GRUB_epic100) += --enable-epic100
+GRUB_CONFIG-$(BR2_BOOT_GRUB_forcedeth) += --enable-forcedeth
+GRUB_CONFIG-$(BR2_BOOT_GRUB_natsemi) += --enable-natsemi
+GRUB_CONFIG-$(BR2_BOOT_GRUB_ns83820) += --enable-ns83820
+GRUB_CONFIG-$(BR2_BOOT_GRUB_ns8390) += --enable-ns8390
+GRUB_CONFIG-$(BR2_BOOT_GRUB_pcnet32) += --enable-pcnet32
+GRUB_CONFIG-$(BR2_BOOT_GRUB_pnic) += --enable-pnic
+GRUB_CONFIG-$(BR2_BOOT_GRUB_rtl8139) += --enable-rtl8139
+GRUB_CONFIG-$(BR2_BOOT_GRUB_r8169) += --enable-r8169
+GRUB_CONFIG-$(BR2_BOOT_GRUB_sis900) += --enable-sis900
+GRUB_CONFIG-$(BR2_BOOT_GRUB_tg3) += --enable-tg3
+GRUB_CONFIG-$(BR2_BOOT_GRUB_tulip) += --enable-tulip
+GRUB_CONFIG-$(BR2_BOOT_GRUB_tlan) += --enable-tlan
+GRUB_CONFIG-$(BR2_BOOT_GRUB_undi) += --enable-undi
+GRUB_CONFIG-$(BR2_BOOT_GRUB_via_rhine) += --enable-via-rhine
+GRUB_CONFIG-$(BR2_BOOT_GRUB_w89c840) += --enable-w89c840
 
 define GRUB_DEBIAN_PATCHES
 	# Apply the patches from the Debian patch
@@ -58,7 +58,7 @@ define GRUB_INSTALL_STAGING_CMDS
 	install -m 0755 -D $(@D)/grub/grub $(STAGING_DIR)/sbin/grub
 endef
 
-ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
+ifeq ($(BR2_BOOT_GRUB_SPLASH),y)
 define GRUB_INSTALL_SPLASH
 	cp boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/
 endef
@@ -89,6 +89,6 @@ $(eval $(call AUTOTARGETS,boot,grub))
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_TARGET_GRUB),y)
+ifeq ($(BR2_BOOT_GRUB),y)
 TARGETS+=grub
 endif
diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in
index 60f3b8f..eaa3d70 100644
--- a/boot/syslinux/Config.in
+++ b/boot/syslinux/Config.in
@@ -1,16 +1,16 @@
-config BR2_TARGET_SYSLINUX
+config BR2_BOOT_SYSLINUX
 	bool "syslinux"
 	depends on BR2_i386 || BR2_x86_64
 	help
 	  The syslinux bootloader for x86 systems.
 	  This includes: syslinux, pxelinux, extlinux.
 
-config BR2_TARGET_SYSLINUX_ISOLINUX
+config BR2_BOOT_SYSLINUX_ISOLINUX
 	bool "Install isolinux"
-	depends on BR2_TARGET_SYSLINUX
+	depends on BR2_BOOT_SYSLINUX
 	default y
 
-config BR2_TARGET_SYSLINUX_PXELINUX
+config BR2_BOOT_SYSLINUX_PXELINUX
 	bool "Install pxelinux"
-	depends on BR2_TARGET_SYSLINUX
+	depends on BR2_BOOT_SYSLINUX
 	default y
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index d1b2907..1f50ed5 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -17,8 +17,8 @@ define SYSLINUX_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(@D)
 endef
 
-SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += isolinux.bin
-SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += pxelinux.bin
+SYSLINUX_IMAGES-$(BR2_BOOT_SYSLINUX_ISOLINUX) += isolinux.bin
+SYSLINUX_IMAGES-$(BR2_BOOT_SYSLINUX_PXELINUX) += pxelinux.bin
 
 define SYSLINUX_INSTALL_IMAGES_CMDS
 	for i in $(SYSLINUX_IMAGES-y); do \
@@ -33,6 +33,6 @@ $(eval $(call GENTARGETS,boot,syslinux))
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_TARGET_SYSLINUX),y)
+ifeq ($(BR2_BOOT_SYSLINUX),y)
 TARGETS+=syslinux
 endif
diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in
index aada346..d9a6385 100644
--- a/boot/u-boot/Config.in
+++ b/boot/u-boot/Config.in
@@ -1,10 +1,10 @@
-menuconfig BR2_TARGET_UBOOT
+menuconfig BR2_BOOT_UBOOT
 	bool "U-Boot"
 	help
 	  Build "Das U-Boot" Boot Monitor
 
-if BR2_TARGET_UBOOT
-config BR2_TARGET_UBOOT_BOARDNAME
+if BR2_BOOT_UBOOT
+config BR2_BOOT_UBOOT_BOARDNAME
 	string "U-Boot board name"
 	help
 	  One of U-Boot supported boards to be built.
@@ -12,47 +12,47 @@ config BR2_TARGET_UBOOT_BOARDNAME
 
 choice
 	prompt "U-Boot Version"
-	default BR2_TARGET_UBOOT_2011_03
+	default BR2_BOOT_UBOOT_2011_03
 	help
 	  Select the specific U-Boot version you want to use
 
-config BR2_TARGET_UBOOT_2011_03
+config BR2_BOOT_UBOOT_2011_03
 	bool "2011.03"
 
-config BR2_TARGET_UBOOT_2010_12
+config BR2_BOOT_UBOOT_2010_12
 	bool "2010.12"
 
-config BR2_TARGET_UBOOT_2010_09
+config BR2_BOOT_UBOOT_2010_09
 	bool "2010.09"
 
-config BR2_TARGET_UBOOT_2010_06
+config BR2_BOOT_UBOOT_2010_06
 	bool "2010.06"
 
-config BR2_TARGET_UBOOT_2010_03
+config BR2_BOOT_UBOOT_2010_03
 	bool "2010.03"
 
-config BR2_TARGET_UBOOT_CUSTOM_TARBALL
+config BR2_BOOT_UBOOT_CUSTOM_TARBALL
 	bool "Custom tarball"
 
 endchoice
 
-if BR2_TARGET_UBOOT_CUSTOM_TARBALL
+if BR2_BOOT_UBOOT_CUSTOM_TARBALL
 
-config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION
+config BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION
 	string "URL of custom U-Boot tarball"
 
 endif
 
-config BR2_TARGET_UBOOT_VERSION
+config BR2_BOOT_UBOOT_VERSION
 	string
-	default "2011.03"	if BR2_TARGET_UBOOT_2011_03
-	default "2010.12"	if BR2_TARGET_UBOOT_2010_12
-	default "2010.09"	if BR2_TARGET_UBOOT_2010_09
-	default "2010.06"	if BR2_TARGET_UBOOT_2010_06
-	default "2010.03"	if BR2_TARGET_UBOOT_2010_03
-	default "custom"	if BR2_TARGET_UBOOT_CUSTOM_TARBALL
-
-config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
+	default "2011.03"	if BR2_BOOT_UBOOT_2011_03
+	default "2010.12"	if BR2_BOOT_UBOOT_2010_12
+	default "2010.09"	if BR2_BOOT_UBOOT_2010_09
+	default "2010.06"	if BR2_BOOT_UBOOT_2010_06
+	default "2010.03"	if BR2_BOOT_UBOOT_2010_03
+	default "custom"	if BR2_BOOT_UBOOT_CUSTOM_TARBALL
+
+config BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR
 	string "custom patch dir"
 	help
 	  If your board requires custom patches, add the path to the
@@ -64,68 +64,68 @@ config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
 choice
 	prompt "U-Boot binary format"
 
-config BR2_TARGET_UBOOT_FORMAT_BIN
+config BR2_BOOT_UBOOT_FORMAT_BIN
 	bool "u-boot.bin"
 
-config BR2_TARGET_UBOOT_FORMAT_KWB
+config BR2_BOOT_UBOOT_FORMAT_KWB
 	depends on BR2_arm
 	bool "u-boot.kwb (Marvell)"
 
-config BR2_TARGET_UBOOT_FORMAT_LDR
+config BR2_BOOT_UBOOT_FORMAT_LDR
 	depends on BR2_bfin
 	bool "u-boot.ldr"
 
 endchoice
 
-config BR2_TARGET_UBOOT_TOOL_ENV
+config BR2_BOOT_UBOOT_TOOL_ENV
 	bool "fw_printenv tool in target"
 	help
 	  Install fw_printenv / fw_setenv tools in target.
 
-menuconfig BR2_TARGET_UBOOT_NETWORK
+menuconfig BR2_BOOT_UBOOT_NETWORK
 	bool "Network Settings"
 	default y
 	help
 	  Network settings for U-boot
 
-if BR2_TARGET_UBOOT_NETWORK
+if BR2_BOOT_UBOOT_NETWORK
 
-config BR2_TARGET_UBOOT_SERVERIP
+config BR2_BOOT_UBOOT_SERVERIP
 	string "server ip"
 	default "10.175.196.221"
 	help
 	  TFTP server ip address
 
-config BR2_TARGET_UBOOT_IPADDR
+config BR2_BOOT_UBOOT_IPADDR
 	string "ip address"
 	default "10.175.196.18"
 	help
 	  Target ip address
 
-config BR2_TARGET_UBOOT_GATEWAY
+config BR2_BOOT_UBOOT_GATEWAY
 	string "gateway ip"
 	default "10.175.196.1"
 	help
 	  Gateway ip address
 
-config BR2_TARGET_UBOOT_NETMASK
+config BR2_BOOT_UBOOT_NETMASK
 	string "netmask"
 	default "255.255.255.0"
 	help
 	  Network Mask
 
-config BR2_TARGET_UBOOT_ETHADDR
+config BR2_BOOT_UBOOT_ETHADDR
 	string "ethernet address"
 	default "04:25:fe:ed:00:18"
 	help
 	  Target MAC address for the ethernet interface.
 	  This should be changed for production units
 
-config BR2_TARGET_UBOOT_ETH1ADDR
+config BR2_BOOT_UBOOT_ETH1ADDR
 	string "ethernet 2 address"
 	help
 	  Target MAC address for the second ethernet interface.
 
-endif # BR2_TARGET_UBOOT_NETWORK
+endif # BR2_BOOT_UBOOT_NETWORK
 
-endif # BR2_TARGET_UBOOT
+endif # BR2_BOOT_UBOOT
diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk
index 215b1c7..ecbf675 100644
--- a/boot/u-boot/u-boot.mk
+++ b/boot/u-boot/u-boot.mk
@@ -3,14 +3,14 @@
 # U-Boot
 #
 #############################################################
-U_BOOT_VERSION    = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
-U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
+U_BOOT_VERSION    = $(call qstrip,$(BR2_BOOT_UBOOT_VERSION))
+U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_BOOT_UBOOT_BOARDNAME))
 
 U_BOOT_INSTALL_IMAGES = YES
 
 ifeq ($(U_BOOT_VERSION),custom)
 # Handle custom U-Boot tarballs as specified by the configuration
-U_BOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
+U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION))
 U_BOOT_SITE    = $(dir $(U_BOOT_TARBALL))
 U_BOOT_SOURCE  = $(notdir $(U_BOOT_TARBALL))
 else
@@ -19,10 +19,10 @@ U_BOOT_SITE    = ftp://ftp.denx.de/pub/u-boot
 U_BOOT_SOURCE  = u-boot-$(U_BOOT_VERSION).tar.bz2
 endif
 
-ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
+ifeq ($(BR2_BOOT_UBOOT_FORMAT_KWB),y)
 U_BOOT_BIN          = u-boot.kwb
 U_BOOT_MAKE_TARGET  = $(U_BOOT_BIN)
-else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y)
+else ifeq ($(BR2_BOOT_UBOOT_FORMAT_LDR),y)
 U_BOOT_BIN          = u-boot.ldr
 else
 U_BOOT_BIN          = u-boot.bin
@@ -52,9 +52,9 @@ $(if $(call qstrip,$(2)),
 	@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h)
 endef
 
-ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
+ifneq ($(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR)),)
 define U_BOOT_APPLY_CUSTOM_PATCHES
-	toolchain/patch-kernel.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
+	toolchain/patch-kernel.sh $(@D) $(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR) \
 		u-boot-$(U_BOOT_VERSION)-\*.patch
 endef
 
@@ -71,16 +71,16 @@ define U_BOOT_CONFIGURE_CMDS
 	@echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h
 	$(call insert_define,DATE,$(DATE))
 	$(call insert_define,CONFIG_LOAD_SCRIPTS,1)
-	$(call insert_define,CONFIG_IPADDR,$(BR2_TARGET_UBOOT_IPADDR))
-	$(call insert_define,CONFIG_GATEWAYIP,$(BR2_TARGET_UBOOT_GATEWAY))
-	$(call insert_define,CONFIG_NETMASK,$(BR2_TARGET_UBOOT_NETMASK))
-	$(call insert_define,CONFIG_SERVERIP,$(BR2_TARGET_UBOOT_SERVERIP))
-	$(call insert_define,CONFIG_ETHADDR,$(BR2_TARGET_UBOOT_ETHADDR))
-	$(call insert_define,CONFIG_ETH1ADDR,$(BR2_TARGET_UBOOT_ETH1ADDR))
+	$(call insert_define,CONFIG_IPADDR,$(BR2_BOOT_UBOOT_IPADDR))
+	$(call insert_define,CONFIG_GATEWAYIP,$(BR2_BOOT_UBOOT_GATEWAY))
+	$(call insert_define,CONFIG_NETMASK,$(BR2_BOOT_UBOOT_NETMASK))
+	$(call insert_define,CONFIG_SERVERIP,$(BR2_BOOT_UBOOT_SERVERIP))
+	$(call insert_define,CONFIG_ETHADDR,$(BR2_BOOT_UBOOT_ETHADDR))
+	$(call insert_define,CONFIG_ETH1ADDR,$(BR2_BOOT_UBOOT_ETH1ADDR))
 	@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h
 endef
 
-ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
+ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y)
 define U_BOOT_BUILD_TARGET_ENV_UTILS
 	$(TARGET_CONFIGURE_OPTS) $(MAKE) HOSTCC="$(TARGET_CC)" -C $(@D) env
 endef
@@ -97,7 +97,7 @@ define U_BOOT_INSTALL_IMAGES_CMDS
 	cp -dpf $(@D)/$(U_BOOT_BIN) $(BINARIES_DIR)/
 endef
 
-ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
+ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y)
 define U_BOOT_INSTALL_TARGET_ENV_UTILS
 	$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv \
 		$(TARGET_DIR)/usr/sbin/fw_printenv
@@ -116,13 +116,13 @@ $(eval $(call GENTARGETS,boot,u-boot))
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_TARGET_UBOOT),y)
+ifeq ($(BR2_BOOT_UBOOT),y)
 TARGETS+=u-boot
 
 # we NEED a board name unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(U_BOOT_BOARD_NAME),)
-$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
+$(error NO U-Boot board name set. Check your BR2_BOOT_UBOOT_BOARDNAME setting)
 endif
 endif
 
-- 
1.7.4.1

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

* [Buildroot] [PATCH 23/28] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT*
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (21 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 24/28] Improve TARGETS handling for bootloaders and kernel Thomas Petazzoni
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

As we are moving U-Boot to the package infrastructure, the Kconfig
options must match the package name. As the package name is 'u-boot',
the Kconfig options must be BR2_BOOT_U_BOOT*.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/u-boot/Config.in |   70 ++++++++++++++++++++++++------------------------
 boot/u-boot/u-boot.mk |   35 ++++++++++++------------
 2 files changed, 52 insertions(+), 53 deletions(-)

diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in
index d9a6385..658a539 100644
--- a/boot/u-boot/Config.in
+++ b/boot/u-boot/Config.in
@@ -1,10 +1,10 @@
-menuconfig BR2_BOOT_UBOOT
+menuconfig BR2_BOOT_U_BOOT
 	bool "U-Boot"
 	help
 	  Build "Das U-Boot" Boot Monitor
 
-if BR2_BOOT_UBOOT
-config BR2_BOOT_UBOOT_BOARDNAME
+if BR2_BOOT_U_BOOT
+config BR2_BOOT_U_BOOT_BOARDNAME
 	string "U-Boot board name"
 	help
 	  One of U-Boot supported boards to be built.
@@ -12,47 +12,47 @@ config BR2_BOOT_UBOOT_BOARDNAME
 
 choice
 	prompt "U-Boot Version"
-	default BR2_BOOT_UBOOT_2011_03
+	default BR2_BOOT_U_BOOT_2011_03
 	help
 	  Select the specific U-Boot version you want to use
 
-config BR2_BOOT_UBOOT_2011_03
+config BR2_BOOT_U_BOOT_2011_03
 	bool "2011.03"
 
-config BR2_BOOT_UBOOT_2010_12
+config BR2_BOOT_U_BOOT_2010_12
 	bool "2010.12"
 
-config BR2_BOOT_UBOOT_2010_09
+config BR2_BOOT_U_BOOT_2010_09
 	bool "2010.09"
 
-config BR2_BOOT_UBOOT_2010_06
+config BR2_BOOT_U_BOOT_2010_06
 	bool "2010.06"
 
-config BR2_BOOT_UBOOT_2010_03
+config BR2_BOOT_U_BOOT_2010_03
 	bool "2010.03"
 
-config BR2_BOOT_UBOOT_CUSTOM_TARBALL
+config BR2_BOOT_U_BOOT_CUSTOM_TARBALL
 	bool "Custom tarball"
 
 endchoice
 
-if BR2_BOOT_UBOOT_CUSTOM_TARBALL
+if BR2_BOOT_U_BOOT_CUSTOM_TARBALL
 
-config BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION
+config BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION
 	string "URL of custom U-Boot tarball"
 
 endif
 
-config BR2_BOOT_UBOOT_VERSION
+config BR2_BOOT_U_BOOT_VERSION
 	string
-	default "2011.03"	if BR2_BOOT_UBOOT_2011_03
-	default "2010.12"	if BR2_BOOT_UBOOT_2010_12
-	default "2010.09"	if BR2_BOOT_UBOOT_2010_09
-	default "2010.06"	if BR2_BOOT_UBOOT_2010_06
-	default "2010.03"	if BR2_BOOT_UBOOT_2010_03
-	default "custom"	if BR2_BOOT_UBOOT_CUSTOM_TARBALL
-
-config BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR
+	default "2011.03"	if BR2_BOOT_U_BOOT_2011_03
+	default "2010.12"	if BR2_BOOT_U_BOOT_2010_12
+	default "2010.09"	if BR2_BOOT_U_BOOT_2010_09
+	default "2010.06"	if BR2_BOOT_U_BOOT_2010_06
+	default "2010.03"	if BR2_BOOT_U_BOOT_2010_03
+	default "custom"	if BR2_BOOT_U_BOOT_CUSTOM_TARBALL
+
+config BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR
 	string "custom patch dir"
 	help
 	  If your board requires custom patches, add the path to the
@@ -64,68 +64,68 @@ config BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR
 choice
 	prompt "U-Boot binary format"
 
-config BR2_BOOT_UBOOT_FORMAT_BIN
+config BR2_BOOT_U_BOOT_FORMAT_BIN
 	bool "u-boot.bin"
 
-config BR2_BOOT_UBOOT_FORMAT_KWB
+config BR2_BOOT_U_BOOT_FORMAT_KWB
 	depends on BR2_arm
 	bool "u-boot.kwb (Marvell)"
 
-config BR2_BOOT_UBOOT_FORMAT_LDR
+config BR2_BOOT_U_BOOT_FORMAT_LDR
 	depends on BR2_bfin
 	bool "u-boot.ldr"
 
 endchoice
 
-config BR2_BOOT_UBOOT_TOOL_ENV
+config BR2_BOOT_U_BOOT_TOOL_ENV
 	bool "fw_printenv tool in target"
 	help
 	  Install fw_printenv / fw_setenv tools in target.
 
-menuconfig BR2_BOOT_UBOOT_NETWORK
+menuconfig BR2_BOOT_U_BOOT_NETWORK
 	bool "Network Settings"
 	default y
 	help
 	  Network settings for U-boot
 
-if BR2_BOOT_UBOOT_NETWORK
+if BR2_BOOT_U_BOOT_NETWORK
 
-config BR2_BOOT_UBOOT_SERVERIP
+config BR2_BOOT_U_BOOT_SERVERIP
 	string "server ip"
 	default "10.175.196.221"
 	help
 	  TFTP server ip address
 
-config BR2_BOOT_UBOOT_IPADDR
+config BR2_BOOT_U_BOOT_IPADDR
 	string "ip address"
 	default "10.175.196.18"
 	help
 	  Target ip address
 
-config BR2_BOOT_UBOOT_GATEWAY
+config BR2_BOOT_U_BOOT_GATEWAY
 	string "gateway ip"
 	default "10.175.196.1"
 	help
 	  Gateway ip address
 
-config BR2_BOOT_UBOOT_NETMASK
+config BR2_BOOT_U_BOOT_NETMASK
 	string "netmask"
 	default "255.255.255.0"
 	help
 	  Network Mask
 
-config BR2_BOOT_UBOOT_ETHADDR
+config BR2_BOOT_U_BOOT_ETHADDR
 	string "ethernet address"
 	default "04:25:fe:ed:00:18"
 	help
 	  Target MAC address for the ethernet interface.
 	  This should be changed for production units
 
-config BR2_BOOT_UBOOT_ETH1ADDR
+config BR2_BOOT_U_BOOT_ETH1ADDR
 	string "ethernet 2 address"
 	help
 	  Target MAC address for the second ethernet interface.
 
-endif # BR2_BOOT_UBOOT_NETWORK
+endif # BR2_BOOT_U_BOOT_NETWORK
 
-endif # BR2_BOOT_UBOOT
+endif # BR2_BOOT_U_BOOT
diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk
index ecbf675..d6fb881 100644
--- a/boot/u-boot/u-boot.mk
+++ b/boot/u-boot/u-boot.mk
@@ -3,14 +3,14 @@
 # U-Boot
 #
 #############################################################
-U_BOOT_VERSION    = $(call qstrip,$(BR2_BOOT_UBOOT_VERSION))
-U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_BOOT_UBOOT_BOARDNAME))
+U_BOOT_VERSION    = $(call qstrip,$(BR2_BOOT_U_BOOT_VERSION))
+U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_BOOT_U_BOOT_BOARDNAME))
 
 U_BOOT_INSTALL_IMAGES = YES
 
 ifeq ($(U_BOOT_VERSION),custom)
 # Handle custom U-Boot tarballs as specified by the configuration
-U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION))
+U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION))
 U_BOOT_SITE    = $(dir $(U_BOOT_TARBALL))
 U_BOOT_SOURCE  = $(notdir $(U_BOOT_TARBALL))
 else
@@ -19,10 +19,10 @@ U_BOOT_SITE    = ftp://ftp.denx.de/pub/u-boot
 U_BOOT_SOURCE  = u-boot-$(U_BOOT_VERSION).tar.bz2
 endif
 
-ifeq ($(BR2_BOOT_UBOOT_FORMAT_KWB),y)
+ifeq ($(BR2_BOOT_U_BOOT_FORMAT_KWB),y)
 U_BOOT_BIN          = u-boot.kwb
 U_BOOT_MAKE_TARGET  = $(U_BOOT_BIN)
-else ifeq ($(BR2_BOOT_UBOOT_FORMAT_LDR),y)
+else ifeq ($(BR2_BOOT_U_BOOT_FORMAT_LDR),y)
 U_BOOT_BIN          = u-boot.ldr
 else
 U_BOOT_BIN          = u-boot.bin
@@ -52,9 +52,9 @@ $(if $(call qstrip,$(2)),
 	@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h)
 endef
 
-ifneq ($(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR)),)
+ifneq ($(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR)),)
 define U_BOOT_APPLY_CUSTOM_PATCHES
-	toolchain/patch-kernel.sh $(@D) $(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR) \
+	toolchain/patch-kernel.sh $(@D) $(BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR) \
 		u-boot-$(U_BOOT_VERSION)-\*.patch
 endef
 
@@ -71,16 +71,16 @@ define U_BOOT_CONFIGURE_CMDS
 	@echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h
 	$(call insert_define,DATE,$(DATE))
 	$(call insert_define,CONFIG_LOAD_SCRIPTS,1)
-	$(call insert_define,CONFIG_IPADDR,$(BR2_BOOT_UBOOT_IPADDR))
-	$(call insert_define,CONFIG_GATEWAYIP,$(BR2_BOOT_UBOOT_GATEWAY))
-	$(call insert_define,CONFIG_NETMASK,$(BR2_BOOT_UBOOT_NETMASK))
-	$(call insert_define,CONFIG_SERVERIP,$(BR2_BOOT_UBOOT_SERVERIP))
-	$(call insert_define,CONFIG_ETHADDR,$(BR2_BOOT_UBOOT_ETHADDR))
-	$(call insert_define,CONFIG_ETH1ADDR,$(BR2_BOOT_UBOOT_ETH1ADDR))
+	$(call insert_define,CONFIG_IPADDR,$(BR2_BOOT_U_BOOT_IPADDR))
+	$(call insert_define,CONFIG_GATEWAYIP,$(BR2_BOOT_U_BOOT_GATEWAY))
+	$(call insert_define,CONFIG_NETMASK,$(BR2_BOOT_U_BOOT_NETMASK))
+	$(call insert_define,CONFIG_SERVERIP,$(BR2_BOOT_U_BOOT_SERVERIP))
+	$(call insert_define,CONFIG_ETHADDR,$(BR2_BOOT_U_BOOT_ETHADDR))
+	$(call insert_define,CONFIG_ETH1ADDR,$(BR2_BOOT_U_BOOT_ETH1ADDR))
 	@echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h
 endef
 
-ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y)
+ifeq ($(BR2_BOOT_U_BOOT_TOOL_ENV),y)
 define U_BOOT_BUILD_TARGET_ENV_UTILS
 	$(TARGET_CONFIGURE_OPTS) $(MAKE) HOSTCC="$(TARGET_CC)" -C $(@D) env
 endef
@@ -97,7 +97,7 @@ define U_BOOT_INSTALL_IMAGES_CMDS
 	cp -dpf $(@D)/$(U_BOOT_BIN) $(BINARIES_DIR)/
 endef
 
-ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y)
+ifeq ($(BR2_BOOT_U_BOOT_TOOL_ENV),y)
 define U_BOOT_INSTALL_TARGET_ENV_UTILS
 	$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv \
 		$(TARGET_DIR)/usr/sbin/fw_printenv
@@ -116,13 +116,12 @@ $(eval $(call GENTARGETS,boot,u-boot))
 # Toplevel Makefile options
 #
 #############################################################
-ifeq ($(BR2_BOOT_UBOOT),y)
+ifeq ($(BR2_BOOT_U_BOOT),y)
 TARGETS+=u-boot
-
 # we NEED a board name unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(U_BOOT_BOARD_NAME),)
-$(error NO U-Boot board name set. Check your BR2_BOOT_UBOOT_BOARDNAME setting)
+$(error NO U-Boot board name set. Check your BR2_BOOT_U_BOOT_BOARDNAME setting)
 endif
 endif
 
-- 
1.7.4.1

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

* [Buildroot] [PATCH 24/28] Improve TARGETS handling for bootloaders and kernel
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (22 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 23/28] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 25/28] linux: allow specification of a custom Git repository as a source Thomas Petazzoni
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

As the kernel and bootloaders do not use the normal BR2_PACKAGE_*
Kconfig options, their target name was not automatically added to the
global TARGETS variable. Each bootloader .mk and the linux.mk had to
add their own target manually to TARGETS, and the package
infrastructure was making tests on non-existing Kconfig variables.

This commit improves the package infrastructure so that it looks at
BR2_PACKAGE_<pkg> for packages, BR2_BOOT_<pkg> for bootloaders and at
the special BR2_LINUX_KERNEL for the linux package.

This allows to simplify a little bit the bootloaders and linux .mk
files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/at91bootstrap/at91bootstrap.mk         |    8 --------
 boot/at91dataflashboot/at91dataflashboot.mk |    9 ---------
 boot/barebox/barebox.mk                     |    2 --
 boot/grub/grub.mk                           |    9 ---------
 boot/syslinux/syslinux.mk                   |    9 ---------
 boot/u-boot/u-boot.mk                       |    2 --
 linux/linux.mk                              |    5 -----
 package/Makefile.package.in                 |   16 +++++++++++++---
 8 files changed, 13 insertions(+), 47 deletions(-)

diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
index 46627de..1750557 100644
--- a/boot/at91bootstrap/at91bootstrap.mk
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -31,19 +31,11 @@ endef
 
 $(eval $(call GENTARGETS,boot,at91bootstrap))
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
 ifeq ($(BR2_BOOT_AT91BOOTSTRAP),y)
-TARGETS+=at91bootstrap
-
 # we NEED a board name unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(AT91BOOTSTRAP_BOARD),)
 $(error No AT91Bootstrap board name set. Check your BR2_BOOT_AT91BOOTSTRAP_BOARD setting)
 endif
 endif
-
 endif
diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk
index fb698ce..769542c 100644
--- a/boot/at91dataflashboot/at91dataflashboot.mk
+++ b/boot/at91dataflashboot/at91dataflashboot.mk
@@ -20,12 +20,3 @@ define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS
 endef
 
 $(eval $(call GENTARGETS,boot,at91dataflashboot))
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_BOOT_AT91DATAFLASHBOOT),y)
-TARGETS+=at91dataflashboot
-endif
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index b844d43..2745213 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -54,8 +54,6 @@ endif
 $(eval $(call GENTARGETS,boot,barebox))
 
 ifeq ($(BR2_BOOT_BAREBOX),y)
-TARGETS+=barebox
-
 # we NEED a board defconfig file unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
index 93238cb..aed89d0 100644
--- a/boot/grub/grub.mk
+++ b/boot/grub/grub.mk
@@ -83,12 +83,3 @@ define GRUB_UNINSTALL_TARGET_CMDS
 endef
 
 $(eval $(call AUTOTARGETS,boot,grub))
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_BOOT_GRUB),y)
-TARGETS+=grub
-endif
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
index 1f50ed5..be1f0ca 100644
--- a/boot/syslinux/syslinux.mk
+++ b/boot/syslinux/syslinux.mk
@@ -27,12 +27,3 @@ define SYSLINUX_INSTALL_IMAGES_CMDS
 endef
 
 $(eval $(call GENTARGETS,boot,syslinux))
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_BOOT_SYSLINUX),y)
-TARGETS+=syslinux
-endif
diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk
index d6fb881..97d7921 100644
--- a/boot/u-boot/u-boot.mk
+++ b/boot/u-boot/u-boot.mk
@@ -117,12 +117,10 @@ $(eval $(call GENTARGETS,boot,u-boot))
 #
 #############################################################
 ifeq ($(BR2_BOOT_U_BOOT),y)
-TARGETS+=u-boot
 # we NEED a board name unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(U_BOOT_BOARD_NAME),)
 $(error NO U-Boot board name set. Check your BR2_BOOT_U_BOOT_BOARDNAME setting)
 endif
 endif
-
 endif
diff --git a/linux/linux.mk b/linux/linux.mk
index e3a485e..0012ca9 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -197,11 +197,6 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI
 # after it generated the initramfs list of files.
 linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
 
-
-ifeq ($(BR2_LINUX_KERNEL),y)
-TARGETS+=linux
-endif
-
 # Checks to give errors that the user can understand
 ifeq ($(filter source,$(MAKECMDGOALS)),)
 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 0236024..cfb5cb4 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -522,10 +522,20 @@ $$($(2)_TARGET_UNINSTALL):		PKG=$(2)
 $$($(2)_TARGET_CLEAN):			PKG=$(2)
 $$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
 
+# Compute the name of the Kconfig option that correspond to the
+# package being enabled. We handle three cases: the special Linux
+# kernel case, the bootloaders case, and the normal packages case.
+ifeq ($(1),linux)
+$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
+else ifeq ($(4),boot)
+$(2)_KCONFIG_VAR = BR2_BOOT_$(2)
+else
+$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
+endif
+
 # add package to the general list of targets if requested by the buildroot
 # configuration
-
-ifeq ($$(BR2_PACKAGE_$(2)),y)
+ifeq ($$($$($(2)_KCONFIG_VAR)),y)
 
 TARGETS += $(1)
 
@@ -537,7 +547,7 @@ else ifeq ($$($(2)_SITE_METHOD),bzr)
 DL_TOOLS_DEPENDENCIES += bzr
 endif # SITE_METHOD
 
-endif # BR2_PACKAGE_$(2)
+endif # $(2)_KCONFIG_VAR
 endef # GENTARGETS_INNER
 
 ################################################################################
-- 
1.7.4.1

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

* [Buildroot] [PATCH 25/28] linux: allow specification of a custom Git repository as a source
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (23 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 24/28] Improve TARGETS handling for bootloaders and kernel Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 26/28] u-boot: allow specification of custom Git repo as source Thomas Petazzoni
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/Config.in |   15 +++++++++++++++
 linux/linux.mk  |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/linux/Config.in b/linux/Config.in
index bdfa5b7..aa31f1f 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -47,6 +47,12 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL
 	  This option allows to specify the http or ftp location of a
 	  specific kernel source tarball
 
+config BR2_LINUX_KERNEL_CUSTOM_GIT
+        bool "Custom Git tree"
+	help
+	  This option allows Buildroot to get the Linux kernel source
+	  code from a Git repository.
+
 endchoice
 
 config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
@@ -58,12 +64,21 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
 	string "URL of custom kernel tarball"
 	depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
 
+config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL
+        string "URL of custom Git repository"
+	depends on BR2_LINUX_KERNEL_CUSTOM_GIT
+
+config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION
+        string "Custom Git version"
+	depends on BR2_LINUX_KERNEL_CUSTOM_GIT
+
 config BR2_LINUX_KERNEL_VERSION
 	string
 	default "2.6.39.2" if BR2_LINUX_KERNEL_2_6_39
 	default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS
 	default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION
 	default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
+	default $BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION if BR2_LINUX_KERNEL_CUSTOM_GIT
 
 #
 # Patch selection
diff --git a/linux/linux.mk b/linux/linux.mk
index 0012ca9..c1f7c48 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -10,6 +10,9 @@ ifeq ($(LINUX_VERSION),custom)
 LINUX_TARBALL := $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
 LINUX_SITE    := $(dir $(LINUX_TARBALL))
 LINUX_SOURCE  := $(notdir $(LINUX_TARBALL))
+else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
+LINUX_SITE        := $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
+LINUX_SITE_METHOD := git
 else
 LINUX_SOURCE  := linux-$(LINUX_VERSION).tar.bz2
 LINUX_SITE    := $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
-- 
1.7.4.1

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

* [Buildroot] [PATCH 26/28] u-boot: allow specification of custom Git repo as source
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (24 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 25/28] linux: allow specification of a custom Git repository as a source Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 27/28] Add x-loader bootloader Thomas Petazzoni
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/u-boot/Config.in |   14 ++++++++++++++
 boot/u-boot/u-boot.mk |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in
index 658a539..dde92d3 100644
--- a/boot/u-boot/Config.in
+++ b/boot/u-boot/Config.in
@@ -34,6 +34,9 @@ config BR2_BOOT_U_BOOT_2010_03
 config BR2_BOOT_U_BOOT_CUSTOM_TARBALL
 	bool "Custom tarball"
 
+config BR2_BOOT_U_BOOT_CUSTOM_GIT
+        bool "Custom Git repository"
+
 endchoice
 
 if BR2_BOOT_U_BOOT_CUSTOM_TARBALL
@@ -43,6 +46,16 @@ config BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION
 
 endif
 
+if BR2_BOOT_U_BOOT_CUSTOM_GIT
+
+config BR2_BOOT_U_BOOT_CUSTOM_GIT_REPO_URL
+        string "URL of custom Git repository"
+
+config BR2_BOOT_U_BOOT_CUSTOM_GIT_VERSION
+        string "Custom Git version"
+
+endif
+
 config BR2_BOOT_U_BOOT_VERSION
 	string
 	default "2011.03"	if BR2_BOOT_U_BOOT_2011_03
@@ -51,6 +64,7 @@ config BR2_BOOT_U_BOOT_VERSION
 	default "2010.06"	if BR2_BOOT_U_BOOT_2010_06
 	default "2010.03"	if BR2_BOOT_U_BOOT_2010_03
 	default "custom"	if BR2_BOOT_U_BOOT_CUSTOM_TARBALL
+	default $BR2_BOOT_U_BOOT_CUSTOM_GIT_VERSION if BR2_BOOT_U_BOOT_CUSTOM_GIT
 
 config BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR
 	string "custom patch dir"
diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk
index 97d7921..6334fad 100644
--- a/boot/u-boot/u-boot.mk
+++ b/boot/u-boot/u-boot.mk
@@ -13,6 +13,9 @@ ifeq ($(U_BOOT_VERSION),custom)
 U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION))
 U_BOOT_SITE    = $(dir $(U_BOOT_TARBALL))
 U_BOOT_SOURCE  = $(notdir $(U_BOOT_TARBALL))
+else ifeq ($(BR2_BOOT_U_BOOT_CUSTOM_GIT),y)
+U_BOOT_SITE        = $(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_GIT_REPO_URL))
+U_BOOT_SITE_METHOD = git
 else
 # Handle stable official U-Boot versions
 U_BOOT_SITE    = ftp://ftp.denx.de/pub/u-boot
-- 
1.7.4.1

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

* [Buildroot] [PATCH 27/28] Add x-loader bootloader
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (25 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 26/28] u-boot: allow specification of custom Git repo as source Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-05 19:54 ` [Buildroot] [PATCH 28/28] barebox: bump version Thomas Petazzoni
  2011-07-07 10:25 ` [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Luca Ceresoli
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

From: Philippe Reynes <tremyfr@yahoo.fr>

[Thomas Petazzoni: use BR2_BOOT prefix instead of BR2_TARGET, misc
fixes]

Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/Config.in            |    1 +
 boot/x-loader/Config.in   |   15 +++++++++++++++
 boot/x-loader/x-loader.mk |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 boot/x-loader/Config.in
 create mode 100644 boot/x-loader/x-loader.mk

diff --git a/boot/Config.in b/boot/Config.in
index 67ab8ac..a07102e 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -6,6 +6,7 @@ source "boot/syslinux/Config.in"
 source "boot/u-boot/Config.in"
 source "boot/at91bootstrap/Config.in"
 source "boot/at91dataflashboot/Config.in"
+source "boot/x-loader/Config.in"
 
 endmenu
 
diff --git a/boot/x-loader/Config.in b/boot/x-loader/Config.in
new file mode 100644
index 0000000..9597337
--- /dev/null
+++ b/boot/x-loader/Config.in
@@ -0,0 +1,15 @@
+menuconfig BR2_BOOT_XLOADER
+	bool "X-loader"
+	depends on BR2_arm
+	help
+	  The x-loader bootloader. It is mainly used on OMAP-based
+	  platforms.
+
+if BR2_BOOT_XLOADER
+config BR2_BOOT_XLOADER_BOARDNAME
+	string "x-loader board name"
+	help
+	  One of x-loader supported boards to be built.
+	  This will be suffixed with _config to meet x-loader
+	  standard naming.
+endif
diff --git a/boot/x-loader/x-loader.mk b/boot/x-loader/x-loader.mk
new file mode 100644
index 0000000..31395ee
--- /dev/null
+++ b/boot/x-loader/x-loader.mk
@@ -0,0 +1,35 @@
+#############################################################
+#
+# x-loader
+#
+#############################################################
+XLOADER_VERSION    = 6f3a26101303051e0f91b6213735b68ce804e94e
+XLOADER_SITE       = git://gitorious.org/x-loader/x-loader.git
+XLOADER_BOARD_NAME = $(call qstrip,$(BR2_BOOT_XLOADER_BOARDNAME))
+
+define XLOADER_BUILD_CMDS
+	$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) $(XLOADER_BOARD_NAME)_config
+	$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all
+	$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) ift
+endef
+
+define XLOADER_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/
+endef
+
+$(eval $(call GENTARGETS,boot,xloader))
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_BOOT_XLOADER),y)
+# we NEED a board name unless we're at make source
+ifeq ($(filter source,$(MAKECMDGOALS)),)
+ifeq ($(XLOADER_BOARD_NAME),)
+$(error NO x-loader board name set. Check your BR2_BOOT_XLOADER_BOARDNAME setting)
+endif
+endif
+
+endif
-- 
1.7.4.1

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

* [Buildroot] [PATCH 28/28] barebox: bump version
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (26 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 27/28] Add x-loader bootloader Thomas Petazzoni
@ 2011-07-05 19:54 ` Thomas Petazzoni
  2011-07-07 10:25 ` [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Luca Ceresoli
  28 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/barebox/barebox.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 2745213..a254ec0 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-BAREBOX_VERSION := 2011.05.0
+BAREBOX_VERSION := 2011.06.0
 BAREBOX_SOURCE  := barebox-$(BAREBOX_VERSION).tar.bz2
 BAREBOX_SITE    := http://www.barebox.org/download/
 
-- 
1.7.4.1

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

* [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders
  2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
                   ` (27 preceding siblings ...)
  2011-07-05 19:54 ` [Buildroot] [PATCH 28/28] barebox: bump version Thomas Petazzoni
@ 2011-07-07 10:25 ` Luca Ceresoli
  28 siblings, 0 replies; 59+ messages in thread
From: Luca Ceresoli @ 2011-07-07 10:25 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni wrote:
> Hello,
>
> We have a package infrastructure that allows to share a lot of common
> behaviour between packages, and allows to add new features easily to
> all existing packages (Git/Mercurial download support, or usage of an
> external source tree, etc.).
>
> Unfortunately, some of the packages that would most benefit from those
> new infrastructure features are the bootloader and kernel, since it's
> typically the software components that have to be modified/tuned
> during the course of an embedded Linux project.
>
> Therefore, this series converts all bootloaders makefiles and the
> kernel makefile to the package infrastructure, and adds the
> possibility of fetching the kernel and u-boot through Git (it can be
> added to other bootloaders with just a few lines of changes, mostly at
> the Config.in level).
...

I've commented (on the v2 thread) about patch 03:
http://lists.busybox.net/pipermail/buildroot/2011-July/043980.html

I'd like that patch to at least return how it was in v2.

For all patches except patch 3:
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

[after reading Documentation/SubmittingPatches a few times, I have come
to the conclusion that none of Reviewed-by: and Tested-by: imply the
other one, but they somehow imply Acked-by:... :) ]

Luca

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

* [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot
  2011-07-05 19:53 ` [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot Thomas Petazzoni
@ 2011-07-07 19:08   ` Sven Neumann
  2011-07-07 21:17   ` Peter Korsgaard
  1 sibling, 0 replies; 59+ messages in thread
From: Sven Neumann @ 2011-07-07 19:08 UTC (permalink / raw)
  To: buildroot

That will come in very handy. We have had to hack around the lack of
this option in the post-build script.


Thanks,
Sven

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

* [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands
  2011-07-05 19:53 ` [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
@ 2011-07-07 21:00   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:00 UTC (permalink / raw)
  To: buildroot

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

 Thomas> From: Allan W. Nielsen <a@awn.dk>
 Thomas> When using GENTARGETS (or macroes depending on it), there is no way of
 Thomas> specifying a custom extraction procedure. When using the patch one can
 Thomas> simply define $(PACKAGE_NAME)_EXTRACT_CMDS which will override the
 Thomas> default. If non is defined it will fall back to the default extract
 Thomas> procedure.

 Thomas> An example could look like this:

 Thomas> === PACKAGE BEGIN ===
 Thomas> FGLRX_VERSION=11-3
 Thomas> FGLRX_SOURCE:=ati-driver-installer-$(FGLRX_VERSION)-x86.x86_64.run
 Thomas> FGLRX_SITE:=http://www2.ati.com/drivers/linux/

 Thomas> define FGLRX_EXTRACT_CMDS
 Thomas> 	sh $(DL_DIR)/$(FGLRX_SOURCE) --extract $(@D)
 Thomas> endef

Committed, thanks.

It would be good to document this in buildroot.html as well.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 02/28] Fix quoting in default extract command
  2011-07-05 19:53 ` [Buildroot] [PATCH 02/28] Fix quoting in default extract command Thomas Petazzoni
@ 2011-07-07 21:05   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:05 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot
  2011-07-05 19:53 ` [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot Thomas Petazzoni
  2011-07-07 19:08   ` Sven Neumann
@ 2011-07-07 21:17   ` Peter Korsgaard
  1 sibling, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:17 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed (but made the copy to output/image unconditional as requested
by Luca), thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config
  2011-07-05 19:53 ` [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
@ 2011-07-07 21:46   ` Peter Korsgaard
  2011-07-08 17:08     ` Thomas Petazzoni
  0 siblings, 1 reply; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:46 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Currently, the kernel configuration mechanism works as follows for
 Thomas> custom configuration files:

 Thomas>  * Copy the custom config file to buildroot_defconfig in the kernel
 Thomas>    tree
 Thomas>  * Run "make buildroot_defconfig"
 Thomas>  * Remove the buildroot_defconfig
 Thomas>  * Tune the .config depending on some Buildroot options (EABI, MDEV,
 Thomas>    etc.)
 Thomas>  * Run oldconfig

 Thomas> And for a defconfig-based configuration:

 Thomas>  * Run "make XXX_defconfig"
 Thomas>  * Tune the .config depending on some Buildroot options (EABI, MDEV,
 Thomas>    etc.)
 Thomas>  * Run oldconfig

 Thomas> The problem is that the tuning done on the .config file can lead to
 Thomas> have new options available for which no value has been set. Therefore,
 Thomas> the "oldconfig" at the end of the process will hang the build process,
 Thomas> waiting for the user to confirm what should be done.

Why don't we just call 'make silentoldconfig' instead?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/
  2011-07-05 19:53 ` [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/ Thomas Petazzoni
@ 2011-07-07 21:47   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:47 UTC (permalink / raw)
  To: buildroot

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

 Thomas> This will allow the bootloader makefiles and the kernel makefile to
 Thomas> rely on the GENTARGETS infrastructure.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages
  2011-07-05 19:53 ` [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages Thomas Petazzoni
@ 2011-07-07 21:50   ` Peter Korsgaard
  2011-07-07 21:55     ` Yann E. MORIN
  0 siblings, 1 reply; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:50 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The patching procedure was using $($(NOHOSTPKG)_NAME) to find the name
 Thomas> of the package without the host- prefix for host packages, which is
 Thomas> needed to find the package directory and the prefix of the patches.

 Thomas> However, this $($(NOHOSTPKG)_NAME) variable is empty when there is
 Thomas> only an host variant for the package and no target variant for it.

 Thomas> Therefore, instead of using this $($(NOHOSTPKG)_NAME) variable, we now
 Thomas> use a new $(RAWNAME) variable, which is always the name of the package
 Thomas> without the host- prefix, even for host packages.

 Thomas> Thanks to Yann E. Morin for providing the tip on using patsubst
 Thomas> instead of subst.

RAWNAME does fall a bit outside the "namespace" used by the other
variables here, but ok - Committed, thanks.


 Thomas> -$$($(2)_TARGET_PATCH):			NOHOSTPKG=$(3)
 Thomas> +$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))

Here's to hoping we'll never have a package called 'host' ;)

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages
  2011-07-07 21:50   ` Peter Korsgaard
@ 2011-07-07 21:55     ` Yann E. MORIN
  2011-07-07 21:59       ` Peter Korsgaard
  0 siblings, 1 reply; 59+ messages in thread
From: Yann E. MORIN @ 2011-07-07 21:55 UTC (permalink / raw)
  To: buildroot

Peter, Thomas, All,

On Thursday 07 July 2011 23:50:06 Peter Korsgaard wrote:
> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>  Thomas> -$$($(2)_TARGET_PATCH):			NOHOSTPKG=$(3)
>  Thomas> +$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))
> 
> Here's to hoping we'll never have a package called 'host' ;)

We already raised that potential issue with Thomas, and the conclusion is
that we do not allow a package which name starts with 'host-'. See:
  http://lists.busybox.net/pipermail/buildroot/2011-July/043880.html

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages
  2011-07-07 21:55     ` Yann E. MORIN
@ 2011-07-07 21:59       ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-07 21:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> Peter, Thomas, All,
 Yann> On Thursday 07 July 2011 23:50:06 Peter Korsgaard wrote:
 >> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
 Thomas> -$$($(2)_TARGET_PATCH):			NOHOSTPKG=$(3)
 Thomas> +$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))
 >> 
 >> Here's to hoping we'll never have a package called 'host' ;)

 Yann> We already raised that potential issue with Thomas, and the conclusion is
 Yann> that we do not allow a package which name starts with 'host-'. See:
 Yann>   http://lists.busybox.net/pipermail/buildroot/2011-July/043880.html

Ahh ok, thanks - I'm still catching up on mails, and must have missed
that one..

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config
  2011-07-07 21:46   ` Peter Korsgaard
@ 2011-07-08 17:08     ` Thomas Petazzoni
  2011-07-08 18:11       ` Peter Korsgaard
  0 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-08 17:08 UTC (permalink / raw)
  To: buildroot

Le Thu, 07 Jul 2011 23:46:18 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> Why don't we just call 'make silentoldconfig' instead?

No, silentoldconfig, despite its name, will ask many questions when
the .config is simply a minimal defconfig. See below:

thomas at skate:~/projets/linux-2.6$ cp ../buildroot/board/qemu/arm-versatile/linux-2.6.38.config .config
thomas at skate:~/projets/linux-2.6$ make ARCH=arm silentoldconfig
scripts/kconfig/conf --silentoldconfig Kconfig
*
* Restart config...
*
*
* Linux/arm 2.6.39 Kernel Configuration
*
Patch physical to virtual translations at runtime (EXPERIMENTAL) (ARM_PATCH_PHYS_VIRT) [N/y/?] (NEW) 
[...]
[...] Lots of questions follow
[...]
thomas at skate:~/projets/linux-2.6$ cp ../buildroot/board/qemu/arm-versatile/linux-2.6.38.config arch/arm/configs/blabla_defconfig
thomas at skate:~/projets/linux-2.6$ make ARCH=arm blabla_defconfig
#
# configuration written to .config
#
thomas at skate:~/projets/linux-2.6$ 

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

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

* [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config
  2011-07-08 17:08     ` Thomas Petazzoni
@ 2011-07-08 18:11       ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-08 18:11 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Le Thu, 07 Jul 2011 23:46:18 +0200,
 Thomas> Peter Korsgaard <jacmet@uclibc.org> a ?crit :

 >> Why don't we just call 'make silentoldconfig' instead?

 Thomas> No, silentoldconfig, despite its name, will ask many questions when
 Thomas> the .config is simply a minimal defconfig. See below:

 Thomas> thomas at skate:~/projets/linux-2.6$ cp ../buildroot/board/qemu/arm-versatile/linux-2.6.38.config .config
 Thomas> thomas at skate:~/projets/linux-2.6$ make ARCH=arm silentoldconfig

But it isn't a minimal config anymore, as we're doing make
<blah>_defconfig, tweak, make silentoldconfig.

Or am I missing something?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions
  2011-07-05 19:53 ` [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions Thomas Petazzoni
@ 2011-07-10  8:57   ` Peter Korsgaard
  2011-07-10 10:25     ` Thomas Petazzoni
  0 siblings, 1 reply; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10  8:57 UTC (permalink / raw)
  To: buildroot

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

Hi,

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  boot/barebox/barebox.mk |   13 +++++++------
 Thomas>  1 files changed, 7 insertions(+), 6 deletions(-)

 Thomas> diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
 Thomas> index f3e769f..88f222e 100644
 Thomas> --- a/boot/barebox/barebox.mk
 Thomas> +++ b/boot/barebox/barebox.mk
 Thomas> @@ -4,12 +4,13 @@
 Thomas>  #
 Thomas>  #############################################################
 
 Thomas> -BAREBOX_VERSION:=2011.05.0
 Thomas> -BAREBOX_SOURCE:=barebox-$(BAREBOX_VERSION).tar.bz2
 Thomas> -BAREBOX_SITE:=http://www.barebox.org/download/
 Thomas> -BAREBOX_DIR:=$(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
 Thomas> -BAREBOX_CAT:=$(BZCAT)
 Thomas> -BAREBOX_BOARD_DEFCONFIG:=$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
 Thomas> +BAREBOX_VERSION := 2011.05.0
 Thomas> +BAREBOX_SOURCE  := barebox-$(BAREBOX_VERSION).tar.bz2
 Thomas> +BAREBOX_SITE    := http://www.barebox.org/download/
 Thomas> +BAREBOX_DIR     := $(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
 Thomas> +BAREBOX_CAT     := $(BZCAT)

I prefer the BAREBOX_CAT = $(BZCAT) style, which is the most commonly
used style under package:

grep -l '[A-Z0-9] = ' package/**/*mk|wc -l
625

grep -l '  = ' package/**/*mk|wc -l
18

grep -l '[A-Z0-9] := ' package/**/*mk|wc -l
7

grep -l '  := ' package/**/*mk|wc -l
0

Care to respin?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions
  2011-07-10  8:57   ` Peter Korsgaard
@ 2011-07-10 10:25     ` Thomas Petazzoni
  2011-07-10 12:00       ` Peter Korsgaard
  0 siblings, 1 reply; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-10 10:25 UTC (permalink / raw)
  To: buildroot

Le Sun, 10 Jul 2011 10:57:07 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> I prefer the BAREBOX_CAT = $(BZCAT) style, which is the most commonly
> used style under package:

This assignation is removed by patch 8/28, which convers Barebox to
GENTARGETS :

--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -7,8 +7,11 @@
 BAREBOX_VERSION := 2011.05.0
 BAREBOX_SOURCE  := barebox-$(BAREBOX_VERSION).tar.bz2
 BAREBOX_SITE    := http://www.barebox.org/download/
-BAREBOX_DIR     := $(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
-BAREBOX_CAT     := $(BZCAT)

Knowing this, is it a problem if patch 7/28 uses := ?

Regards,

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

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

* [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions
  2011-07-10 10:25     ` Thomas Petazzoni
@ 2011-07-10 12:00       ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 12:00 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Le Sun, 10 Jul 2011 10:57:07 +0200,
 Thomas> Peter Korsgaard <jacmet@uclibc.org> a ?crit :

 >> I prefer the BAREBOX_CAT = $(BZCAT) style, which is the most commonly
 >> used style under package:

 Thomas> This assignation is removed by patch 8/28, which convers Barebox to
 Thomas> GENTARGETS :

Yes, most of it (but not VERSION/SOURCE/SITE), but ok - I've ammended
patch 8 with the ':=' -> '=' conversion and dropped patch 7.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS
  2011-07-05 19:53 ` [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-10 13:03   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 13:03 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  boot/barebox/barebox.mk |   59 +++++++++++++++++++++-------------------------
 Thomas>  1 files changed, 27 insertions(+), 32 deletions(-)

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS
  2011-07-05 19:54 ` [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-10 13:10   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 13:10 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  boot/at91bootstrap/at91bootstrap.mk |   53 ++++++++++++-----------------------
 Thomas>  1 files changed, 18 insertions(+), 35 deletions(-)

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS
  2011-07-05 19:54 ` [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-10 13:16   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 13:16 UTC (permalink / raw)
  To: buildroot

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

 Thomas> This commit converts the at91dataflashboot bootloader build process to
 Thomas> GENTARGETS. It also does the following changes :

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 13/28] syslinux: convert to GENTARGETS
  2011-07-05 19:54 ` [Buildroot] [PATCH 13/28] syslinux: " Thomas Petazzoni
@ 2011-07-10 13:27   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 13:27 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Moreover, the installation of pxelinux and/or isolinux is now selected
 Thomas> to suboptions, as we traditionally do for other packages. This allows
 Thomas> to have a single option (BR2_TARGET_SYSLINUX) that enables the
 Thomas> syslinux package.

Committed with minor tweaks, thanks.
 
 Thomas> -$(BINARIES_DIR)/isolinux.bin: $(SYSLINUX_DIR)/.compiled
 Thomas> -	cp -a $(SYSLINUX_DIR)/core/isolinux.bin $@
 Thomas> +define SYSLINUX_INSTALL_IMAGES_CMDS
 Thomas> +	for i in $(SYSLINUX_IMAGES-y); do \
 Thomas> +		$(INSTALL) -D -m 0755 $(@D)/core/$$i $(BINARIES_DIR)/`basename $$i`; \

basename seems unneeded.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS
  2011-07-05 19:54 ` [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS Thomas Petazzoni
@ 2011-07-10 13:30   ` Peter Korsgaard
  2011-08-20  9:22   ` Darius Augulis
  1 sibling, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 13:30 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 15/28] grub2: remove package
  2011-07-05 19:54 ` [Buildroot] [PATCH 15/28] grub2: remove package Thomas Petazzoni
@ 2011-07-10 13:31   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 13:31 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Grub 2 has been marked BROKEN in June 2010, and nobody cared to fix it
 Thomas> since then.

 Thomas> At that time, it was marked broken because the build process needed a
 Thomas> Ruby interpreter available on the host, and it's really a pain that
 Thomas> building a bootloader needs such a thing.

 Thomas> I've tried to upgrade the package to Grub2 1.99-rcX, and now it does
 Thomas> not need a Ruby interpreter anymore, but instead requires a tool
 Thomas> called "autogen", which itself needs the Guile Scheme interpreter.

 Thomas> Since we haven't heard any complaints about Grub2 being marked broken,
 Thomas> and since it's such a pain to package, let's get rid of it. Of course,
 Thomas> anybody interested in Grub2 is invited to contribute a working
 Thomas> package.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS
  2011-07-05 19:54 ` [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS Thomas Petazzoni
@ 2011-07-10 20:07   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 20:07 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The feature of building mkimage for the target is removed, it wasn't
 Thomas> building with current U-Boot, and doesn't make a lot of sense (mkimage
 Thomas> is needed only to prepare a kernel image, or an U-Boot script).

That's the primary use, yes - But mkimage -l is sometimes also handy on
the target. I've worked on a project where we used it to see the current
versions in flash (similar to the imls command in u-boot).

But ok, not that common a feature - Committed, thanks.

 Thomas> The feature of building mkimage for the host is moved to a proper
 Thomas> package. It duplicates a few things (U-Boot URL, etc.) but it makes
 Thomas> things a lot cleaner than having it handled by boot/u-boot/u-boot.mk.

It probably makes sense to move fw_printenv there as well.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 17/28] uboot-mkimage: new package
  2011-07-05 19:54 ` [Buildroot] [PATCH 17/28] uboot-mkimage: new package Thomas Petazzoni
@ 2011-07-10 20:10   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 20:10 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The mkimage for the host is now built by a package, so that
 Thomas> boot/u-boot/u-boot.mk is no longer responsible for doing this. It
 Thomas> makes things a lot easier to handle, as linux/linux.mk now simply
 Thomas> depends on host-uboot-mkimage.

Perhaps it would make sense to call it uboot-tools instead, if we move
fw_printenv over here as well (similar to the Debian package) - But ok,
that can be done later.

Committed, thanks.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  .../uboot-mkimage-2011.03-drop-configh.patch       |    0
 Thomas>  package/uboot-mkimage/uboot-mkimage.mk             |   16 ++++++++++++++++
 Thomas>  2 files changed, 16 insertions(+), 0 deletions(-)
 Thomas>  rename boot/u-boot/u-boot-2011.03-drop-configh.patch => package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch (100%)
 Thomas>  create mode 100644 package/uboot-mkimage/uboot-mkimage.mk

 Thomas> diff --git a/boot/u-boot/u-boot-2011.03-drop-configh.patch b/package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch
 Thomas> similarity index 100%
 Thomas> rename from boot/u-boot/u-boot-2011.03-drop-configh.patch
 Thomas> rename to package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch
 Thomas> diff --git a/package/uboot-mkimage/uboot-mkimage.mk b/package/uboot-mkimage/uboot-mkimage.mk
 Thomas> new file mode 100644
 Thomas> index 0000000..055348c
 Thomas> --- /dev/null
 Thomas> +++ b/package/uboot-mkimage/uboot-mkimage.mk
 Thomas> @@ -0,0 +1,16 @@
 Thomas> +UBOOT_MKIMAGE_VERSION = 2011.03
 Thomas> +UBOOT_MKIMAGE_SOURCE  = u-boot-$(UBOOT_MKIMAGE_VERSION).tar.bz2
 Thomas> +UBOOT_MKIMAGE_SITE    = ftp://ftp.denx.de/pub/u-boot
 Thomas> +
 Thomas> +define HOST_UBOOT_MKIMAGE_BUILD_CMDS
 Thomas> +	$(MAKE) -C $(@D) 			\
 Thomas> +		CROSS_COMPILE="$(TARGET_CROSS)" \
 Thomas> +		ARCH=$(U_BOOT_ARCH) 		\

I don't think CROSS_COMPILE / ARCH are needed for tools. It would be
good to set HOSTCC/CFLAGS/LDFLAGS to the host versions we're using
elsewhere in BR instead of using the defaults from u-boot.

I've fixed that in a followup patch.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 20/28] package: add support for post-download hooks
  2011-07-05 19:54 ` [Buildroot] [PATCH 20/28] package: add support for post-download hooks Thomas Petazzoni
@ 2011-07-10 20:25   ` Peter Korsgaard
  0 siblings, 0 replies; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 20:25 UTC (permalink / raw)
  To: buildroot

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

 Thomas> This will be needed for the Linux kernel package, which needs to
 Thomas> download patches in a custom way.

Committed, thanks.

It would be good to document this in docs/buildroot.html

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_*
  2011-07-05 19:54 ` [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
@ 2011-07-10 20:27   ` Peter Korsgaard
  2011-07-10 21:27     ` Thomas Petazzoni
  0 siblings, 1 reply; 59+ messages in thread
From: Peter Korsgaard @ 2011-07-10 20:27 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  boot/at91bootstrap/Config.in                |   18 +++---
 Thomas>  boot/at91bootstrap/at91bootstrap.mk         |    8 +-
 Thomas>  boot/at91dataflashboot/Config.in            |    2 +-
 Thomas>  boot/at91dataflashboot/at91dataflashboot.mk |    2 +-
 Thomas>  boot/barebox/Config.in                      |    8 +-
 Thomas>  boot/barebox/barebox.mk                     |   12 ++--
 Thomas>  boot/grub/Config.in                         |   94 +++++++++++++-------------
 Thomas>  boot/grub/grub.mk                           |   50 +++++++-------
 Thomas>  boot/syslinux/Config.in                     |   10 ++--
 Thomas>  boot/syslinux/syslinux.mk                   |    6 +-
 Thomas>  boot/u-boot/Config.in                       |   70 ++++++++++----------
 Thomas>  boot/u-boot/u-boot.mk                       |   34 +++++-----
 Thomas>  12 files changed, 157 insertions(+), 157 deletions(-)

Is this purely cosmetical or is there a deeper reason for this? This
presumably breaks all existing configs where bootloaders are used.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_*
  2011-07-10 20:27   ` Peter Korsgaard
@ 2011-07-10 21:27     ` Thomas Petazzoni
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-10 21:27 UTC (permalink / raw)
  To: buildroot

Le Sun, 10 Jul 2011 22:27:39 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> Is this purely cosmetical or is there a deeper reason for this? This
> presumably breaks all existing configs where bootloaders are used.

It is a preparation for patch 24/28, which improves the package
infrastructure so that the bootloader packages do not have to do
TARGETS+=u-boot manually, but this is instead done automatically by the
package infrastructure, as is done for conventional userspace packages.

In order to do that, I needed to differentiate the package type from
the option name. So, we had BR2_PACKAGE for userspace packages, and we
now have BR2_BOOT for bootloader packages. See how patch 24/28 is
implemented.

Regards,

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

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

* [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS
  2011-07-05 19:54 ` [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS Thomas Petazzoni
  2011-07-10 13:30   ` Peter Korsgaard
@ 2011-08-20  9:22   ` Darius Augulis
  2011-08-26 12:02     ` Peter Korsgaard
  1 sibling, 1 reply; 59+ messages in thread
From: Darius Augulis @ 2011-08-20  9:22 UTC (permalink / raw)
  To: buildroot



Hi Thomas,

with these changes grub is not installed to staging dir.
grub.mk has label:

define GRUB_INSTALL_STAGING_CMDS
         install -m 0755 -D $(@D)/grub/grub $(STAGING_DIR)/sbin/grub
endef

but when building it's installed only to target dir, but not to staging.

Darius.


On 07/05/2011 10:54 PM, Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
>   boot/grub/grub.500-build-fix.patch |   14 +++++
>   boot/grub/grub.mk                  |  102 ++++++++++++++----------------------
>   2 files changed, 53 insertions(+), 63 deletions(-)
>   create mode 100644 boot/grub/grub.500-build-fix.patch

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

* [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS
  2011-08-20  9:22   ` Darius Augulis
@ 2011-08-26 12:02     ` Peter Korsgaard
  2011-08-29 17:22       ` Darius Augulis
  0 siblings, 1 reply; 59+ messages in thread
From: Peter Korsgaard @ 2011-08-26 12:02 UTC (permalink / raw)
  To: buildroot




>>>>> "Darius" == Darius Augulis <augulis.darius@gmail.com> writes:

 Darius> Hi Thomas,

 Darius> with these changes grub is not installed to staging dir.
 Darius> grub.mk has label:

 Darius> define GRUB_INSTALL_STAGING_CMDS
 Darius>         install -m 0755 -D $(@D)/grub/grub $(STAGING_DIR)/sbin/grub
 Darius> endef

 Darius> but when building it's installed only to target dir, but not to
 Darius> staging.

Ahh yes. What is the use case for installing grub into staging? Does it
make any sense to do so?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS
  2011-08-26 12:02     ` Peter Korsgaard
@ 2011-08-29 17:22       ` Darius Augulis
  0 siblings, 0 replies; 59+ messages in thread
From: Darius Augulis @ 2011-08-29 17:22 UTC (permalink / raw)
  To: buildroot



Hi,

it's not necessary with my grub patches "grub: build for host" and 
"grub: fix ext2 segfaults".
Please find these on mailing list and review if you can.
Grub binary is useful on host system when cross compiling for x86 to 
install bootloader into CF, for example.

BR,
Darius


On 08/26/2011 03:02 PM, Peter Korsgaard wrote:
>>>>>> "Darius" == Darius Augulis<augulis.darius@gmail.com>  writes:
>   Darius>  Hi Thomas,
>
>   Darius>  with these changes grub is not installed to staging dir.
>   Darius>  grub.mk has label:
>
>   Darius>  define GRUB_INSTALL_STAGING_CMDS
>   Darius>          install -m 0755 -D $(@D)/grub/grub $(STAGING_DIR)/sbin/grub
>   Darius>  endef
>
>   Darius>  but when building it's installed only to target dir, but not to
>   Darius>  staging.
>
> Ahh yes. What is the use case for installing grub into staging? Does it
> make any sense to do so?
>

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

* [Buildroot] [PATCH 17/28] uboot-mkimage: new package
  2011-07-04 21:33 [Buildroot] [pull request v2] " Thomas Petazzoni
@ 2011-07-04 21:33 ` Thomas Petazzoni
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Petazzoni @ 2011-07-04 21:33 UTC (permalink / raw)
  To: buildroot

The mkimage for the host is now built by a package, so that
boot/u-boot/u-boot.mk is no longer responsible for doing this. It
makes things a lot easier to handle, as linux/linux.mk now simply
depends on host-uboot-mkimage.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/linux.mk                                     |    2 +-
 .../uboot-mkimage-2011.03-drop-configh.patch       |    0
 package/uboot-mkimage/uboot-mkimage.mk             |   16 ++++++++++++++++
 3 files changed, 17 insertions(+), 1 deletions(-)
 rename boot/u-boot/u-boot-2011.03-drop-configh.patch => package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch (100%)
 create mode 100644 package/uboot-mkimage/uboot-mkimage.mk

diff --git a/linux/linux.mk b/linux/linux.mk
index d142ab2..a59a237 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -40,7 +40,7 @@ LINUX26_IMAGE_NAME=vmImage
 else
 LINUX26_IMAGE_NAME=uImage
 endif
-LINUX26_DEPENDENCIES+=$(MKIMAGE)
+LINUX26_DEPENDENCIES+=host-uboot-mkimage
 else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y)
 LINUX26_IMAGE_NAME=bzImage
 else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y)
diff --git a/boot/u-boot/u-boot-2011.03-drop-configh.patch b/package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch
similarity index 100%
rename from boot/u-boot/u-boot-2011.03-drop-configh.patch
rename to package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch
diff --git a/package/uboot-mkimage/uboot-mkimage.mk b/package/uboot-mkimage/uboot-mkimage.mk
new file mode 100644
index 0000000..055348c
--- /dev/null
+++ b/package/uboot-mkimage/uboot-mkimage.mk
@@ -0,0 +1,16 @@
+UBOOT_MKIMAGE_VERSION = 2011.03
+UBOOT_MKIMAGE_SOURCE  = u-boot-$(UBOOT_MKIMAGE_VERSION).tar.bz2
+UBOOT_MKIMAGE_SITE    = ftp://ftp.denx.de/pub/u-boot
+
+define HOST_UBOOT_MKIMAGE_BUILD_CMDS
+	$(MAKE) -C $(@D) 			\
+		CROSS_COMPILE="$(TARGET_CROSS)" \
+		ARCH=$(U_BOOT_ARCH) 		\
+		tools
+endef
+
+define HOST_UBOOT_MKIMAGE_INSTALL_CMDS
+	install -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin
+endef
+
+$(eval $(call GENTARGETS,package,uboot-mkimage,host))
-- 
1.7.4.1

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

end of thread, other threads:[~2011-08-29 17:22 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05 19:53 [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
2011-07-05 19:53 ` [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
2011-07-07 21:00   ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 02/28] Fix quoting in default extract command Thomas Petazzoni
2011-07-07 21:05   ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot Thomas Petazzoni
2011-07-07 19:08   ` Sven Neumann
2011-07-07 21:17   ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
2011-07-07 21:46   ` Peter Korsgaard
2011-07-08 17:08     ` Thomas Petazzoni
2011-07-08 18:11       ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/ Thomas Petazzoni
2011-07-07 21:47   ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages Thomas Petazzoni
2011-07-07 21:50   ` Peter Korsgaard
2011-07-07 21:55     ` Yann E. MORIN
2011-07-07 21:59       ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 07/28] barebox: re-indent variable definitions Thomas Petazzoni
2011-07-10  8:57   ` Peter Korsgaard
2011-07-10 10:25     ` Thomas Petazzoni
2011-07-10 12:00       ` Peter Korsgaard
2011-07-05 19:53 ` [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS Thomas Petazzoni
2011-07-10 13:03   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 09/28] at91bootstrap: indent properly variable definitions Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
2011-07-10 13:10   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 11/28] at91dataflashboot: indent properly variable definitions Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
2011-07-10 13:16   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 13/28] syslinux: " Thomas Petazzoni
2011-07-10 13:27   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS Thomas Petazzoni
2011-07-10 13:30   ` Peter Korsgaard
2011-08-20  9:22   ` Darius Augulis
2011-08-26 12:02     ` Peter Korsgaard
2011-08-29 17:22       ` Darius Augulis
2011-07-05 19:54 ` [Buildroot] [PATCH 15/28] grub2: remove package Thomas Petazzoni
2011-07-10 13:31   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS Thomas Petazzoni
2011-07-10 20:07   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 17/28] uboot-mkimage: new package Thomas Petazzoni
2011-07-10 20:10   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 18/28] linux: rename LINUX26 to LINUX Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 19/28] linux: indent and align some definitions Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 20/28] package: add support for post-download hooks Thomas Petazzoni
2011-07-10 20:25   ` Peter Korsgaard
2011-07-05 19:54 ` [Buildroot] [PATCH 21/28] linux: convert to the GENTARGETS infrastructure Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
2011-07-10 20:27   ` Peter Korsgaard
2011-07-10 21:27     ` Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 23/28] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 24/28] Improve TARGETS handling for bootloaders and kernel Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 25/28] linux: allow specification of a custom Git repository as a source Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 26/28] u-boot: allow specification of custom Git repo as source Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 27/28] Add x-loader bootloader Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 28/28] barebox: bump version Thomas Petazzoni
2011-07-07 10:25 ` [Buildroot] [pull request v3] Pull request for branch for-2011.08/bootloaders Luca Ceresoli
  -- strict thread matches above, loose matches on Subject: below --
2011-07-04 21:33 [Buildroot] [pull request v2] " Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 17/28] uboot-mkimage: new package 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.