diff mbox series

[v2,6/6] doc: uefi: add HTTP Boot support

Message ID 20230901102542.609239-7-masahisa.kojima@linaro.org
State New
Headers show
Series Add EFI HTTP boot support | expand

Commit Message

Masahisa Kojima Sept. 1, 2023, 10:25 a.m. UTC
This adds the description about HTTP Boot.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
 doc/develop/uefi/uefi.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Ilias Apalodimas Sept. 14, 2023, 1:57 p.m. UTC | #1
On Fri, Sep 01, 2023 at 07:25:42PM +0900, Masahisa Kojima wrote:
> This adds the description about HTTP Boot.
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
> ---
>  doc/develop/uefi/uefi.rst | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
> index a7a41f2fac..fd87bb1edb 100644
> --- a/doc/develop/uefi/uefi.rst
> +++ b/doc/develop/uefi/uefi.rst
> @@ -594,6 +594,27 @@ UEFI variables. Booting according to these variables is possible via::
>  As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot
>  command 'efidebug' can be used to set the variables.
>
> +UEFI HTTP Boot
> +~~~~~~~~~~~~~~
> +
> +HTTP Boot provides the capability for system deployment and configuration
> +over the network. HTTP Boot can be activated by specifying::
> +
> +    CONFIG_CMD_DNS
> +    CONFIG_CMD_WGET
> +    CONFIG_BLKMAP
> +
> +Set up the load option specifying the target URI::
> +
> +    efidebug boot add -u 1 netinst http://foo/bar
> +
> +When this load option is selected as boot selection, resolve the
> +host ip address by dhs, then download the file with wget.

 dhs -> dns
 what happens if it's an IP address?

> +If the downloaded file extension is .iso or .img file, efibootmgr tries to
> +mount the image and boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI).
> +If the downloaded file extension is .efi and file is PE-COFF image,
> +load the downloaded file and start it.
> +
>  Executing the built in hello world application
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> --
> 2.34.1
>

Thanks
/Ilias
Masahisa Kojima Sept. 14, 2023, 11:52 p.m. UTC | #2
On Thu, 14 Sept 2023 at 22:57, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> On Fri, Sep 01, 2023 at 07:25:42PM +0900, Masahisa Kojima wrote:
> > This adds the description about HTTP Boot.
> >
> > Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
> > ---
> >  doc/develop/uefi/uefi.rst | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >
> > diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
> > index a7a41f2fac..fd87bb1edb 100644
> > --- a/doc/develop/uefi/uefi.rst
> > +++ b/doc/develop/uefi/uefi.rst
> > @@ -594,6 +594,27 @@ UEFI variables. Booting according to these variables is possible via::
> >  As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot
> >  command 'efidebug' can be used to set the variables.
> >
> > +UEFI HTTP Boot
> > +~~~~~~~~~~~~~~
> > +
> > +HTTP Boot provides the capability for system deployment and configuration
> > +over the network. HTTP Boot can be activated by specifying::
> > +
> > +    CONFIG_CMD_DNS
> > +    CONFIG_CMD_WGET
> > +    CONFIG_BLKMAP
> > +
> > +Set up the load option specifying the target URI::
> > +
> > +    efidebug boot add -u 1 netinst http://foo/bar
> > +
> > +When this load option is selected as boot selection, resolve the
> > +host ip address by dhs, then download the file with wget.
>
>  dhs -> dns
OK.

>  what happens if it's an IP address?
Current implementation tries to resolve the IP address as a host name,
so the DNS process will end up with "host not found".
We need to preset the "httpserverip" env variable to proceed the wget.

For this series, without a lwip port, this limitation should be noted here.

I could take the ip address format check code from iwip or other projects,
but I did not do that since there is a workaround(set "httpserverip"
env variable).
In addition, when the lwip port lands, this case is properly handled.
If the IP address is used as host, the DNS process is skipped.

Thanks,
Masahisa Kojima

