[U-Boot] [PATCH 01/19] imx: ventana: set dtype env var to boot media

Tim Harvey tharvey at gateworks.com
Sat May 9 03:28:24 CEST 2015


Bootscripts for some distro's such as Android can benefit from knowing
what boot media its script was loaded from.

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 include/configs/gw_ventana.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 684f347..48919e8 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -359,7 +359,7 @@
 	"mmc_boot=" \
 		"setenv fsload 'ext2load mmc 0:1'; " \
 		"mmc dev 0 && mmc rescan && " \
-		"run loadscript; " \
+		"setenv dtype mmc; run loadscript; " \
 		"if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \
 			"setenv bootargs console=${console},${baudrate} " \
 				"root=/dev/mmcblk0p1 rootfstype=ext4 " \
@@ -373,7 +373,7 @@
 	\
 	"sata_boot=" \
 		"setenv fsload 'ext2load sata 0:1'; sata init && " \
-		"run loadscript; " \
+		"setenv dtype sata; run loadscript; " \
 		"if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \
 			"setenv bootargs console=${console},${baudrate} " \
 				"root=/dev/sda1 rootfstype=ext4 " \
@@ -386,7 +386,7 @@
 		"fi\0" \
 	"usb_boot=" \
 		"setenv fsload 'ext2load usb 0:1'; usb start && usb dev 0 && " \
-		"run loadscript; " \
+		"setenv dtype usb; run loadscript; " \
 		"if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \
 			"setenv bootargs console=${console},${baudrate} " \
 				"root=/dev/sda1 rootfstype=ext4 " \
@@ -450,7 +450,7 @@
 			"setenv root ubi0:rootfs ubi.mtd=2 " \
 				"rootfstype=ubifs; " \
 		"fi; " \
-		"run loadscript; " \
+		"setenv dtype nand; run loadscript; " \
 		"if ${fsload} ${loadaddr} ${bootdir}/${uimage}; then " \
 			"setenv bootargs console=${console},${baudrate} " \
 				"root=${root} ${video} ${extra}; " \
-- 
1.9.1



More information about the U-Boot mailing list