From 94a91e248b71c3ff951fc27cff6909e82ca37d15 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Feb 2008 19:26:57 -0500 Subject: generate u-boot.ldr for Blackfin targets Signed-off-by: Mike Frysinger --- .gitignore | 4 ++++ Makefile | 12 ++++++++++++ blackfin_config.mk | 5 +++++ config.mk | 1 + 4 files changed, 22 insertions(+) diff --git a/.gitignore b/.gitignore index cda275ec73..e29dce9297 100644 --- a/.gitignore +++ b/.gitignore @@ -17,9 +17,13 @@ /System.map /u-boot +/u-boot.hex /u-boot.map /u-boot.bin /u-boot.srec +/u-boot.ldr +/u-boot.ldr.hex +/u-boot.ldr.srec # # Generated files diff --git a/Makefile b/Makefile index f6c2341703..b4a39945bf 100644 --- a/Makefile +++ b/Makefile @@ -274,6 +274,9 @@ __LIBS := $(subst $(obj),,$(LIBS)) ######################################################################### ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) +ifeq ($(ARCH),blackfin) +ALL += $(obj)u-boot.ldr +endif all: $(ALL) @@ -286,6 +289,15 @@ $(obj)u-boot.srec: $(obj)u-boot $(obj)u-boot.bin: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ +$(obj)u-boot.ldr: $(obj)u-boot + $(LDR) -T $(CONFIG_BFIN_CPU) -f -c $@ $< $(LDR_FLAGS) + +$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary + +$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary + $(obj)u-boot.img: $(obj)u-boot.bin ./tools/mkimage -A $(ARCH) -T firmware -C none \ -a $(TEXT_BASE) -e 0 \ diff --git a/blackfin_config.mk b/blackfin_config.mk index e91318e9b4..a7513ea4dc 100644 --- a/blackfin_config.mk +++ b/blackfin_config.mk @@ -25,3 +25,8 @@ PLATFORM_RELFLAGS += -ffixed-P5 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN SYM_PREFIX = _ + +LDR_FLAGS += --use-vmas +ifeq (,$(findstring s,$(MAKEFLAGS))) +LDR_FLAGS += --quiet +endif diff --git a/config.mk b/config.mk index 79e5a31b72..f4312ede6a 100644 --- a/config.mk +++ b/config.mk @@ -121,6 +121,7 @@ CC = $(CROSS_COMPILE)gcc CPP = $(CC) -E AR = $(CROSS_COMPILE)ar NM = $(CROSS_COMPILE)nm +LDR = $(CROSS_COMPILE)ldr STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump -- cgit v1.2.1