summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/Makefile')
-rw-r--r--arch/blackfin/Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 8f3bc7173f..f68da3231d 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -13,6 +13,10 @@ CFLAGS := -fno-common -Os -D__blackfin__
# -Ttext $(TEXT_BASE)
KALLSYMS += --symbol-prefix=_
+ifndef CONFIG_BFIN_BOOT_BYPASS
+all: uboot.ldr
+endif
+
ifeq ($(incdir-y),)
incdir-y := $(machine-y)
endif
@@ -55,4 +59,18 @@ common-y += arch/blackfin/lib/ $(CPU)
lds-y += $(BOARD)/u-boot.lds
-MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc
+MRPROPER_FILES += include/asm-blackfin/arch include/asm-blackfin/proc
+
+ifdef CONFIG_BFIN_BOOT_FLASH16
+FLASHBITS :=-B 16
+else
+FLASHBITS :=
+endif
+
+ifneq ($(cpu-y),)
+ifndef CONFIG_BFIN_BOOT_BYPASS
+uboot.ldr: uboot
+ rm -f $@
+ $(CROSS_COMPILE)ldr -T $(cpu-y) -c $(FLASHBITS) -i $(CPU)/init_sdram.o $@ $<
+endif
+endif