Skip to contentSkip to conversation

ARM: imx6: mx6sabre-common: Replace fatload with FS_GENERIC load

PATCH New Marek Vasut 3 participants 6 messages Feb 4, 2021 – Mar 1, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: imx6: mx6sabre-common: Replace fatload with FS_GENERIC load

Replace filesystem specific fatload command with a filesystem agnostic load command, so the board can boot from e.g. ext4 too.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
---
 include/configs/mx6sabre_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/mx6sabre_common.h +3 -3
index 93d00a4dc3c..735532955fd 100644
@@ -73,11 +73,11 @@
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"loadbootscript=" \
-		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source\0" \
-	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
+	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
+	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run finduuid; " \
 		"run mmcargs; " \
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/2 ARM: imx6: mx6sabre-common: Search for boot components in /boot too

Some root filesystem configurations do not have separate /boot partition, but rather place kernel, DT, scripts into /boot directory. Search the /boot directory for these boot components in case they are not found in /, which is the old behavior.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
---
 include/configs/mx6sabre_common.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
include/configs/mx6sabre_common.h +6 -3
index 735532955fd..ac579f3338a 100644
@@ -73,11 +73,14 @@
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"loadbootscript=" \
-		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script} || " \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${script};\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source\0" \
-	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
+	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} || " \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \
+	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile} || " \
+		"load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run finduuid; " \
 		"run mmcargs; " \
Signature · 1 line
2.29.2
#2 lore raw

PATCH 2/2 ARM: imx6: mx6sabre-common: Search for boot components in /boot too

Quoted 8 lines

Subject: [PATCH 2/2] ARM: imx6: mx6sabre-common: Search for boot components in /boot too

Some root filesystem configurations do not have separate /boot partition, but rather place kernel, DT, scripts into /boot directory. Search the /boot directory for these boot components in case they are not found in /, which is the old behavior.

Quoted 6 lines
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
Quoted 31 lines
---
 include/configs/mx6sabre_common.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
include/configs/mx6sabre_common.h +6 -3
index 735532955fd..ac579f3338a 100644
@@ -73,11 +73,14 @@
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"loadbootscript=" \
-		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script} || " \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${script};\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source\0" \
-	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0"
 \
-	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
+	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} ||
 " \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \
+	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile} || " \
+		"load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
include/configs/mx6sabre_common.h +0 -1
 		"run finduuid; " \
 		"run mmcargs; " \
--

2.29.2

#3 lore raw

PATCH 2/2 ARM: imx6: mx6sabre-common: Search for boot components in /boot too

In reply to Marek Vasut
Quoted 11 lines

Some root filesystem configurations do not have separate /boot partition, but rather place kernel, DT, scripts into /boot directory. Search the /boot directory for these boot components in case they are not found in /, which is the old behavior.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
=====================================================================
#4 lore raw

PATCH 1/2 ARM: imx6: mx6sabre-common: Replace fatload with FS_GENERIC load

In reply to Marek Vasut
Quoted 6 lines

Subject: [PATCH 1/2] ARM: imx6: mx6sabre-common: Replace fatload with FS_GENERIC load

Replace filesystem specific fatload command with a filesystem agnostic load command, so the board can boot from e.g. ext4 too.

Quoted 6 lines
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
Quoted 28 lines
---
 include/configs/mx6sabre_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/mx6sabre_common.h +3 -3
index 93d00a4dc3c..735532955fd 100644
@@ -73,11 +73,11 @@
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=PARTUUID=${uuid} rootwait rw\0" \
 	"loadbootscript=" \
-		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+		"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source\0" \
-	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}
 ${image}\0" \
-	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
+	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0"
 \
+	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
include/configs/mx6sabre_common.h +0 -1
 		"run finduuid; " \
 		"run mmcargs; " \
--

2.29.2

#5 lore raw

PATCH 1/2 ARM: imx6: mx6sabre-common: Replace fatload with FS_GENERIC load

In reply to Marek Vasut
Quoted 9 lines

Replace filesystem specific fatload command with a filesystem agnostic load command, so the board can boot from e.g. ext4 too.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
=====================================================================