aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mvebu/patches/003-boot_script.patch
blob: 9bb679dad5e82cab2d4c728401ecc76542e91ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 */
 /*