summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2012-01-05 11:19:50 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-07-07 14:07:43 +0200
commit94aebe6cc3111c7c9e3cd1311cc9793d01cc3ded (patch)
tree379437fc3de1086ea11f61414c448dc48e2b7e55 /Makefile
parentd014e033889f10d40d009cc7bad00893293b640e (diff)
downloadu-boot-imx-94aebe6cc3111c7c9e3cd1311cc9793d01cc3ded.zip
u-boot-imx-94aebe6cc3111c7c9e3cd1311cc9793d01cc3ded.tar.gz
u-boot-imx-94aebe6cc3111c7c9e3cd1311cc9793d01cc3ded.tar.bz2
Makefile: Add u-boot.spr build target (SPEAr)
On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. Both images are created using mkimage (crc etc), so that the ROM bootloader can check its integrity. Padding needs to be done to the SPL image (with mkimage header) and not the binary. Otherwise the resulting image which is loaded/copied by the ROM bootloader to SRAM doesn't fit. The resulting image containing both U-Boot images is called u-boot.spr. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Amit Virdi <amit.virdi@st.com> Cc: Vipin Kumar <vipin.kumar@st.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0197239..85e36ec 100644
--- a/Makefile
+++ b/Makefile
@@ -456,6 +456,22 @@ $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-o $(obj)u-boot.sb
+# On x600 (SPEAr600) U-Boot is appended to U-Boot SPL.
+# Both images are created using mkimage (crc etc), so that the ROM
+# bootloader can check its integrity. Padding needs to be done to the
+# SPL image (with mkimage header) and not the binary. Otherwise the resulting image
+# which is loaded/copied by the ROM bootloader to SRAM doesn't fit.
+# The resulting image containing both U-Boot images is called u-boot.spr
+$(obj)u-boot.spr: $(obj)u-boot.img $(obj)spl/u-boot-spl.bin
+ $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
+ -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER \
+ -d $(obj)spl/u-boot-spl.bin $(obj)spl/u-boot-spl.img
+ tr "\000" "\377" < /dev/zero | dd ibs=1 count=$(CONFIG_SPL_PAD_TO) \
+ of=$(obj)spl/u-boot-spl-pad.img 2>/dev/null
+ dd if=$(obj)spl/u-boot-spl.img of=$(obj)spl/u-boot-spl-pad.img \
+ conv=notrunc 2>/dev/null
+ cat $(obj)spl/u-boot-spl-pad.img $(obj)u-boot.img > $@
+
ifeq ($(CONFIG_SANDBOX),y)
GEN_UBOOT = \
cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
@@ -775,6 +791,7 @@ clobber: tidy
@rm -f $(obj)u-boot.ais
@rm -f $(obj)u-boot.dtb
@rm -f $(obj)u-boot.sb
+ @rm -f $(obj)u-boot.spr
@rm -f $(obj)tools/inca-swap-bytes
@rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
@rm -f $(obj)arch/powerpc/cpu/mpc83xx/ddr-gen?.c