summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Clark <inindev@gmail.com>2023-06-30 20:12:14 +0300
committerSimon Glass <sjg@chromium.org>2023-07-20 23:10:57 +0300
commit7dde5620ecff8fee0dd4e29631ba299b0c43d9b8 (patch)
tree216e4e0136e1dc446e257f4f98baaa08c894e5e3
parent338b67f76cc37c78b2b25f3531924d1bce359aea (diff)
downloadu-boot-7dde5620ecff8fee0dd4e29631ba299b0c43d9b8.tar.xz
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> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--boot/bootmeth_script.c5
1 files changed, 4 insertions, 1 deletions
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)