summaryrefslogtreecommitdiffstats
path: root/boot/at91bootstrap/at91bootstrap.mk
diff options
context:
space:
mode:
Diffstat (limited to 'boot/at91bootstrap/at91bootstrap.mk')
-rw-r--r--boot/at91bootstrap/at91bootstrap.mk70
1 files changed, 22 insertions, 48 deletions
diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
index d7723c44c..bfffe1154 100644
--- a/boot/at91bootstrap/at91bootstrap.mk
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -3,73 +3,47 @@
# at91bootstrap
#
#############################################################
-AT91BOOTSTRAP_VERSION:=2.13
-AT91BOOTSTRAP_NAME:=at91bootstrap-$(AT91BOOTSTRAP_VERSION)
-AT91BOOTSTRAP_SITE:=ftp://www.at91.com/pub/buildroot/
-AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).tar.bz2
-AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/$(AT91BOOTSTRAP_NAME)
-AT91BOOTSTRAP:=$(call qstrip,$(BR2_AT91BOOTSTRAP))
-AT91BOOTSTRAP_ZCAT:=$(BZCAT)
+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_BOARD)-$(AT91BOOTSTRAP_MEMORY)boot.bin
-AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_DIR)/binaries/$(AT91BOOTSTRAP_BINARY)
-AT91BOOTSTRAP_JUMP_ADDR:=$(call qstrip,$(BR2_AT91BOOTSTRAP_JUMP_ADDR))
-AT91BOOTSTRAP_IMG_SIZE:=$(call qstrip,$(BR2_AT91BOOTSTRAP_IMG_SIZE))
-
-AT91_CUSTOM_FLAGS:=
-ifneq ($(AT91BOOTSTRAP_JUMP_ADDR),)
-AT91_CUSTOM_FLAGS+=-DJUMP_ADDR=$(AT91BOOTSTRAP_JUMP_ADDR)
-endif
-ifneq ($(AT91BOOTSTRAP_IMG_SIZE),)
-AT91_CUSTOM_FLAGS+=-DIMG_SIZE=$(AT91BOOTSTRAP_IMG_SIZE)
-endif
+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))
$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
mkdir -p $(BUILD_DIR)
- $(AT91BOOTSTRAP_ZCAT) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
- touch $(AT91BOOTSTRAP_DIR)/.unpacked
-
-$(AT91BOOTSTRAP_DIR)/.configured: $(AT91BOOTSTRAP_DIR)/.unpacked
- $(MAKE) \
- MEMORY=$(AT91BOOTSTRAP_MEMORY) \
- CROSS_COMPILE=$(TARGET_CROSS) \
- -C $(AT91BOOTSTRAP_DIR) \
- $(AT91BOOTSTRAP_BOARD)_defconfig
- touch $(AT91BOOTSTRAP_DIR)/.configured
-
-$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.configured
- $(MAKE) \
- MEMORY=$(AT91BOOTSTRAP_MEMORY) \
- CROSS_COMPILE=$(TARGET_CROSS) \
- AT91_CUSTOM_FLAGS="$(AT91_CUSTOM_FLAGS)" \
- -C $(AT91BOOTSTRAP_DIR)
+ unzip -d $(BUILD_DIR) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
+ mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) $(AT91BOOTSTRAP_DIR)
+ touch $@
-$(AT91BOOTSTRAP_DIR)/.installed:: $(AT91BOOTSTRAP_TARGET)
- mkdir -p $(BINARIES_DIR)
- make MEMORY=$(AT91BOOTSTRAP_MEMORY) \
- CROSS_COMPILE=$(TARGET_CROSS) \
- DESTDIR=$(BINARIES_DIR) \
- -C $(AT91BOOTSTRAP_DIR) install
+$(AT91BOOTSTRAP_DIR)/.patched: $(AT91BOOTSTRAP_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
touch $@
-.PHONY: at91bootstrap at91bootstrap-source
+$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.patched
+ $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
+ -C $(AT91BOOTSTRAP_BUILD_DIR)
-at91bootstrap: $(AT91BOOTSTRAP_DIR)/.installed
+$(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
-.PHONY: at91bootstrap-clean at91bootstrap-dirclean
-
at91bootstrap-clean:
- make -C $(AT91BOOTSTRAP_DIR) clean
+ make -C $(AT91BOOTSTRAP_BUILD_DIR) clean
at91bootstrap-dirclean:
rm -rf $(AT91BOOTSTRAP_DIR)