test: Containerfile: fix build issue related to apt cleanup.
PATCH v2 1/5 test: Containerfile: fix build issue related to apt cleanup.
From: Chali Anis <[email protected]>
We cleanup the apt data after the second install group otherwise we we have to do an apt update.
=> ERROR [ 3/10] RUN apt-get install -y --no-install-recommends lsb-release gpg &&
wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 20 -n trixie 0.3s
------
Quoted 1 line
[ 3/10] RUN apt-get install -y --no-install-recommends lsb-release gpg &&
wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 20 &&
apt-get remove -y lsb-release gnupg &&
apt-get autoremove -y --purge && apt-get clean &&
rm -rf llvm.sh /var/lib/apt/lists/*:
0.240 Reading package lists...
0.258 Building dependency tree...
0.261 Reading state information...
0.266 E: Unable to locate package lsb-release
0.266 E: Unable to locate package gpg
------
1 warning found (use docker --debug to expand):
- MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 6)
Containerfile:67
--------------------
66 | 67 | >>> RUN apt-get install -y --no-install-recommends lsb-release gpg \ 68 | >>> && wget https://apt.llvm.org/llvm.sh \ 69 | >>> && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} -n trixie \ 70 | >>> && apt-get remove -y lsb-release gnupg \ 71 | >>> && apt-get autoremove -y --purge \ 72 | >>> && apt-get clean \ 73 | >>> && rm -rf llvm.sh /var/lib/apt/lists/* 74 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install -y --no-install-recommends lsb-release gpg \t&& wget https://apt.llvm.org/llvm.sh \t&& chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} -n trixie \t&& apt-get remove -y lsb-release gnupg \t&& apt-get autoremove -y --purge \t&& apt-get clean \t&&
rm -rf llvm.sh /var/lib/apt/lists/*" did not complete successfully: exit code: 100
--- test/Containerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
test/Containerfile +1 -3
@@ -56,9 +56,7 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme device-tree-compiler \ u-boot-tools \ yamllint \ - yq \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + yq ENV GCC_VERSION=15.2.0 ENV LLVM_VERSION=20
PATCH v2 2/5 ci: container: update llvm to 21 and fix dependency issue.
From: Chali Anis <[email protected]>
upgrade back to llvm 21 and specify distroname argument to llvm which prevents having packages conflicts.
--- test/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
test/Containerfile +2 -2
@@ -59,11 +59,11 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme yq ENV GCC_VERSION=15.2.0 -ENV LLVM_VERSION=20 +ENV LLVM_VERSION=21 RUN 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 \
Re: [PATCH v2 2/5] ci: container: update llvm to 21 and fix dependency issue.
Hi,
Quoted 8 lines · On 12/12/25 6:08 AM, [email protected] wrote:
From: Chali Anis <[email protected]>
upgrade back to llvm 21 and specify distroname argument to llvm which prevents having packages conflicts.
Fixes 305c0a1ed064 ("ci: container: downgrade LLVM to v20")Signed-off-by Chali Anis <[email protected]>
Quoted 24 lines
--- test/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)test/Containerfile +2
-2@@ -59,11 +59,11 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme yq ENV GCC_VERSION=15.2.0 -ENV LLVM_VERSION=20 +ENV LLVM_VERSION=21 RUN 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 · 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 |
PATCH v2 3/5 test: container: add qemu-efi-aarch64.
In reply to [email protected]From: Chali Anis <[email protected]>
Needed to have ovmf uefi firmwares used for efi armv8 payload test.
--- test/Containerfile | 1 + 1 file changed, 1 insertion(+)
test/Containerfile +1 -0
@@ -41,6 +41,7 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme qemu-system-mips \ qemu-system-x86 \ qemu-system-common \ + qemu-efi-aarch64 \ ovmf \ python3 \ python3-crcmod \
Re: [PATCH v2 3/5] test: container: add qemu-efi-aarch64.
Quoted 5 lines · On 12/12/25 6:08 AM, [email protected] wrote:
From: Chali Anis <[email protected]>
Needed to have ovmf uefi firmwares used for efi armv8 payload test.
Signed-off-by Chali Anis <[email protected]>
Quoted 18 lines
--- test/Containerfile | 1 + 1 file changed, 1 insertion(+)test/Containerfile +1
-0@@ -41,6 +41,7 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme qemu-system-mips \ qemu-system-x86 \ qemu-system-common \ + qemu-efi-aarch64 \ ovmf \ python3 \ python3-crcmod \
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 |
PATCH v2 4/5 test: arm: add efi v8 test for efi arm64 payload.
In reply to [email protected]From: Chali Anis <[email protected]>
--- .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
Re: [PATCH v2 4/5] test: arm: add efi v8 test for efi arm64 payload.
Quoted 32 lines · On 12/12/25 6:08 AM, [email protected] wrote:
From: Chali Anis <[email protected]>
Signed-off-by Chali Anis <[email protected]>--- .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.yamltest/arm/efi_v8_defconfig.yaml new file +1
-0@@ -0,0 +1,31 @@ +targets:
test/arm/efi_v8_defconfig.yaml line 11
Quoted 10 lines
test/arm/efi_v8_defconfig.yaml new file +10
-0+ 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'
Is this not in the default search path for QEMU? I want to avoid hardcoding distro-specific files in these config files.
Quoted 22 lines
test/arm/efi_v8_defconfig.yaml new file +20
-0+ 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 · 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 |
PATCH v2 5/5 doc: efi: add efi armv8 documentaion.
In reply to [email protected]From: Chali Anis <[email protected]>
--- 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.
Re: [PATCH v2 5/5] doc: efi: add efi armv8 documentaion.
Quoted 3 lines · On 12/12/25 6:08 AM, [email protected] wrote:
From: Chali Anis <[email protected]>
Signed-off-by Chali Anis <[email protected]>
Just a comment below:
Documentation/boards/efi.rst Running barebox on EFI systems · line 51
Quoted 4 lines
Documentation/boards/efi.rst +2
-2-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``.
Maybe mention CONFIG_EFI_PAYLOAD_DEFAULT_PATH, which will have the name depending on architecture?
Quoted 21 lines
Documentation/boards/efi.rst +6
-1+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 · 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 |
Hi,
Quoted 4 lines · On 12/12/25 6:08 AM, [email protected] wrote:
From: Chali Anis <[email protected]>
We cleanup the apt data after the second install group otherwise we we have to do an apt update.
This is by design as my understanding was that some tools save each RUN command separately as layer into the container and so if we don't delete it again in the same run, the final container will get bigger.
Having to do an extra apt update at start is thus an acceptable tradeoff.
Cheers,
Ahmad
Quoted 58 lines
=> ERROR [ 3/10] RUN apt-get install -y --no-install-recommends lsb-release gpg &&
wget https://apt.llvm.org/llvm.sh && chmod +xllvm.sh&& ./llvm.sh 20 -n trixie 0.3s
------Quoted 1 line
[ 3/10] RUN apt-get install -y --no-install-recommends lsb-release gpg &&
wget https://apt.llvm.org/llvm.sh && chmod +x
llvm.sh&& ./llvm.sh 20 &&
apt-get remove -y lsb-release gnupg &&
apt-get autoremove -y --purge && apt-get clean &&
rm -rfllvm.sh/var/lib/apt/lists/*:
0.240 Reading package lists...
0.258 Building dependency tree...
0.261 Reading state information...
0.266 E: Unable to locate package lsb-release
0.266 E: Unable to locate package gpg
------1 warning found (use docker --debug to expand):
- MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 6)
Containerfile:67
--------------------66 | 67 | >>> RUN apt-get install -y --no-install-recommends lsb-release gpg \ 68 | >>> && wget https://apt.llvm.org/llvm.sh \ 69 | >>> && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} -n trixie \ 70 | >>> && apt-get remove -y lsb-release gnupg \ 71 | >>> && apt-get autoremove -y --purge \ 72 | >>> && apt-get clean \ 73 | >>> && rm -rf llvm.sh /var/lib/apt/lists/* 74 |--------------------
ERROR: failed to solve: process "/bin/sh-c apt-get install -y --no-install-recommends lsb-release gpg \t&& wget https://apt.llvm.org/llvm.sh \t&& chmod +xllvm.sh&& ./llvm.sh ${LLVM_VERSION} -n trixie \t&& apt-get remove -y lsb-release gnupg \t&& apt-get autoremove -y --purge \t&& apt-get clean \t&&
rm -rfllvm.sh/var/lib/apt/lists/*" did not complete successfully: exit code: 100Signed-off-by Chali Anis <[email protected]>--- test/Containerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)test/Containerfile +1
-3@@ -56,9 +56,7 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme device-tree-compiler \ u-boot-tools \ yamllint \ - yq \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + yq ENV GCC_VERSION=15.2.0 ENV LLVM_VERSION=20
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 |