>
> > +If the downloaded file extension is .iso or .img file, efibootmgr tries to
> > +mount the image and boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI).
> > +If the downloaded file extension is .efi and file is PE-COFF image,
> > +load the downloaded file and start it.
> > +
> >  Executing the built in hello world application
> >  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > --
> > 2.34.1
> >
>
> Thanks
> /Ilias
Ilias Apalodimas Sept. 15, 2023, 6:09 a.m. UTC | #3
On Fri, 15 Sept 2023 at 02:52, Masahisa Kojima
<masahisa.kojima@linaro.org> wrote:
>
> On Thu, 14 Sept 2023 at 22:57, Ilias Apalodimas
> <ilias.apalodimas@linaro.org> wrote:
> >
> > On Fri, Sep 01, 2023 at 07:25:42PM +0900, Masahisa Kojima wrote:
> > > This adds the description about HTTP Boot.
> > >
> > > Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
> > > ---
> > >  doc/develop/uefi/uefi.rst | 21 +++++++++++++++++++++
> > >  1 file changed, 21 insertions(+)
> > >
> > > diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
> > > index a7a41f2fac..fd87bb1edb 100644
> > > --- a/doc/develop/uefi/uefi.rst
> > > +++ b/doc/develop/uefi/uefi.rst
> > > @@ -594,6 +594,27 @@ UEFI variables. Booting according to these variables is possible via::
> > >  As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot
> > >  command 'efidebug' can be used to set the variables.
> > >
> > > +UEFI HTTP Boot
> > > +~~~~~~~~~~~~~~
> > > +
> > > +HTTP Boot provides the capability for system deployment and configuration
> > > +over the network. HTTP Boot can be activated by specifying::
> > > +
> > > +    CONFIG_CMD_DNS
> > > +    CONFIG_CMD_WGET
> > > +    CONFIG_BLKMAP
> > > +
> > > +Set up the load option specifying the target URI::
> > > +
> > > +    efidebug boot add -u 1 netinst http://foo/bar
> > > +
> > > +When this load option is selected as boot selection, resolve the
> > > +host ip address by dhs, then download the file with wget.
> >
> >  dhs -> dns
> OK.
>
> >  what happens if it's an IP address?
> Current implementation tries to resolve the IP address as a host name,
> so the DNS process will end up with "host not found".
> We need to preset the "httpserverip" env variable to proceed the wget.
>
> For this series, without a lwip port, this limitation should be noted here.
>
> I could take the ip address format check code from iwip or other projects,
> but I did not do that since there is a workaround(set "httpserverip"
> env variable).
> In addition, when the lwip port lands, this case is properly handled.
> If the IP address is used as host, the DNS process is skipped.

Ok, then update this with information on how to use an IP address
instead of a hostname and once LWIP lands we can update it

Thanks
/Ilias
>
> Thanks,
> Masahisa Kojima
>
> >
> > > +If the downloaded file extension is .iso or .img file, efibootmgr tries to
> > > +mount the image and boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI).
> > > +If the downloaded file extension is .efi and file is PE-COFF image,
> > > +load the downloaded file and start it.
> > > +
> > >  Executing the built in hello world application
> > >  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > --
> > > 2.34.1
> > >
> >
> > Thanks
> > /Ilias
diff mbox series

Patch

diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
index a7a41f2fac..fd87bb1edb 100644
--- a/doc/develop/uefi/uefi.rst
+++ b/doc/develop/uefi/uefi.rst
@@ -594,6 +594,27 @@  UEFI variables. Booting according to these variables is possible via::
 As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot
 command 'efidebug' can be used to set the variables.
 
+UEFI HTTP Boot
+~~~~~~~~~~~~~~
+
+HTTP Boot provides the capability for system deployment and configuration
+over the network. HTTP Boot can be activated by specifying::
+
+    CONFIG_CMD_DNS
+    CONFIG_CMD_WGET
+    CONFIG_BLKMAP
+
+Set up the load option specifying the target URI::
+
+    efidebug boot add -u 1 netinst http://foo/bar
+
+When this load option is selected as boot selection, resolve the
+host ip address by dhs, then download the file with wget.
+If the downloaded file extension is .iso or .img file, efibootmgr tries to
+mount the image and boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI).
+If the downloaded file extension is .efi and file is PE-COFF image,
+load the downloaded file and start it.
+
 Executing the built in hello world application
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~