[PATCH 5/5] test: don't hardcode origin of OVMF.fd

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jun 19 02:52:40 PDT 2023


Labgrid will look up the bios key in images, so we had an ugly
workaround of the "runner" (test/emulate.pl or script running in CI)
"downloading" /usr/share/qemu/OVMF.fd into the build directory and
referencing that.

Qemu already has a search path for BIOS images (controllable by -L),
where OVMF.fd, which would already point at /usr/share/qemu on Debian,
so let's make use of this by passing literal -bios OVMF.fd without
involving Labgrid automagic.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 .github/workflows/test-labgrid-pytest.yml | 4 ----
 test/x86/pc at efi_defconfig.yaml            | 6 +-----
 test/x86/q35 at efi_defconfig.yaml           | 6 +-----
 test/x86/virtio at efi_defconfig.yaml        | 6 +-----
 4 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/.github/workflows/test-labgrid-pytest.yml b/.github/workflows/test-labgrid-pytest.yml
index efbb51181b18..0f34f43e8dff 100644
--- a/.github/workflows/test-labgrid-pytest.yml
+++ b/.github/workflows/test-labgrid-pytest.yml
@@ -56,10 +56,6 @@ jobs:
         ./MAKEALL -O build-${{matrix.arch}} -k test/kconfig/enable_self_test.kconf \
                 -k test/kconfig/disable_target_tools.kconf ${{matrix.defconfig}}
 
-        if [ ${{matrix.arch}} = "x86" ]; then
-          cp /usr/share/ovmf/OVMF.fd build-${{matrix.arch}}
-        fi
-
         if [ ${{matrix.arch}} = "riscv" ]; then
           cp /usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.bin build-${{matrix.arch}}
         fi
diff --git a/test/x86/pc at efi_defconfig.yaml b/test/x86/pc at efi_defconfig.yaml
index e818409703f8..ae06fbf69744 100644
--- a/test/x86/pc at efi_defconfig.yaml
+++ b/test/x86/pc at efi_defconfig.yaml
@@ -7,8 +7,7 @@ targets:
         cpu: Nehalem
         memory: 1024M
         kernel: barebox.efi
-        bios: OVMF.fd
-        extra_args: ''
+        extra_args: '-bios OVMF.fd'
       BareboxDriver:
         prompt: 'barebox@[^:]+:[^ ]+ '
         bootstring: 'commandline:'
@@ -20,10 +19,7 @@ targets:
       kconfig_add:
         - CONFIG_DRIVER_SERIAL_NS16550=y
         - CONFIG_CONSOLE_ACTIVATE_FIRST=y # avoid duplicate output
-      download:
-        OVMF.fd: /usr/share/qemu/OVMF.fd
 images:
   barebox.efi: !template "$LG_BUILDDIR/barebox.efi"
-  OVMF.fd: !template "$LG_BUILDDIR/OVMF.fd"
 imports:
   -  ../strategy.py
diff --git a/test/x86/q35 at efi_defconfig.yaml b/test/x86/q35 at efi_defconfig.yaml
index 71c44e8cd45f..578a3654fe9b 100644
--- a/test/x86/q35 at efi_defconfig.yaml
+++ b/test/x86/q35 at efi_defconfig.yaml
@@ -7,8 +7,7 @@ targets:
         cpu: Nehalem
         memory: 1024M
         kernel: barebox.efi
-        bios: OVMF.fd
-        extra_args: -global ICH9-LPC.noreboot=false
+        extra_args: '-bios OVMF.fd -global ICH9-LPC.noreboot=false'
       BareboxDriver:
         prompt: 'barebox@[^:]+:[^ ]+ '
         bootstring: 'commandline:'
@@ -20,10 +19,7 @@ targets:
       kconfig_add:
         - CONFIG_DRIVER_SERIAL_NS16550=y
         - CONFIG_CONSOLE_ACTIVATE_FIRST=y # avoid duplicate output
-      download:
-        OVMF.fd: /usr/share/qemu/OVMF.fd
 images:
   barebox.efi: !template "$LG_BUILDDIR/barebox.efi"
-  OVMF.fd: !template "$LG_BUILDDIR/OVMF.fd"
 imports:
   -  ../strategy.py
diff --git a/test/x86/virtio at efi_defconfig.yaml b/test/x86/virtio at efi_defconfig.yaml
index 389089363872..83340d19ddef 100644
--- a/test/x86/virtio at efi_defconfig.yaml
+++ b/test/x86/virtio at efi_defconfig.yaml
@@ -7,8 +7,7 @@ targets:
         cpu: Nehalem
         memory: 1024M
         kernel: barebox.efi
-        bios: OVMF.fd
-        extra_args: ''
+        extra_args: '-bios OVMF.fd'
       BareboxDriver:
         prompt: 'barebox@[^:]+:[^ ]+ '
         bootstring: 'commandline:'
@@ -21,10 +20,7 @@ targets:
         - test/kconfig/virtio-pci.cfg
         - CONFIG_DRIVER_SERIAL_NS16550=y
         - CONFIG_CONSOLE_ACTIVATE_FIRST=y # avoid duplicate output
-      download:
-        OVMF.fd: /usr/share/qemu/OVMF.fd
 images:
   barebox.efi: !template "$LG_BUILDDIR/barebox.efi"
-  OVMF.fd: !template "$LG_BUILDDIR/OVMF.fd"
 imports:
   -  ../strategy.py
-- 
2.39.2




More information about the barebox mailing list