grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/9] grub-shell: Support Fedora path for ovmf32


From: Vladimir Serbinenko
Subject: [PATCH 2/9] grub-shell: Support Fedora path for ovmf32
Date: Wed, 11 Sep 2024 12:37:28 +0300

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 tests/util/grub-shell.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index 04405a789..e79296ccd 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -192,6 +192,11 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" 
in
            if [ -f "$pflash_vars" ]; then
                qemuopts="-drive 
if=pflash,format=raw,unit=1,snapshot=on,file=$pflash_vars $qemuopts"
            fi
+        elif [ -f /usr/share/edk2/ovmf-ia32/OVMF_CODE.fd ]; then
+           pflash_code=/usr/share/edk2/ovmf-ia32/OVMF_CODE.secboot.fd
+           pflash_vars=/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd
+           qemuopts="-drive 
if=pflash,format=raw,unit=0,readonly=on,file=$pflash_code $qemuopts"
+           qemuopts="-drive 
if=pflash,format=raw,unit=1,snapshot=on,file=$pflash_vars $qemuopts"
        else
            pflash=/usr/share/qemu/OVMF32.fd
            pflash_code=/usr/share/OVMF/OVMF32_CODE_4M.secboot.fd
@@ -202,7 +207,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" 
in
                qemuopts="-drive 
if=pflash,format=raw,unit=0,readonly=on,file=$pflash_code $qemuopts"
                qemuopts="-drive 
if=pflash,format=raw,unit=1,snapshot=on,file=$pflash_vars $qemuopts"
            else
-               echo "Firmware not found, please install either the appropriate 
Debian package or an appropriately named copy in the source directory." >&2
+               echo "Firmware not found, please install either the appropriate 
Debian or Fedora package or an appropriately named copy in the source 
directory." >&2
                exit 1
            fi
        fi
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]