Skip to contentSkip to conversation

bootstd: USB devtype detection for script boot

PATCH In review John Clark 2 participants 4 messages Jun 30, 2023 – Jul 23, 2023

lore
Share & tools
lore

John Clark

author
#0 lore raw

PATCH 1/1 bootstd: USB devtype detection for script boot

Change the device type from "usb_mass_storage" to "usb" when booting a script.

Before this change:
=> printenv devtype
devtype=usb_mass_storage

After this change:
=> printenv devtype
devtype=usb

---

 boot/bootmeth_script.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
boot/bootmeth_script.c +4 -1
index 225eb18ee6..a4050c384d 100644
@@ -190,7 +190,10 @@ static int script_boot(struct udevice *dev, struct bootflow *bflow)
 	ulong addr;
 	int ret;
 
-	ret = env_set("devtype", blk_get_devtype(bflow->blk));
+	if (desc->uclass_id == UCLASS_USB)
+		ret = env_set("devtype", "usb");
+	else
+		ret = env_set("devtype", blk_get_devtype(bflow->blk));
 	if (!ret)
 		ret = env_set_hex("devnum", desc->devnum);
 	if (!ret)
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · John Clark

Change the device type from "usb_mass_storage" to "usb" when booting a script.

Before this change:
=> printenv devtype
devtype=usb_mass_storage

After this change:
=> printenv devtype
devtype=usb

Quoted 5 lines

---

 boot/bootmeth_script.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Fixes d9409244 ("bootstd: Add an implementation of script boot")

#2 lore raw
Quoted 14 lines · Simon Glass
Quoted 12 lines · John Clark

Change the device type from "usb_mass_storage" to "usb" when booting a script.

Before this change:
=> printenv devtype
devtype=usb_mass_storage

After this change:
=> printenv devtype
devtype=usb

Quoted 8 lines
Quoted 5 lines

---

 boot/bootmeth_script.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Fixes d9409244 ("bootstd: Add an implementation of script boot")

I mean:

Fixes d9409244 ("bootstd: Add an implementation of script boot")
#3 lore raw
Quoted 19 lines · Simon Glass
Quoted 17 lines · Simon Glass
Quoted 15 lines · John Clark

Change the device type from "usb_mass_storage" to "usb" when booting a script.

Before this change:
=> printenv devtype
devtype=usb_mass_storage

After this change:
=> printenv devtype
devtype=usb

---

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
 boot/bootmeth_script.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Fixes d9409244 ("bootstd: Add an implementation of script boot")

I mean:

Fixes d9409244 ("bootstd: Add an implementation of script boot")

Applied to u-boot-dm, thanks!