On 10/16/23 04:39, Masahisa Kojima wrote:
On Mon, 16 Oct 2023 at 08:50, Masahisa Kojima
<masahisa.koj...@linaro.org> wrote:
This series adds the EFI HTTP boot support.
User can add the URI device path with "efidebug boot add" command.
efibootmgr handles the URI device path, download the
specified file using wget, mount the downloaded image with
blkmap, then boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI)
by selecting automatically created boot option when the new disk is
detected.
This version still does not include the test.
To enable EFI HTTP boot, we need to enable the following Kconfig options.
CONFIG_CMD_DNS
CONFIG_CMD_WGET
CONFIG_BLKMAP
CONFIG_EFI_HTTP_BOOT
On the Socionext Developerbox, enter the following commands then
debian installer is downloaded into "loadaddr" and installer
automatically starts.
=> dhcp
=> setenv serverip 192.168.1.1
=> efidebug boot add -u 3 debian-netinst
http://ftp.riken.jp/Linux/debian/debian-cd/12.1.0/arm64/iso-cd/debian-12.1.0-arm64-netinst.iso
=> efidebug boot order 3
=> bootefi bootmgr
Note that this debian installer can not proceed the installation
bacause RAM disk of installer image is not recogniged by the kernel.
I'm still investigating this issue, but drivers/nvdimm/of_pmem.c in linux
will be one of the solution to recognize RAM disk from kernel.
(In EDK2, the equivalent solution is called ACPI NFIT.)
On QEMU, I can not make DNS work from the QEMU guest.
The following commands work on qemu_arm64(manually set the http server ip in
URI).
=> dhcp
=> setenv gatewayip 10.0.2.2
=> setenv httpserverip 134.160.38.1
=> efidebug boot add -u 3 debian-netinst
http://134.160.38.1/Linux/debian/debian-cd/12.1.0/arm64/iso-cd/debian-12.1.0-arm64-netinst.iso
=> efidebug boot order 3
=> bootefi bootmgr
[TODO]
- add test
- stricter wget uri check
- omit the dns process if the given uri has ip address
-> this will be supported when the lwip migration completes
- uri device path support in eficonfig
[change log]
v5 -> v6
- add patch #4 "Boot var automatic management for removable medias"
- boot from automatically created boot option
rather than searching default file on the fly
- introduce new CONFIG_EFI_HTTP_BOOT Kconfig option
- comment in one place
- use log_err() rather than printf()
- use env_get_hex("filesize", 0) instead of return value of net_loop()
- use more suitable error code
- blkmap can be build for SPL/TPL
- add CDROM short-form device path support
Sorry but I forgot to include the necessary changes.
I will resend this series soon.
Which pretty much means that that next series is v7. If not you will confuse
tools like b4.
Thanks,
Michal