Skip to contentSkip to conversation

imx: nitrogen6x: Make use of both uSD and SD slots to load script or kernel on Sabrelite board

PATCH New Guillaume GARDET 3 participants 4 messages Sep 11, 2014 – Sep 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx: nitrogen6x: Make use of both uSD and SD slots to load script or kernel on Sabrelite board

Sabrelite board has two solts: 0 is SD3 (bottom) slot and 1 is uSD4 (top) slot. This patch makes use of both slots instead of only one.

Cc Stefano Babic <[email protected]>
Cc Eric Nelson <[email protected]>
---
 include/configs/nitrogen6x.h | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
include/configs/nitrogen6x.h +14 -11
index d4b0ac9..2a1eb3b 100644
@@ -186,7 +186,7 @@
 	"fdt_addr=0x18000000\0" \
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
-	"mmcdev=0\0" \
+	"mmcdevs=0 1\0" \
 	"mmcpart=1\0" \
 	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
@@ -238,16 +238,19 @@
 		"fi;\0"
 
 #define CONFIG_BOOTCOMMAND \
-	   "mmc dev ${mmcdev}; if mmc rescan; then " \
-		   "if run loadbootscript; then " \
-			   "run bootscript; " \
-		   "else " \
-			   "if run loaduimage; then " \
-				   "run mmcboot; " \
-			   "else run netboot; " \
-			   "fi; " \
-		   "fi; " \
-	   "else run netboot; fi"
+	"for mmcdev in ${mmcdevs}; do " \
+		"mmc dev ${mmcdev}; " \
+		"if mmc rescan; then " \
+			"if run loadbootscript; then " \
+				"run bootscript; " \
+			"else " \
+				"if run loaduimage; then " \
+					"run mmcboot; " \
+				"fi; " \
+			"fi; " \
+		"fi; " \
+	"done; " \
+	"run netboot; "
 #else
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"console=ttymxc1\0" \
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 1/1 imx: nitrogen6x: Make use of both uSD and SD slots to load script or kernel on Sabrelite board

Hi Guillaume,

Quoted 28 lines · Guillaume GARDET

Sabrelite board has two solts: 0 is SD3 (bottom) slot and 1 is uSD4 (top) slot. This patch makes use of both slots instead of only one.

Cc Stefano Babic <[email protected]>
Cc Eric Nelson <[email protected]>
---
 include/configs/nitrogen6x.h | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
include/configs/nitrogen6x.h +1 -1
index d4b0ac9..2a1eb3b 100644
@@ -186,7 +186,7 @@
 	"fdt_addr=0x18000000\0" \
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
-	"mmcdev=0\0" \
+	"mmcdevs=0 1\0" \
 	"mmcpart=1\0" \
 	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
@@ -238,16 +238,19 @@
 		"fi;\0"
 
 #define CONFIG_BOOTCOMMAND \

include/configs/nitrogen6x.h line 250

Quoted 10 lines
include/configs/nitrogen6x.h +0 -10
-	   "mmc dev ${mmcdev}; if mmc rescan; then " \
-		   "if run loadbootscript; then " \
-			   "run bootscript; " \
-		   "else " \
-			   "if run loaduimage; then " \
-				   "run mmcboot; " \
-			   "else run netboot; " \
-			   "fi; " \
-		   "fi; " \
-	   "else run netboot; fi"

If you add one more loop here, you'll end up with something very close to the Nitrogen6x configuration!

Quoted 7 lines
include/configs/nitrogen6x.h +6 -0
+	"for mmcdev in ${mmcdevs}; do " \
+		"mmc dev ${mmcdev}; " \
+		"if mmc rescan; then " \
+			"if run loadbootscript; then " \
+				"run bootscript; " \
+			"else " \

include/configs/nitrogen6x.h line 256

Quoted 10 lines
include/configs/nitrogen6x.h +7 -0
+				"if run loaduimage; then " \
+					"run mmcboot; " \
+				"fi; " \
+			"fi; " \
+		"fi; " \
+	"done; " \
+	"run netboot; "
 #else
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"console=ttymxc1\0" \
#2 lore raw

PATCH 1/1 imx: nitrogen6x: Make use of both uSD and SD slots to load script or kernel on Sabrelite board

In reply to Guillaume GARDET

Hi Guillaume,

Quoted 28 lines · Guillaume GARDET

Sabrelite board has two solts: 0 is SD3 (bottom) slot and 1 is uSD4 (top) slot. This patch makes use of both slots instead of only one.

Cc Stefano Babic <[email protected]>
Cc Eric Nelson <[email protected]>
---
 include/configs/nitrogen6x.h | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
include/configs/nitrogen6x.h +1 -1
index d4b0ac9..2a1eb3b 100644
@@ -186,7 +186,7 @@
 	"fdt_addr=0x18000000\0" \
 	"boot_fdt=try\0" \
 	"ip_dyn=yes\0" \
-	"mmcdev=0\0" \
+	"mmcdevs=0 1\0" \
 	"mmcpart=1\0" \
 	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
@@ -238,16 +238,19 @@
 		"fi;\0"
 
 #define CONFIG_BOOTCOMMAND \

include/configs/nitrogen6x.h line 250

Quoted 10 lines
include/configs/nitrogen6x.h +0 -10
-	   "mmc dev ${mmcdev}; if mmc rescan; then " \
-		   "if run loadbootscript; then " \
-			   "run bootscript; " \
-		   "else " \
-			   "if run loaduimage; then " \
-				   "run mmcboot; " \
-			   "else run netboot; " \
-			   "fi; " \
-		   "fi; " \
-	   "else run netboot; fi"

If you add one more loop here, you can get SATA support and end up with something very close to the Nitrogen6x configuration!

Quoted 7 lines
include/configs/nitrogen6x.h +6 -0
+	"for mmcdev in ${mmcdevs}; do " \
+		"mmc dev ${mmcdev}; " \
+		"if mmc rescan; then " \
+			"if run loadbootscript; then " \
+				"run bootscript; " \
+			"else " \

include/configs/nitrogen6x.h line 256

Quoted 10 lines
include/configs/nitrogen6x.h +7 -0
+				"if run loaduimage; then " \
+					"run mmcboot; " \
+				"fi; " \
+			"fi; " \
+		"fi; " \
+	"done; " \
+	"run netboot; "
 #else
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"console=ttymxc1\0" \
#3 lore raw

PATCH 1/1 imx: nitrogen6x: Make use of both uSD and SD slots to load script or kernel on Sabrelite board

In reply to Guillaume GARDET
Quoted 8 lines · Guillaume GARDET

Sabrelite board has two solts: 0 is SD3 (bottom) slot and 1 is uSD4 (top) slot. This patch makes use of both slots instead of only one.

Cc Stefano Babic <[email protected]>
Cc Eric Nelson <[email protected]>

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================