diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2010-03-14 18:20:45 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2010-06-10 21:05:12 +0200 |
commit | 649b5b92509dba021ed47ef4c04f358de83ba36f (patch) | |
tree | e0f22590fe9a99eba5565bbb4738b6f833b2c9fb /boot/at91dataflashboot/at91dataflashboot.mk | |
parent | 7c709f4affc44f3bbc9a09fec8d84ae3807e31e7 (diff) |
bootloaders: move bootloader build code to boot/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'boot/at91dataflashboot/at91dataflashboot.mk')
-rw-r--r-- | boot/at91dataflashboot/at91dataflashboot.mk | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk new file mode 100644 index 000000000..8939c2897 --- /dev/null +++ b/boot/at91dataflashboot/at91dataflashboot.mk @@ -0,0 +1,44 @@ +############################################################# +# +# DataFlashBoot +# +############################################################# +DATAFLASHBOOT_VERSION:=1.05 +DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION) +ATMEL_MIRROR:=$(call qstrip,$(BR2_ATMEL_MIRROR)) +DATAFLASHBOOT_SITE:=$(ATMEL_MIRROR) +DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2 +DATAFLASHBOOT_DIR:=$(BUILD_DIR)/$(DATAFLASHBOOT_NAME) +DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin + +$(DL_DIR)/$(DATAFLASHBOOT_SOURCE): + $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE)) + +$(DATAFLASHBOOT_DIR)/.unpacked: $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) + mkdir -p $(BUILD_DIR) + ls $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) + $(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar -C $(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) + $(call COPY_FILE, $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY), $(TARGET_ATMEL_COPYTO), $(BOARD_NAME)-$(DATAFLASHBOOT_BINARY)) + + +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(BR2_TARGET_DATAFLASHBOOT),y) +TARGETS+=dataflash +endif |