Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] aarch64-efi: support net boot with devicetree
@ 2026-06-17 17:10 Vincent Stehlé
  2026-06-17 17:10 ` [Buildroot] [PATCH 1/2] DEVELOPERS: add Vincent Stehlé for aarch64-efi files Vincent Stehlé
  2026-06-17 17:10 ` [Buildroot] [PATCH 2/2] configs/aarch64_efi: support net boot with devicetree Vincent Stehlé
  0 siblings, 2 replies; 5+ messages in thread
From: Vincent Stehlé @ 2026-06-17 17:10 UTC (permalink / raw)
  To: buildroot; +Cc: Dick Olsson, Vincent Stehlé

Here are two patches to:

1. Add myself in DEVELOPERS for the aarch64-efi files,
   which the next patch modifies.

2. Add support of net boot with devicetree to aarch64-efi,
   which boils down to adding a small Linux config fragment.

The second patch contains all the technical details and documents how to
test on Qemu.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
---
Vincent Stehlé (2):
      DEVELOPERS: add Vincent Stehlé for aarch64-efi files
      configs/aarch64_efi: support net boot with devicetree

 DEVELOPERS                                    |  2 ++
 board/aarch64-efi/linux-pmem-netboot.fragment |  3 +++
 board/aarch64-efi/readme.txt                  | 11 +++++++++++
 configs/aarch64_efi_defconfig                 |  1 +
 4 files changed, 17 insertions(+)
---
base-commit: 67449130e9fdd71a38ca26539dddfa8c882b1977
change-id: 20260617-pmem-9b2efa31aee4

Best regards,
-- 
Vincent.

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] DEVELOPERS: add Vincent Stehlé for aarch64-efi files
  2026-06-17 17:10 [Buildroot] [PATCH 0/2] aarch64-efi: support net boot with devicetree Vincent Stehlé
@ 2026-06-17 17:10 ` Vincent Stehlé
  2026-07-05 12:48   ` Julien Olivain via buildroot
  2026-06-17 17:10 ` [Buildroot] [PATCH 2/2] configs/aarch64_efi: support net boot with devicetree Vincent Stehlé
  1 sibling, 1 reply; 5+ messages in thread
From: Vincent Stehlé @ 2026-06-17 17:10 UTC (permalink / raw)
  To: buildroot; +Cc: Dick Olsson, Vincent Stehlé

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
---
 DEVELOPERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index d591c62805..ea30553595 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3355,11 +3355,13 @@ F:	package/nss-myhostname/
 F:	package/utp_com/
 
 N:	Vincent Stehlé <vincent.stehle@arm.com>
+F:	board/aarch64-efi/
 F:	board/arm/fvp-ebbr/
 F:	board/compulab/iot-gate-imx8-ebbr/
 F:	board/pine64/rockpro64-ebbr/
 F:	board/qemu/aarch64-ebbr/
 F:	board/qemu/arm-ebbr/
+F:	configs/aarch64_efi_defconfig
 F:	configs/arm_fvp_ebbr_defconfig
 F:	configs/iot-gate-imx8_ebbr_defconfig
 F:	configs/qemu_aarch64_ebbr_defconfig

-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] configs/aarch64_efi: support net boot with devicetree
  2026-06-17 17:10 [Buildroot] [PATCH 0/2] aarch64-efi: support net boot with devicetree Vincent Stehlé
  2026-06-17 17:10 ` [Buildroot] [PATCH 1/2] DEVELOPERS: add Vincent Stehlé for aarch64-efi files Vincent Stehlé
@ 2026-06-17 17:10 ` Vincent Stehlé
  2026-07-05 12:52   ` Julien Olivain via buildroot
  1 sibling, 1 reply; 5+ messages in thread
From: Vincent Stehlé @ 2026-06-17 17:10 UTC (permalink / raw)
  To: buildroot; +Cc: Dick Olsson, Vincent Stehlé

UEFI platforms with a Devicetree have recently gained support for some form
of network booting. [1][2]

On those platforms, the UEFI firmware downloads the disk image over the
network and presents it to UEFI applications using the simple filesystem
protocol. This is sufficient for OS loaders such as e.g. GRUB to find their
configuration and load the kernel image.

The firmware must also describe the ramdisk to the OS, so that it finds its
root filesystem. On ACPI based platforms this is done with an NVDIMM
Firmware Interface Table (NFIT). On Devicetree based platforms, this can be
done with a pmem node. [3]

Add a kernel config fragment to add pmem support, which enables network
boot on UEFI platforms with Devicetree.
Also, briefly mention that we support this scenario in the readme.

This can be tested on Qemu, with the following procedure:

Build aarch64_efi_defconfig in a folder, to obtain output/images/disk.img,
and serve the image over HTTP with python:

  $ python -m http.server -d output/images/

