From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tuomas Tynkkynen Date: Sun, 14 Oct 2018 02:21:11 +0300 Subject: [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script In-Reply-To: <20181012050909.7009-2-takahiro.akashi@linaro.org> References: <20181012050909.7009-1-takahiro.akashi@linaro.org> <20181012050909.7009-2-takahiro.akashi@linaro.org> Message-ID: <20181014022111.02f1df62@thinkpad> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Takahiro, On Fri, 12 Oct 2018 14:09:07 +0900 AKASHI Takahiro wrote: > With this patch, a removable USB mass storage device attached to the > system will also be scanned to find and boot an EFI binary (that is > BOOTEFI_NAME, see config_distro_bootcmd.h). > > Signed-off-by: AKASHI Takahiro > --- > include/config_distro_bootcmd.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/config_distro_bootcmd.h > b/include/config_distro_bootcmd.h index 76e12b7bf4ee..dd47e27d6835 > 100644 --- a/include/config_distro_bootcmd.h > +++ b/include/config_distro_bootcmd.h > @@ -26,7 +26,12 @@ > */ > > #define BOOTENV_SHARED_BLKDEV_BODY(devtypel) \ > - "if " #devtypel " dev ${devnum}; then " \ > + "if test " #devtypel " = usb ; then " \ > + "if " #devtypel " info ${devnum}; then " \ > + "setenv devtype " #devtypel "; " \ > + "run scan_dev_for_boot_part; " \ > + "fi;" \ > + "elif " #devtypel " dev ${devnum}; then " \ > "setenv devtype " #devtypel "; " \ > "run scan_dev_for_boot_part; " \ > "fi\0" I can't see how this patch is needed - "usb dev" is a valid command (via do_usb() -> blk_common_cmd()) as long as CONFIG_USB_STORAGE is set.