All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS
Date: Mon,  4 Jul 2011 23:33:29 +0200	[thread overview]
Message-ID: <ba2d8db1b41fca447e6534f99b2e025b4ce27f97.1309815048.git.thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <cover.1309815048.git.thomas.petazzoni@free-electrons.com>

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 |   44 ++++++++------------------
 2 files changed, 15 insertions(+), 53 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 f6e9b67..d27e9f3 100644
--- a/boot/at91dataflashboot/at91dataflashboot.mk
+++ b/boot/at91dataflashboot/at91dataflashboot.mk
@@ -3,44 +3,28 @@
 # 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
+AT91DATAFLASHBOOT_VERSION = 1.05
+AT91DATAFLASHBOOT_SOURCE  = DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).tar.bz2
+AT91DATAFLASHBOOT_SITE    = ftp://www.at91.com/pub/buildroot/
 
-$(DL_DIR)/$(DATAFLASHBOOT_SOURCE):
-	 $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE))
+AT91DATAFLASHBOOT_INSTALL_TARGET = NO
+AT91DATAFLASHBOOT_INSTALL_IMAGES = YES
 
-$(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 $@
+define AT91DATAFLASHBOOT_BUILD_CMDS
+	make -C $(@D) CROSS_COMPILE=$(TARGET_CROSS)
+endef
 
-$(DATAFLASHBOOT_DIR)/.patched: $(DATAFLASHBOOT_DIR)/.unpacked
-	toolchain/patch-kernel.sh $(@D) boot/at91dataflashboot \
-		at91dataflashboot-$(DATAFLASHBOOT_VERSION)-\*.patch
-	touch $@
+define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS
+	cp $(@D)/DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).bin $(BINARIES_DIR)
+endef
 
-$(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY): $(DATAFLASHBOOT_DIR)/.patched
-	ls $(DATAFLASHBOOT_DIR)/.unpacked
-	make -C $(DATAFLASHBOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS)
-
-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

  parent reply	other threads:[~2011-07-04 21:33 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 21:33 [Buildroot] [pull request v2] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 01/28] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
2011-07-04 21:45   ` Yann E. MORIN
2011-07-04 22:07     ` Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 02/28] Fix quoting in default extract command Thomas Petazzoni
2011-07-04 21:54   ` Yann E. MORIN
2011-07-04 21:33 ` [Buildroot] [PATCH 03/28] linux: make it possible to install the kernel in /boot Thomas Petazzoni
2011-07-04 21:48   ` Yann E. MORIN
2011-07-05 19:23     ` Thomas Petazzoni
2011-07-07 10:04     ` Luca Ceresoli
2011-07-07 21:14       ` Peter Korsgaard
2011-07-04 21:33 ` [Buildroot] [PATCH 04/28] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
2011-07-04 21:52   ` Yann E. MORIN
2011-07-04 21:33 ` [Buildroot] [PATCH 05/28] package: add infrastructure to install things in images/ Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 06/28] package: fix patching procedure for host packages Thomas Petazzoni
2011-07-04 22:01   ` Yann E. MORIN
2011-07-05  7:28     ` Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 07/28] barebox: use = instead of := and re-indent Thomas Petazzoni
2011-07-04 22:08   ` Yann E. MORIN
2011-07-05  7:31     ` Thomas Petazzoni
2011-07-05 21:04       ` Peter Korsgaard
2011-07-04 21:33 ` [Buildroot] [PATCH 08/28] barebox: convert to GENTARGETS Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 09/28] at91bootstrap: use = instead of := and indent properly Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 10/28] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 11/28] at91dataflashboot: use = instead of := and indent Thomas Petazzoni
2011-07-04 21:33 ` Thomas Petazzoni [this message]
2011-07-04 21:33 ` [Buildroot] [PATCH 13/28] syslinux: convert to GENTARGETS Thomas Petazzoni
2011-07-04 22:12   ` Yann E. MORIN
2011-07-05 19:46     ` Thomas Petazzoni
2011-07-05 21:28       ` Yann E. MORIN
2011-07-04 21:33 ` [Buildroot] [PATCH 14/28] grub: convert to AUTOTARGETS Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 15/28] grub2: remove package Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 16/28] u-boot: convert to GENTARGETS Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 17/28] uboot-mkimage: new package Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 18/28] linux: rename LINUX26 to LINUX Thomas Petazzoni
2011-07-05 14:24   ` Dechesne, Nicolas
2011-07-05 19:11     ` Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 19/28] linux: indent and align some definitions Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 20/28] package: add support for post-download hooks Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 21/28] linux: convert to the GENTARGETS infrastructure Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 22/28] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 23/28] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 24/28] Improve TARGETS handling for bootloaders and kernel Thomas Petazzoni
2011-07-04 22:27   ` Yann E. MORIN
2011-07-05 19:47     ` Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 25/28] linux: allow specification of a custom Git repository as a source Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 26/28] u-boot: allow specification of custom Git repo as source Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 27/28] Add x-loader bootloader Thomas Petazzoni
2011-07-04 21:33 ` [Buildroot] [PATCH 28/28] barebox: bump version Thomas Petazzoni
2011-07-04 21:44 ` [Buildroot] [pull request v2] Pull request for branch for-2011.08/bootloaders Yann E. MORIN
2011-07-04 22:01   ` Thomas Petazzoni
2011-07-05 19:53 [Buildroot] [pull request v3] " Thomas Petazzoni
2011-07-05 19:54 ` [Buildroot] [PATCH 12/28] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
2011-07-10 13:16   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba2d8db1b41fca447e6534f99b2e025b4ce27f97.1309815048.git.thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.