In another terminal and another folder, configure a U-Boot based firmware
starting from qemu_aarch64_ebbr_defconfig, and with the following
additional configurations:

  BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2026.04"
  BR2_TARGET_UBOOT_NEEDS_DTC=y

Add the following U-Boot configurations to
board/qemu/aarch64-ebbr/u-boot.fragment:

  CONFIG_EFI_HTTP_BOOT=y
  CONFIG_NET_LWIP=y

Build everything; you should obtain output/images/flash.bin.

Start Qemu as per board/qemu/aarch64-ebbr/readme.txt, but omitting the hd0
-device and -drive stanzas.
U-Boot should start; interrupt it with enter.

At U-Boot prompt, type the following commands:

  => setenv loadaddr 0x43000000
  => efidebug boot rm 0
  => efidebug boot add -u 0 net http://10.0.2.2:8000/disk.img
  => efidebug boot order 0
  => bootefi bootmgr

U-Boot should download the disk image over HTTP and boot Linux with UEFI.
Look for the following message in Linux boot log, to confirm that it did
indeed mount its rootfs from the downloaded image:

  EXT4-fs (pmem0p2): mounted filesystem ...

Link: https://www.linaro.org/blog/installing-fedora-with-uefi-http-boot/ [1]
Link: https://docs.u-boot-project.org/en/latest/develop/uefi/uefi.html#uefi-http-boot-using-the-legacy-tcp-stack [2]
Link: https://github.com/ARM-software/edge-iot-arch-guide/blob/main/source/http-boot/pmem_node.md [3]
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
---
 board/aarch64-efi/linux-pmem-netboot.fragment |  3 +++
 board/aarch64-efi/readme.txt                  | 11 +++++++++++
 configs/aarch64_efi_defconfig                 |  1 +
 3 files changed, 15 insertions(+)

diff --git a/board/aarch64-efi/linux-pmem-netboot.fragment b/board/aarch64-efi/linux-pmem-netboot.fragment
new file mode 100644
index 0000000000..8c3e910919
--- /dev/null
+++ b/board/aarch64-efi/linux-pmem-netboot.fragment
@@ -0,0 +1,3 @@
+CONFIG_BLK_DEV_PMEM=y
+CONFIG_LIBNVDIMM=y
+CONFIG_OF_PMEM=y
diff --git a/board/aarch64-efi/readme.txt b/board/aarch64-efi/readme.txt
index 0e7ea0b5dd..259eb5b8c9 100644
--- a/board/aarch64-efi/readme.txt
+++ b/board/aarch64-efi/readme.txt
@@ -48,6 +48,17 @@ alternative to QEMU_EFI.fd. You will also need to change the machine
 specification to "-M virt,secure=on" on qemu command line, to enable TrustZone
 support, and you will need to increase the memory with "-m 1024".
 
+HTTP boot
+---------
+
+Some U-Boot and Devicetree based firmwares are capable of booting with UEFI from
+HTTP(s). [4]
+
+The aarch64_efi_defconfig has appropriate persistent memory support compiled in
+the Linux kernel to support this scenario. [5]
+
 [1]: https://github.com/ARM-software/ebbr
 [2]: https://developer.arm.com/architectures/system-architectures/arm-systemready
 [3]: https://github.com/glikely/u-boot-tfa-build
+[4]: https://docs.u-boot-project.org/en/latest/develop/uefi/uefi.html#uefi-http-boot-using-the-legacy-tcp-stack
+[5]: https://github.com/ARM-software/edge-iot-arch-guide/blob/main/source/http-boot/pmem_node.md
diff --git a/configs/aarch64_efi_defconfig b/configs/aarch64_efi_defconfig
index 390f3fc6ac..78292c0cc4 100644
--- a/configs/aarch64_efi_defconfig
+++ b/configs/aarch64_efi_defconfig
@@ -11,6 +11,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.14"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/aarch64-efi/linux-pmem-netboot.fragment"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 BR2_LINUX_KERNEL_NEEDS_HOST_PYTHON3=y
 BR2_TARGET_ROOTFS_EXT2=y

-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot]  [PATCH 1/2] DEVELOPERS: add Vincent Stehlé for aarch64-efi files
  2026-06-17 17:10 ` [Buildroot] [PATCH 1/2] DEVELOPERS: add Vincent Stehlé for aarch64-efi files Vincent Stehlé
@ 2026-07-05 12:48   ` Julien Olivain via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Julien Olivain via buildroot @ 2026-07-05 12:48 UTC (permalink / raw)
  To: Vincent Stehlé; +Cc: buildroot, Dick Olsson

