summaryrefslogtreecommitdiffstats
path: root/images/Makefile.mxs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-12-05 09:29:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-05 11:31:07 +0100
commitba4ace811029e8a6406330667961443a0326a0bb (patch)
tree903977691c9934867d6cf810bcad4ea02942f628 /images/Makefile.mxs
parent30aad4a4ce952abd745cd409956d4976079d5482 (diff)
downloadbarebox-ba4ace811029e8a6406330667961443a0326a0bb.tar.gz
barebox-ba4ace811029e8a6406330667961443a0326a0bb.tar.xz
ARM: MXS: Add multiimage support
The Freescale MXS SoCs have a multi staged boot process which needs different images composed out of different binaries. The ROM executes a so called bootstream which contains multiple executables. The first one is executed in SRAM and the purpose of this binary is to setup the internal PMIC and the SDRAM. The second image is usually the bootloader itself. In case of barebox the bootstream is composed out of the self extracting barebox image (pblx) and the prepare stage for setting up the SDRAM. The bootstream image itself is useful for USB boot, but for booting from SD cards or NAND a BCB header has to be prepended to the image. In case of SD boot the image has the .mxssd file extension in barebox. Since the bootstream images are encrypted they are not suitable for 2nd stage execution. For this purpose the 2nd stage images are generated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images/Makefile.mxs')
-rw-r--r--images/Makefile.mxs23
1 files changed, 23 insertions, 0 deletions
diff --git a/images/Makefile.mxs b/images/Makefile.mxs
new file mode 100644
index 0000000000..11229a6456
--- /dev/null
+++ b/images/Makefile.mxs
@@ -0,0 +1,23 @@
+#
+# barebox image generation Makefile for MXS images
+#
+
+# %.mxsbs - convert into MXS BootStream image
+# ----------------------------------------------------------------
+quiet_cmd_mxs_bootstream = MXS-BOOTSTREAM $@
+ cmd_mxs_bootstream = $(objtree)/scripts/mxsimage -c $(CFG_$(@F)) -b $< -o $@ -p $(word 2,$^)
+
+$(obj)/%.mxsbs: $(obj)/%.pblx $(obj)/prep_%.pblb FORCE
+ $(call if_changed,mxs_bootstream)
+
+# %.mxssd - convert into MXS SD card image
+# ----------------------------------------------------------------
+quiet_cmd_mxs_sd = MXS-SD $@
+ cmd_mxs_sd = $(objtree)/scripts/mxsboot sd $< $@
+
+$(obj)/%.mxssd: $(obj)/%
+ $(call if_changed,mxs_sd)
+
+board = $(srctree)/arch/$(ARCH)/boards
+mxs23cfg = $(srctree)/arch/arm/mach-mxs/mxs23img.cfg
+mxs28cfg = $(srctree)/arch/arm/mach-mxs/mxs28img.cfg