[PATCH] 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
Signed-off-by: John Clark inindev@gmail.com ---
boot/bootmeth_script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c index 225eb18ee6..a4050c384d 100644 --- a/boot/bootmeth_script.c +++ b/boot/bootmeth_script.c @@ -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)

On Fri, 30 Jun 2023 at 18:50, John Clark inindev@gmail.com wrote:
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
Signed-off-by: John Clark inindev@gmail.com
boot/bootmeth_script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org Fixes d9409244 ("bootstd: Add an implementation of script boot")

On Sat, 1 Jul 2023 at 20:10, Simon Glass sjg@chromium.org wrote:
On Fri, 30 Jun 2023 at 18:50, John Clark inindev@gmail.com wrote:
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
Signed-off-by: John Clark inindev@gmail.com
boot/bootmeth_script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org Fixes d9409244 ("bootstd: Add an implementation of script boot")
I mean: Fixes: d9409244 ("bootstd: Add an implementation of script boot")

On Sat, 1 Jul 2023 at 13:12, Simon Glass sjg@chromium.org wrote:
On Sat, 1 Jul 2023 at 20:10, Simon Glass sjg@chromium.org wrote:
On Fri, 30 Jun 2023 at 18:50, John Clark inindev@gmail.com wrote:
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
Signed-off-by: John Clark inindev@gmail.com
boot/bootmeth_script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org 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!
participants (2)
-
John Clark
-
Simon Glass