summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2012-08-16 17:54:52 +0200
committerStefan Roese <sr@denx.de>2012-12-05 17:31:26 +0100
commitb40bda6bd8b311d828a11dfa12df324cd51c3a55 (patch)
treea5dfdf27bfbbb56099ef39ad9b4956bdada04fed
parent13b4f639495db2d351be3882eebc4fefdf42d5b4 (diff)
Makefile: Add possibility to set entry-point for u-boot.img
This patch enabled boards using the SPL framework to set an entry point in the U-Boot mkimage image "u-boot.img". Until now the entry point in the header has been set to 0. By setting CONFIG_SYS_UBOOT_START in the board header, boards can override this default location. This will be used by the upcoming a3m071 MPC5200 board port. Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 19ac8f5b8a..bf9a9378da 100644
--- a/Makefile
+++ b/Makefile
@@ -450,9 +450,18 @@ $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr
$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr
$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary
+#
+# U-Boot entry point, needed for booting of full-blown U-Boot
+# from the SPL U-Boot version.
+#
+ifndef CONFIG_SYS_UBOOT_START
+CONFIG_SYS_UBOOT_START := 0
+endif
+
$(obj)u-boot.img: $(obj)u-boot.bin
$(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
- -O u-boot -a $(CONFIG_SYS_TEXT_BASE) -e 0 \
+ -O u-boot -a $(CONFIG_SYS_TEXT_BASE) \
+ -e $(CONFIG_SYS_UBOOT_START) \
-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
-d $< $@