On 17/06/2026 19:10, Vincent Stehlé wrote:
> Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> Cc: Dick Olsson <hi@senzilla.io>

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH 2/2] configs/aarch64_efi: support net boot with devicetree
  2026-06-17 17:10 ` [Buildroot] [PATCH 2/2] configs/aarch64_efi: support net boot with devicetree Vincent Stehlé
@ 2026-07-05 12:52   ` Julien Olivain via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Julien Olivain via buildroot @ 2026-07-05 12:52 UTC (permalink / raw)
  To: Vincent Stehlé; +Cc: buildroot, Dick Olsson

Hi Vincent,

On 17/06/2026 19:10, Vincent Stehlé wrote:
> UEFI platforms with a Devicetree have recently gained support for some 
> form
> of network booting. [1][2]
> 
> On those platforms, the UEFI firmware downloads the disk image over the
> network and presents it to UEFI applications using the simple 
> filesystem
> protocol. This is sufficient for OS loaders such as e.g. GRUB to find 
> their
> configuration and load the kernel image.
> 
> The firmware must also describe the ramdisk to the OS, so that it finds 
> its
> root filesystem. On ACPI based platforms this is done with an NVDIMM
> Firmware Interface Table (NFIT). On Devicetree based platforms, this 
> can be
> done with a pmem node. [3]
> 
> Add a kernel config fragment to add pmem support, which enables network
> boot on UEFI platforms with Devicetree.
> Also, briefly mention that we support this scenario in the readme.
> 
> This can be tested on Qemu, with the following procedure:
> 
> Build aarch64_efi_defconfig in a folder, to obtain 
> output/images/disk.img,
> and serve the image over HTTP with python:
> 
>   $ python -m http.server -d output/images/
> 
> In another terminal and another folder, configure a U-Boot based 
> firmware
> starting from qemu_aarch64_ebbr_defconfig, and with the following
> additional configurations:
> 
>   BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2026.04"
>   BR2_TARGET_UBOOT_NEEDS_DTC=y
> 
> Add the following U-Boot configurations to
> board/qemu/aarch64-ebbr/u-boot.fragment:
> 
>   CONFIG_EFI_HTTP_BOOT=y
>   CONFIG_NET_LWIP=y

Maybe those config changes in qemu_aarch64_ebbr_defconfig and
board/qemu/aarch64-ebbr/u-boot.fragment you are mentioning here
could be included in a followup update of qemu_aarch64_ebbr_defconfig.
What do you think?

If you do so, you could probably add a small section in
board/qemu/aarch64-ebbr/readme.txt
quickly describing this new capability, same as you did here.

> Build everything; you should obtain output/images/flash.bin.
> 
> Start Qemu as per board/qemu/aarch64-ebbr/readme.txt, but omitting the 
> hd0
> -device and -drive stanzas.
> U-Boot should start; interrupt it with enter.
> 
> At U-Boot prompt, type the following commands:
> 
>   => setenv loadaddr 0x43000000
>   => efidebug boot rm 0

While testing, this comment reported a message that looked like an 
error:

     => efidebug boot rm 0
     Cannot persist EFI variables without system partition
     Missing TPMv2 device for EFI_TCG_PROTOCOL
     Cannot remove Boot0000

But the whole sequence successfully booted the aarch64 efi image.

Is this command really needed?

>   => efidebug boot add -u 0 net http://10.0.2.2:8000/disk.img
>   => efidebug boot order 0
>   => bootefi bootmgr
> 
> U-Boot should download the disk image over HTTP and boot Linux with 
> UEFI.
> Look for the following message in Linux boot log, to confirm that it 
> did
> indeed mount its rootfs from the downloaded image:
> 
>   EXT4-fs (pmem0p2): mounted filesystem ...
> 
> Link: 
> https://www.linaro.org/blog/installing-fedora-with-uefi-http-boot/ [1]
> Link: 
> https://docs.u-boot-project.org/en/latest/develop/uefi/uefi.html#uefi-http-boot-using-the-legacy-tcp-stack 
> [2]
> Link: 
> https://github.com/ARM-software/edge-iot-arch-guide/blob/main/source/http-boot/pmem_node.md 
> [3]
> Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> Cc: Dick Olsson <hi@senzilla.io>

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-05 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 17:10 [Buildroot] [PATCH 0/2] aarch64-efi: support net boot with devicetree Vincent Stehlé
2026-06-17 17:10 ` [Buildroot] [PATCH 1/2] DEVELOPERS: add Vincent Stehlé for aarch64-efi files Vincent Stehlé
2026-07-05 12:48   ` Julien Olivain via buildroot
2026-06-17 17:10 ` [Buildroot] [PATCH 2/2] configs/aarch64_efi: support net boot with devicetree Vincent Stehlé
2026-07-05 12:52   ` Julien Olivain via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox