Skip to contentSkip to conversation

ti: Use devtype=mmc instead of setenv devtype mmc

PATCH New Matwey V. Kornilov 2 participants 6 messages Aug 24, 2020 – Oct 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ti: Use devtype=mmc instead of setenv devtype mmc

If devtype variable is setted via setenv, then the following devtype=X style is ignored. Currently, many u-boot commands use devtype variable in the latter manner:

    mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi

Use devtype=mmc instead of setenv devtype mmc to avoid bugs with booting from another devtype.

---
 include/environment/ti/mmc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/environment/ti/mmc.h +1 -1
index 1c8e49a8b3..b86c8dc7a4 100644
@@ -57,7 +57,7 @@
 		"fi;\0" \
 	"mmcboot=mmc dev ${mmcdev}; " \
 		"devnum=${mmcdev}; " \
-		"setenv devtype mmc; " \
+		"devtype=mmc; " \
 		"if mmc rescan; then " \
 			"echo SD/MMC found on device ${mmcdev};" \
 			"if run loadimage; then " \
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 am335x_evm: Allow booting from usb-storage device

---
 include/configs/am335x_evm.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/configs/am335x_evm.h +7 -0
index 9c4ef369c5..103c046137 100644
@@ -66,6 +66,12 @@
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
 	#devtypel #instance " "
 
+#if CONFIG_IS_ENABLED(CMD_USB)
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
 #if CONFIG_IS_ENABLED(CMD_PXE)
 # define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
 #else
@@ -84,6 +90,7 @@
 	func(MMC, mmc, 1) \
 	func(LEGACY_MMC, legacy_mmc, 1) \
 	func(NAND, nand, 0) \
+	BOOT_TARGET_USB(func) \
 	BOOT_TARGET_PXE(func) \
 	BOOT_TARGET_DHCP(func)
 
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 am335x_evm: Allow booting from usb-storage device

Ping?

??, 24 ???. 2020 ?. ? 21:00, Matwey V. Kornilov <[email protected]>:

Quoted 34 lines
---
 include/configs/am335x_evm.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/configs/am335x_evm.h +7 -1
index 9c4ef369c5..103c046137 100644
@@ -66,6 +66,12 @@
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
        #devtypel #instance " "
 
+#if CONFIG_IS_ENABLED(CMD_USB)
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
 #if CONFIG_IS_ENABLED(CMD_PXE)
 # define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
 #else
@@ -84,6 +90,7 @@
        func(MMC, mmc, 1) \
        func(LEGACY_MMC, legacy_mmc, 1) \
        func(NAND, nand, 0) \
+       BOOT_TARGET_USB(func) \
        BOOT_TARGET_PXE(func) \
        BOOT_TARGET_DHCP(func)
 
--

2.26.2

Signature · 2 lines
With best regards,
Matwey V. Kornilov
#3 lore raw

PATCH 2/2 am335x_evm: Allow booting from usb-storage device

Quoted 17 lines · Matwey V. Kornilov

Ping?

??, 24 ???. 2020 ?. ? 21:00, Matwey V. Kornilov <[email protected]>:

Quoted 13 lines
---
 include/configs/am335x_evm.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/configs/am335x_evm.h +0 -0
index 9c4ef369c5..103c046137 100644
@@ -66,6 +66,12 @@
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
        #devtypel #instance " "
 
Quoted 16 lines
Quoted 10 lines
include/configs/am335x_evm.h +6 -0
+#if CONFIG_IS_ENABLED(CMD_USB)
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
 #if CONFIG_IS_ENABLED(CMD_PXE)
 # define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
 #else

include/configs/am335x_evm.h line 95

Quoted 6 lines
include/configs/am335x_evm.h +1 -0
@@ -84,6 +90,7 @@
        func(MMC, mmc, 1) \
        func(LEGACY_MMC, legacy_mmc, 1) \
        func(NAND, nand, 0) \
+       BOOT_TARGET_USB(func) \
        BOOT_TARGET_PXE(func) \
        BOOT_TARGET_DHCP(func)
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201009/464b6286/attachment.sig>
#4 lore raw

PATCH 2/2 am335x_evm: Allow booting from usb-storage device

Quoted 4 lines · Tom Rini
Quoted 1 line · Matwey V. Kornilov

Ping?

and I see this was applied back in September to the -next branch, so this is in master now.

Quoted 37 lines
Quoted 16 lines

??, 24 ???. 2020 ?. ? 21:00, Matwey V. Kornilov <[email protected]>:

Quoted 13 lines
---
 include/configs/am335x_evm.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/configs/am335x_evm.h +0 -0
index 9c4ef369c5..103c046137 100644
@@ -66,6 +66,12 @@
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
        #devtypel #instance " "
 
Quoted 16 lines
Quoted 10 lines
include/configs/am335x_evm.h +6 -0
+#if CONFIG_IS_ENABLED(CMD_USB)
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
 #if CONFIG_IS_ENABLED(CMD_PXE)
 # define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
 #else

include/configs/am335x_evm.h line 95

Quoted 6 lines
include/configs/am335x_evm.h +1 -0
@@ -84,6 +90,7 @@
        func(MMC, mmc, 1) \
        func(LEGACY_MMC, legacy_mmc, 1) \
        func(NAND, nand, 0) \
+       BOOT_TARGET_USB(func) \
        BOOT_TARGET_PXE(func) \
        BOOT_TARGET_DHCP(func)
Signature · 1 line
Tom
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201012/ff869370/attachment.sig>
#5 lore raw

PATCH 2/2 am335x_evm: Allow booting from usb-storage device

??, 12 ???. 2020 ?. ? 16:07, Tom Rini <[email protected]>:

Quoted 9 lines · Tom Rini
Quoted 4 lines · Matwey V. Kornilov
Quoted 3 lines

Ping?

and I see this was applied back in September to the -next branch, so this is in master now.

Thanks again. I have not seen any reaction here, so I didn't check the master.

Quoted 45 lines
Quoted 2 lines
Quoted 2 lines

??, 24 ???. 2020 ?. ? 21:00, Matwey V. Kornilov <

matwey.kornilov at gmail.com>:

Quoted 7 lines
Quoted 7 lines

Review

Quoted 7 lines
---
 include/configs/am335x_evm.h | 7 +++++++
 1 file changed, 7 insertions(+)
(quoted diff) +0 -0

b/include/configs/am335x_evm.h

Quoted 26 lines
Quoted 7 lines
Quoted 7 lines

index 9c4ef369c5..103c046137 100644

include/configs/am335x_evm.h +0 -0
@@ -66,6 +66,12 @@
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
        #devtypel #instance " "
 
Quoted 16 lines
Quoted 10 lines
include/configs/am335x_evm.h +6 -0
+#if CONFIG_IS_ENABLED(CMD_USB)
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
 #if CONFIG_IS_ENABLED(CMD_PXE)
 # define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
 #else

include/configs/am335x_evm.h line 95

Quoted 6 lines
include/configs/am335x_evm.h +1 -0
@@ -84,6 +90,7 @@
        func(MMC, mmc, 1) \
        func(LEGACY_MMC, legacy_mmc, 1) \
        func(NAND, nand, 0) \
+       BOOT_TARGET_USB(func) \
        BOOT_TARGET_PXE(func) \
        BOOT_TARGET_DHCP(func)
Quoted 2 lines

--
Tom

--
Tom

Signature · 2 lines
With best regards,
Matwey V. Kornilov