summaryrefslogtreecommitdiffstats
path: root/target/device/Atmel/at91bootstrap/at91bootstrap.mk
diff options
context:
space:
mode:
Diffstat (limited to 'target/device/Atmel/at91bootstrap/at91bootstrap.mk')
-rw-r--r--target/device/Atmel/at91bootstrap/at91bootstrap.mk29
1 files changed, 20 insertions, 9 deletions
diff --git a/target/device/Atmel/at91bootstrap/at91bootstrap.mk b/target/device/Atmel/at91bootstrap/at91bootstrap.mk
index facee12f3..babdc7df6 100644
--- a/target/device/Atmel/at91bootstrap/at91bootstrap.mk
+++ b/target/device/Atmel/at91bootstrap/at91bootstrap.mk
@@ -3,9 +3,10 @@
# at91bootstrap
#
#############################################################
-AT91BOOTSTRAP_VERSION:=2.3
-AT91BOOTSTRAP_PATCH_LEVEL:=4
-AT91BOOTSTRAP_PATCHED_VERSION:=$(AT91BOOTSTRAP_VERSION).$(AT91BOOTSTRAP_PATCH_LEVEL)
+AT91BOOTSTRAP_VERSION:=2.9
+AT91BOOTSTRAP_PATCH_LEVEL:=
+
+AT91BOOTSTRAP_PATCHED_VERSION:=$(AT91BOOTSTRAP_VERSION)$(AT91BOOTSTRAP_PATCH_LEVEL)
AT91BOOTSTRAP_NAME:=at91bootstrap-$(AT91BOOTSTRAP_VERSION)
ATMEL_MIRROR:=$(strip $(subst ",, $(BR2_ATMEL_MIRROR)))
#"))
@@ -16,6 +17,9 @@ AT91BOOTSTRAP:=$(strip $(subst ",, $(BR2_AT91BOOTSTRAP)))
#"))
AT91BOOTSTRAP_ZCAT:=$(BZCAT)
+AT91BOOTSTRAP_BOARD:=$(strip $(subst ",, $(BR2_TARGET_AT91BOOTSTRAP_BOARD)))
+#"))
+
AT91BOOTSTRAP_MEMORY:=$(strip $(subst ",, $(BR2_TARGET_AT91BOOTSTRAP_MEMORY)))
#"))
@@ -42,7 +46,7 @@ $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE):
$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
mkdir -p $(PROJECT_BUILD_DIR)
$(AT91BOOTSTRAP_ZCAT) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) target/device/Atmel/at91bootstrap/ at91bootstrap\*.patch
+ toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) target/device/Atmel/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
touch $(AT91BOOTSTRAP_DIR)/.unpacked
$(AT91BOOTSTRAP_DIR)/.configured: $(AT91BOOTSTRAP_DIR)/.unpacked .config
@@ -50,7 +54,7 @@ $(AT91BOOTSTRAP_DIR)/.configured: $(AT91BOOTSTRAP_DIR)/.unpacked .config
MEMORY=$(AT91BOOTSTRAP_MEMORY) \
CROSS_COMPILE=$(TARGET_CROSS) \
-C $(AT91BOOTSTRAP_DIR) \
- $(BOARD_NAME)_defconfig
+ $(AT91BOOTSTRAP_BOARD)_defconfig
touch $(AT91BOOTSTRAP_DIR)/.configured
$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.configured
@@ -60,14 +64,21 @@ $(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.configured
AT91_CUSTOM_FLAGS="$(AT91_CUSTOM_FLAGS)" \
-C $(AT91BOOTSTRAP_DIR)
-$(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY): $(AT91BOOTSTRAP_TARGET)
+$(AT91BOOTSTRAP_DIR)/.installed: $(AT91BOOTSTRAP_TARGET)
mkdir -p $(BINARIES_DIR)
- cp $(AT91BOOTSTRAP_TARGET) $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY)
- cp $(AT91BOOTSTRAP_TARGET) $(BR2_TARGET_ATMEL_COPYTO)/$(AT91BOOTSTRAP_BINARY)
+ make MEMORY=$(AT91BOOTSTRAP_MEMORY) \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ -C $(AT91BOOTSTRAP_DIR) boot
+ make DESTDIR=$(BINARIES_DIR) -C $(AT91BOOTSTRAP_DIR) install
+ make DESTDIR=$(BR2_TARGET_ATMEL_COPYTO) -C $(AT91BOOTSTRAP_DIR) install
+ touch $@
+
+# cp $(AT91BOOTSTRAP_TARGET) $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY)
+# cp $(AT91BOOTSTRAP_TARGET) $(BR2_TARGET_ATMEL_COPYTO)/$(AT91BOOTSTRAP_BINARY)
.PHONY: at91bootstrap at91bootstrap-source
-at91bootstrap: $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY)
+at91bootstrap: $(AT91BOOTSTRAP_DIR)/.installed
at91bootstrap-source: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)