[PATCH v3 19/20] apalis-imx8: add M4 boot environment helpers
Francesco Dolcini
francesco at dolcini.it
Mon Jan 16 20:05:14 CET 2023
From: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>
Add M4 boot environment functions for reference.
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
Reviewed-by: Fabio Estevam <festevam at denx.de>
---
v3: added Reviewed-by: Fabio
v2: new patch
---
include/configs/apalis-imx8.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 83050980eae6..0dac31e10012 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -22,6 +22,15 @@
"ramdisk_addr_r=0x9d500000\0" \
"scriptaddr=0x9d480000\0"
+/* Boot M4 */
+#define M4_BOOT_ENV \
+ "m4_0_image=m4_0.bin\0" \
+ "m4_1_image=m4_1.bin\0" \
+ "loadm4image_0=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \
+ "loadm4image_1=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_1_image}\0" \
+ "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
+ "m4boot_1=run loadm4image_1; dcache flush; bootaux ${loadaddr} 1\0" \
+
/* Enable Distro Boot */
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
@@ -33,6 +42,7 @@
/* Initial environment variables */
#define CONFIG_EXTRA_ENV_SETTINGS \
BOOTENV \
+ M4_BOOT_ENV \
MEM_LAYOUT_ENV_SETTINGS \
"boot_script_dhcp=boot.scr\0" \
"console=ttyLP1\0" \
--
2.25.1
More information about the U-Boot
mailing list