test: Containerfile: add qemu-efi-aarch64.
PATCH 1/3 test: Containerfile: add qemu-efi-aarch64.
From: Chali Anis <[email protected]>
this will provide the uefi bios binaries to used for efi aarch64 payload test.
--- test/Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
test/Containerfile +2 -1
@@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ qemu-system-misc \ qemu-system-mips \ qemu-system-x86 \ + qemu-efi-aarch64 \ qemu-system-common \ ovmf \ python3 \
@@ -63,7 +64,7 @@ ENV LLVM_VERSION=21 RUN apt-get update && apt-get install -y --no-install-recommends lsb-release gnupg \ && wget https://apt.llvm.org/llvm.sh \ - && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} \ + && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} -n trixie \ && apt-get remove -y lsb-release gnupg \ && apt-get autoremove -y --purge \ && apt-get clean \
Signature · 1 line
2.34.1
PATCH 2/3 test: arm: add efi v8 test for efi arm64 payload.
From: Chali Anis <[email protected]>
Add efi armv8 payload labgrid yaml and add it in the barebox ci.
--- .github/workflows/test-labgrid-pytest.yml | 5 ++++ test/arm/efi_v8_defconfig.yaml | 31 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 test/arm/efi_v8_defconfig.yaml
.github/workflows/test-labgrid-pytest.yml +5 -0
@@ -27,6 +27,11 @@ jobs: lgenv: test/arm/multi_v8_defconfig.yaml defconfig: multi_v8_defconfig lgargs: --runxfail + + - ARCH: arm + lgenv: 'test/arm/efi_v8_defconfig.yaml' + defconfig: efi_v8_defconfig + lgargs: --runxfail - ARCH: mips lgenv: test/mips/qemu-malta_defconfig.yaml
test/arm/efi_v8_defconfig.yaml new file +31 -0
@@ -0,0 +1,31 @@ +targets: + main: + drivers: + QEMUDriver: + qemu_bin: qemu-system-aarch64 + machine: virt + cpu: cortex-a57 + memory: 1024M + kernel: barebox.efi + display: qemu-default + extra_args: '-L /usr/share/qemu-efi-aarch64 -bios QEMU_EFI.fd' + BareboxDriver: + prompt: 'barebox@[^:]+:[^ ]+ ' + bootstring: 'commandline:' + BareboxTestStrategy: {} + features: + - virtio-mmio + - testfs + devices: + fb0: 'Type: primary' + fbconsole0: 'Parent: fb0' + wdog0: 'Parent: efi-wdt' + efivarfs0: 'Driver: efivarfs' + efifs0: 'Driver: efifs' + runner: + kconfig_add: + - CONFIG_FRAMEBUFFER_CONSOLE=y +images: + barebox.efi: !template "$LG_BUILDDIR/barebox.efi" +imports: + - ../strategy.py
Signature · 1 line
2.34.1
PATCH 3/3 doc: efi: add efi armv8 payload documentation.
In reply to [email protected]From: Chali Anis <[email protected]>
Add how to compile armv8 efi payload and how to run it with qemu
--- Documentation/boards/efi.rst | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
Documentation/boards/efi.rst +17 -4
@@ -23,7 +23,7 @@ x86_64 binary currently is tested. Building barebox for EFI ------------------------ -Use the following to build barebox for EFI: +Use the following to build barebox for EFI to target x86 machine: .. code-block:: sh
@@ -31,6 +31,14 @@ Use the following to build barebox for EFI: make efi_defconfig make +Use the following to build barebox for EFI to target armv8 machine: + +.. code-block:: sh + + export ARCH=arm + make efi_v8_defconfig + make + The resulting EFI image is ``barebox.efi`` (or the barebox-flash-image link). Running barebox on EFI systems
@@ -39,8 +47,9 @@ Running barebox on EFI systems The simplest way to run barebox on a USB memory stick. (U)EFI only supports FAT filesystems, so make sure you either have a FAT16 or FAT32 filesystem on the memory stick. Put ``barebox.efi`` into the ``EFI/BOOT/`` directory and -name it ``BOOTx64.EFI`` on 64bit architectures and ``BOOTIA32.EFI`` on 32bit -architectures. Switching to USB boot in the BIOS should then be enough to +name it, for x86 ``BOOTx64.EFI`` or ``BOOTIA32.EFI`` on 64bit or 32bit +architectures recpectivly, for armv8 ``BOOTAA64.EFI``. +Switching to USB boot in the BIOS should then be enough to start barebox via USB. Some BIOSes allow to specify a path to a binary to be executed, others have a "start UEFI shell" entry which executes EFI/Shellx64.efi on the :term:`ESP`. This can be a barebox binary as well.
@@ -87,9 +96,13 @@ necessary to make a copy first. To start it create a USB memory stick like above and execute: .. code-block:: sh - + + # On x86 qemu-system-x86_64 -pflash OVMF.fd -nographic /dev/sdx + # On armv8 + qemu-system-aarch64 -L /usr/share/qemu-efi-aarch64 -bios QEMU_EFI.fd -nographic /dev/sdx + A plain VFAT image will work aswell, but in this case the UEFI BIOS won't recognize it as ESP and ``/boot`` won't be mounted.
Signature · 1 line
2.34.1
Quoted 23 lines · On Wed, Oct 22, 2025 at 01:25:06AM -0400, [email protected] wrote:
From: Chali Anis <[email protected]>
this will provide the uefi bios binaries to used for efi aarch64 payload test.
Signed-off-by Chali Anis <[email protected]>--- test/Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)test/Containerfile +1
-0@@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ qemu-system-misc \ qemu-system-mips \ qemu-system-x86 \ + qemu-efi-aarch64 \ qemu-system-common \ ovmf \ python3 \
test/Containerfile ENV LLVM_VERSION=21 · line 67
Quoted 5 lines
test/Containerfile +1
-1@@ -63,7 +64,7 @@ ENV LLVM_VERSION=21 RUN apt-get update && apt-get install -y --no-install-recommends lsb-release gnupg \ && wget https://apt.llvm.org/llvm.sh \ - && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} \ + && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} -n trixie \
We had problems installing LLVM 21 on latest trixie and therefore downgraded to LLVM 20, see
https://lore.barebox.org/[email protected].
Does this change here have something to do with this?
In any way, this change doesn't seem to be related to installing qemu-efi-aarch64, so this should be an extra patch with an explanation why it's needed.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |