summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common/Makefile
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2015-05-17 21:53:16 +0200
committerStefan Agner <stefan.agner@toradex.com>2015-05-28 16:58:36 +0200
commit4582732103393887b0e63a9fe572940909c23f8d (patch)
treeeba08214a6016814bf94ac8919f4784d96eba7aa /arch/arm/imx-common/Makefile
parentd1d416f272e840e8139aec911f89a70fe5523eb2 (diff)
imx-common: include mini-loader vf610m4bootldr
Include vf610m4bootldr, a mini boot loader for the Cortex-M4 CPU inside Freescale Vybrid SoC. The mini loader enables caches and copies the pointer to the device tree from the platform specific argument register (PERSISTENT_ARG1) to the Cortex-M4 r2 register, where the Linux kernel expects the pointer. The mini loader hence essentially takes over the parts of the m4boot command which can not be done from the Cortex-A5 main CPU.
Diffstat (limited to 'arch/arm/imx-common/Makefile')
-rw-r--r--arch/arm/imx-common/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index 175a36339d0..64959fb4aed 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -24,6 +24,26 @@ obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o
endif
ifeq ($(SOC),$(filter $(SOC),vf610))
obj-y += ddrmc-vf610.o
+
+# The mini boot loader for Linux on the Cortex-M4 runs on ARMv7-M
+# architecture, hence force ARMv7-M architecture. Use objcopy with
+# binary-architecture (-B) to include the mini loader as binary blob
+quiet_cmd_ccm4_s_S = M4CC $@
+cmd_ccm4_s_S = $(CC) -Wall -march=armv7-m -mthumb -c -o $@ $<
+arch/arm/imx-common/vf610m4bootldr.o: arch/arm/imx-common/vf610m4bootldr.S
+ $(call if_changed,ccm4_s_S)
+
+quiet_cmd_objcopym4 = OBJCOPY $@
+cmd_objcopym4 = $(OBJCOPY) -O binary $< $@
+arch/arm/imx-common/vf610m4bootldr: arch/arm/imx-common/vf610m4bootldr.o
+ $(call if_changed,objcopym4)
+
+quiet_cmd_objcopybinm4 = OBJCOPY $@
+cmd_objcopybinm4 = $(OBJCOPY) -I binary -O elf32-littlearm -B arm $< $@
+arch/arm/imx-common/vf610m4bootldrbin.o: arch/arm/imx-common/vf610m4bootldr
+ $(call if_changed,objcopybinm4)
+
+obj-$(CONFIG_CMD_M4BOOT) += vf610m4bootldrbin.o
endif
obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o
obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o