You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/package/boot/uboot-mvebu/patches/003-boot_script.patch

37 lines
1.2 KiB
Diff

diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 41e94e6daf..f23e65e345 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
CONFIG_BOOTDELAY=3
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_HUSH_PARSER=y
CONFIG_SPL=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x141
CONFIG_SPL_I2C_SUPPORT=y
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 0c51d2a288..e52ba8145f 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -82,7 +82,18 @@
/* Keep device tree and initrd in lower memory so the kernel can access them */
#define CONFIG_EXTRA_ENV_SETTINGS \
"fdt_high=0x10000000\0" \
- "initrd_high=0x10000000\0"
+ "initrd_high=0x10000000\0" \
+ "script=boot.scr\0" \
+ "loadaddr=0x01000000\0" \
+ "mmcdev=0\0" \
+ "mmcpart=1\0" \
+ "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+ "bootscript=echo Running bootscript from mmc ...; source ${loadaddr}\0"
+
+#define CONFIG_BOOTCOMMAND \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "fi"
/* SPL */
/*