summaryrefslogtreecommitdiffstats
path: root/images/Makefile.imx
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-14 10:22:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-16 09:46:02 +0200
commit3448353a9d4ff99b6cde42ab2b77a32692b6c3c4 (patch)
tree459e893a775b8fe5eb395cc1b43b8b84e29d7d11 /images/Makefile.imx
parent5c7cd570a8921bf86fb0964f864e01feb57fff51 (diff)
downloadbarebox-3448353a9d4ff99b6cde42ab2b77a32692b6c3c4.tar.gz
barebox-3448353a9d4ff99b6cde42ab2b77a32692b6c3c4.tar.xz
images: i.MX: Create target for SRAM images
Some boards like to do their SDRAM setup in code rather than in hardcoded DCD tables. For these boards the bootloader has to be loaded to the internal SRAM which is often too small for a full featured barebox. This new SRAM image type target allows to overcome this limitation. The image created with the new imx-sram-img rule is a regular imx-image with the difference that the load size only spans the pblx image and not the whole image including the payload. The pbl image easily fits into SRAM. The strategy is that this initial code initializes the SDRAM, loads the whole image to SDRAM and jumps to it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images/Makefile.imx')
-rw-r--r--images/Makefile.imx11
1 files changed, 11 insertions, 0 deletions
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 6b44958157..cdbae8cdc8 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -14,6 +14,17 @@ $(obj)/%.imximg: $(obj)/% FORCE
$(call if_changed,imx_image)
endif
+quiet_cmd_imx_sram_img ?= IMX-SRAM-IMG $@
+ cmd_imx_sram_img ?= cat $(obj)/$(patsubst %.imx-sram-img,%.pblb,$(2)) > $@; \
+ $(call size_append, $(obj)/barebox.z) >> $@; \
+ $(CPP) $(imxcfg_cpp_flags) -o $(imximg-tmp) $(CFG_$(@F)) ; \
+ $(objtree)/scripts/imx/imx-image -o $@ -b -c $(imximg-tmp) -f $@; \
+ cat $(obj)/barebox.z >> $@; \
+ $(objtree)/scripts/fix_size -f $@
+
+$(obj)/%.imx-sram-img: $(obj)/%.pblb $(obj)/barebox.z FORCE
+ $(call if_changed,imx_sram_img,$(@F))
+
# ----------------------- i.MX25 based boards ---------------------------
pblx-$(CONFIG_MACH_TX25) += start_imx25_karo_tx25
FILE_barebox-karo-tx25.img = start_imx25_karo_tx25.pblx