summaryrefslogtreecommitdiff
path: root/target/device/Atmel/DataFlashBoot
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-17 12:19:56 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-17 12:19:56 +0000
commita1e6a84bb32d2c691103ee7548506c6bb68cb101 (patch)
tree5ca9341704f781305ce6350d26c00d5a879bbd06 /target/device/Atmel/DataFlashBoot
parent431e0223da18b1e2efc40d7bf96f1509087c1221 (diff)
Add AT91 targets
Diffstat (limited to 'target/device/Atmel/DataFlashBoot')
-rw-r--r--target/device/Atmel/DataFlashBoot/Config.in23
-rw-r--r--target/device/Atmel/DataFlashBoot/DataflashBoot.mk47
2 files changed, 70 insertions, 0 deletions
diff --git a/target/device/Atmel/DataFlashBoot/Config.in b/target/device/Atmel/DataFlashBoot/Config.in
new file mode 100644
index 000000000..1da5e6274
--- /dev/null
+++ b/target/device/Atmel/DataFlashBoot/Config.in
@@ -0,0 +1,23 @@
+config BR2_TARGET_DATAFLASHBOOT
+ depends on BR2_TARGET_AT91RM9200 || BR2_TARGET_AT91SAM9261 || BR2_TARGET_AT91SAM9261S
+ bool "Build Dataflashboot for selected chip"
+
+choice
+ prompt "Target Architecture"
+ default BR2_TARGET_DATAFLASHBOOT_AT91RM9200
+ depends on BR2_TARGET_DATAFLASHBOOT
+ help
+ Select Chip for which Dataflash boot should be built
+ Currently only AT91RM9200 Supported
+
+config BR2_TARGET_DATAFLASHBOOT_AT91RM9200
+ depends on BR2_TARGET_AT91RM9200
+ bool "AT91RM9200"
+config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261
+ depends on BR2_TARGET_AT91SAM9261
+ bool "AT91SAM9261"
+config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261S
+ depends on BR2_TARGET_AT91SAM9261S
+ bool "AT91SAM9261S"
+
+endchoice
diff --git a/target/device/Atmel/DataFlashBoot/DataflashBoot.mk b/target/device/Atmel/DataFlashBoot/DataflashBoot.mk
new file mode 100644
index 000000000..b0c5fff6e
--- /dev/null
+++ b/target/device/Atmel/DataFlashBoot/DataflashBoot.mk
@@ -0,0 +1,47 @@
+#############################################################
+#
+# DataFlashBoot
+#
+#############################################################
+DATAFLASHBOOT_VERSION:=1.05
+DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION)
+ATMEL_MIRROR:=$(strip $(subst ",, $(BR2_ATMEL_MIRROR)))
+DATAFLASHBOOT_SITE:=$(ATMEL_MIRROR)/Source
+DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2
+DATAFLASHBOOT_DIR:=$(PROJECT_BUILD_DIR)/$(DATAFLASHBOOT_NAME)
+DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin
+
+$(DL_DIR)/$(DATAFLASHBOOT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(DATAFLASHBOOT_SITE)/$(DATAFLASHBOOT_SOURCE)
+
+$(DATAFLASHBOOT_DIR)/.unpacked: $(DL_DIR)/$(DATAFLASHBOOT_SOURCE)
+ mkdir -p $(PROJECT_BUILD_DIR)
+ ls $(DL_DIR)/$(DATAFLASHBOOT_SOURCE)
+ $(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(DATAFLASHBOOT_DIR)/.unpacked
+
+$(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY): $(DATAFLASHBOOT_DIR)/.unpacked
+ 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)
+ mkdir -p $(BINARIES_DIR)
+ cp $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY) $(BINARIES_DIR)/$(BOARD_NAME)-$(DATAFLASHBOOT_BINARY)
+ifneq ($(TARGET_ATMEL_COPYTO),)
+ cp $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY) /tftpboot/$(BOARD_NAME)-$(DATAFLASHBOOT_BINARY)
+endif
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_TARGET_DATAFLASHBOOT)),y)
+TARGETS+=dataflash
+endif