diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2011-07-05 21:54:00 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2011-07-10 15:06:47 +0200 |
commit | df9624b73feeb5e0dda0ed4772efcce1679add5b (patch) | |
tree | 2bd7d3de9f0d9490c64f85076e6688e01ee20128 /boot | |
parent | 1ff88054a84f1fd6a28465aad4e6bed241e431d9 (diff) |
at91bootstrap: convert to GENTARGETS
[Peter: add ':=' -> '=' change]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'boot')
-rw-r--r-- | boot/at91bootstrap/at91bootstrap.mk | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk index 3d4308edf..37f8ac70c 100644 --- a/boot/at91bootstrap/at91bootstrap.mk +++ b/boot/at91bootstrap/at91bootstrap.mk @@ -3,50 +3,33 @@ # 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_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_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)) ############################################################# # |