* [U-Boot] [PATCH 0/3] uefi: support USB boot in distro boot
@ 2018-10-12 5:09 AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script AKASHI Takahiro
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: AKASHI Takahiro @ 2018-10-12 5:09 UTC (permalink / raw)
To: u-boot
I think that it will be nice if we can install a distro linux from, say,
USB memory with ISO image, to a hard disk off the shelf.
Even with the current u-boot, we can do this by having two *scsi* disks,
but using an USB device looks more realistic, doesn't it?
This patch set give us a base for this; I was able to successfully start
a familiar "install" screen on qemu, using an ubuntu server ISO image for
arm64. CUI of course.
Thanks,
-Takahiro Akashi
AKASHI Takahiro (3):
efi_loader: support USB boot in distro boot script
ARM: qemu-arm: enable usb mass storage in default configuration
ARM: qemu-arm: enable USB boot in distro boot with UEFI
configs/qemu_arm64_defconfig | 1 +
configs/qemu_arm_defconfig | 1 +
include/config_distro_bootcmd.h | 7 ++++++-
include/configs/qemu-arm.h | 1 +
4 files changed, 9 insertions(+), 1 deletion(-)
--
2.19.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script
2018-10-12 5:09 [U-Boot] [PATCH 0/3] uefi: support USB boot in distro boot AKASHI Takahiro
@ 2018-10-12 5:09 ` AKASHI Takahiro
2018-10-13 23:21 ` Tuomas Tynkkynen
2018-10-12 5:09 ` [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 3/3] ARM: qemu-arm: enable USB boot in distro boot with UEFI AKASHI Takahiro
2 siblings, 1 reply; 10+ messages in thread
From: AKASHI Takahiro @ 2018-10-12 5:09 UTC (permalink / raw)
To: u-boot
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 <takahiro.akashi@linaro.org>
---
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"
--
2.19.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration
2018-10-12 5:09 [U-Boot] [PATCH 0/3] uefi: support USB boot in distro boot AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script AKASHI Takahiro
@ 2018-10-12 5:09 ` AKASHI Takahiro
2018-10-16 13:21 ` Alexander Graf
2018-10-12 5:09 ` [U-Boot] [PATCH 3/3] ARM: qemu-arm: enable USB boot in distro boot with UEFI AKASHI Takahiro
2 siblings, 1 reply; 10+ messages in thread
From: AKASHI Takahiro @ 2018-10-12 5:09 UTC (permalink / raw)
To: u-boot
This is a preparatory patch so that USB boot will be supported
in distro boot script by default.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
configs/qemu_arm64_defconfig | 1 +
configs/qemu_arm_defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig
index 7fd726fdda35..91c97181ab9f 100644
--- a/configs/qemu_arm64_defconfig
+++ b/configs/qemu_arm64_defconfig
@@ -32,3 +32,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_STORAGE=y
diff --git a/configs/qemu_arm_defconfig b/configs/qemu_arm_defconfig
index fbceaf3c52f3..4f4f9b791415 100644
--- a/configs/qemu_arm_defconfig
+++ b/configs/qemu_arm_defconfig
@@ -32,3 +32,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_STORAGE=y
--
2.19.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/3] ARM: qemu-arm: enable USB boot in distro boot with UEFI
2018-10-12 5:09 [U-Boot] [PATCH 0/3] uefi: support USB boot in distro boot AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration AKASHI Takahiro
@ 2018-10-12 5:09 ` AKASHI Takahiro
2018-10-16 13:22 ` Alexander Graf
2 siblings, 1 reply; 10+ messages in thread
From: AKASHI Takahiro @ 2018-10-12 5:09 UTC (permalink / raw)
To: u-boot
With this patch which adds a removable USB mass storage to a list
of bootable devices, USB boot is supported in distro boot if UEFI is
configured.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
include/configs/qemu-arm.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index 0e66f946dde5..395cb911f5fe 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -45,6 +45,7 @@
#define CONFIG_ENV_SECT_SIZE SZ_1M
#define BOOT_TARGET_DEVICES(func) \
+ func(USB, usb, 0) \
func(SCSI, scsi, 0) \
func(DHCP, dhcp, na)
--
2.19.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script
2018-10-12 5:09 ` [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script AKASHI Takahiro
@ 2018-10-13 23:21 ` Tuomas Tynkkynen
2018-10-15 4:53 ` AKASHI Takahiro
0 siblings, 1 reply; 10+ messages in thread
From: Tuomas Tynkkynen @ 2018-10-13 23:21 UTC (permalink / raw)
To: u-boot
Hi Takahiro,
On Fri, 12 Oct 2018 14:09:07 +0900
AKASHI Takahiro <takahiro.akashi@linaro.org> 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 <takahiro.akashi@linaro.org>
> ---
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script
2018-10-13 23:21 ` Tuomas Tynkkynen
@ 2018-10-15 4:53 ` AKASHI Takahiro
2018-10-16 13:18 ` Alexander Graf
0 siblings, 1 reply; 10+ messages in thread
From: AKASHI Takahiro @ 2018-10-15 4:53 UTC (permalink / raw)
To: u-boot
On Sun, Oct 14, 2018 at 02:21:11AM +0300, Tuomas Tynkkynen wrote:
> Hi Takahiro,
>
> On Fri, 12 Oct 2018 14:09:07 +0900
> AKASHI Takahiro <takahiro.akashi@linaro.org> 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 <takahiro.akashi@linaro.org>
> > ---
> > 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.
Right.
I didn't notice this sub-command, dev, because I first consulted
"help usb" with default qemu_arm64_defconfig which doesn't have
CONFIG_USB_STORAGE. Since then I've believed it was not available.
Yet my patch #2 should work.
-Takahiro Akashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script
2018-10-15 4:53 ` AKASHI Takahiro
@ 2018-10-16 13:18 ` Alexander Graf
0 siblings, 0 replies; 10+ messages in thread
From: Alexander Graf @ 2018-10-16 13:18 UTC (permalink / raw)
To: u-boot
On 15.10.18 06:53, AKASHI Takahiro wrote:
> On Sun, Oct 14, 2018 at 02:21:11AM +0300, Tuomas Tynkkynen wrote:
>> Hi Takahiro,
>>
>> On Fri, 12 Oct 2018 14:09:07 +0900
>> AKASHI Takahiro <takahiro.akashi@linaro.org> 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 <takahiro.akashi@linaro.org>
>>> ---
>>> 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.
>
> Right.
> I didn't notice this sub-command, dev, because I first consulted
> "help usb" with default qemu_arm64_defconfig which doesn't have
> CONFIG_USB_STORAGE. Since then I've believed it was not available.
>
> Yet my patch #2 should work.
Yes, distro boot already supports USB booting just fine. All you need to
do is what you did in patch 3 to enable it on a particular target board.
Alex
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration
2018-10-12 5:09 ` [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration AKASHI Takahiro
@ 2018-10-16 13:21 ` Alexander Graf
2018-10-18 2:44 ` AKASHI Takahiro
0 siblings, 1 reply; 10+ messages in thread
From: Alexander Graf @ 2018-10-16 13:21 UTC (permalink / raw)
To: u-boot
On 12.10.18 07:09, AKASHI Takahiro wrote:
> This is a preparatory patch so that USB boot will be supported
> in distro boot script by default.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
How about something like this instead?
Alex
diff --git a/Kconfig b/Kconfig
index 1aadf5dd2d..8d515fe18c 100644
--- a/Kconfig
+++ b/Kconfig
@@ -86,6 +86,7 @@ config DISTRO_DEFAULTS
select SUPPORT_RAW_INITRD
select SYS_LONGHELP
imply CMD_MII if NET
+ imply USB_STORAGE if USB
imply USE_BOOTCOMMAND
help
Select this to enable various options and commands which are suitable
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/3] ARM: qemu-arm: enable USB boot in distro boot with UEFI
2018-10-12 5:09 ` [U-Boot] [PATCH 3/3] ARM: qemu-arm: enable USB boot in distro boot with UEFI AKASHI Takahiro
@ 2018-10-16 13:22 ` Alexander Graf
0 siblings, 0 replies; 10+ messages in thread
From: Alexander Graf @ 2018-10-16 13:22 UTC (permalink / raw)
To: u-boot
On 12.10.18 07:09, AKASHI Takahiro wrote:
> With this patch which adds a removable USB mass storage to a list
> of bootable devices, USB boot is supported in distro boot if UEFI is
> configured.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Alexander Graf <agraf@suse.de>
Alex
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration
2018-10-16 13:21 ` Alexander Graf
@ 2018-10-18 2:44 ` AKASHI Takahiro
0 siblings, 0 replies; 10+ messages in thread
From: AKASHI Takahiro @ 2018-10-18 2:44 UTC (permalink / raw)
To: u-boot
On Tue, Oct 16, 2018 at 03:21:10PM +0200, Alexander Graf wrote:
>
>
> On 12.10.18 07:09, AKASHI Takahiro wrote:
> > This is a preparatory patch so that USB boot will be supported
> > in distro boot script by default.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> How about something like this instead?
Looks smart.
Thanks,
-Takahiro Akashi
> Alex
>
>
> diff --git a/Kconfig b/Kconfig
> index 1aadf5dd2d..8d515fe18c 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -86,6 +86,7 @@ config DISTRO_DEFAULTS
> select SUPPORT_RAW_INITRD
> select SYS_LONGHELP
> imply CMD_MII if NET
> + imply USB_STORAGE if USB
> imply USE_BOOTCOMMAND
> help
> Select this to enable various options and commands which are suitable
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-10-18 2:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 5:09 [U-Boot] [PATCH 0/3] uefi: support USB boot in distro boot AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 1/3] efi_loader: support USB boot in distro boot script AKASHI Takahiro
2018-10-13 23:21 ` Tuomas Tynkkynen
2018-10-15 4:53 ` AKASHI Takahiro
2018-10-16 13:18 ` Alexander Graf
2018-10-12 5:09 ` [U-Boot] [PATCH 2/3] ARM: qemu-arm: enable usb mass storage in default configuration AKASHI Takahiro
2018-10-16 13:21 ` Alexander Graf
2018-10-18 2:44 ` AKASHI Takahiro
2018-10-12 5:09 ` [U-Boot] [PATCH 3/3] ARM: qemu-arm: enable USB boot in distro boot with UEFI AKASHI Takahiro
2018-10-16 13:22 ` Alexander Graf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.