From 79081dd5817661665c2591d2c9760f2927ab0fc1 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 17 May 2023 12:01:54 +0200 Subject: [PATCH] drop /ovmf-4m/, move 4M builds to /ovmf/ instead --- 30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json | 4 ++-- 40-edk2-ovmf-4m-qcow2-x64-sb.json | 4 ++-- 50-edk2-ovmf-4m-qcow2-x64-nosb.json | 4 ++-- edk2-build.fedora | 10 +++++----- edk2.spec | 23 +++++++++++----------- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json b/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json index 8a4a351..e709223 100644 --- a/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json +++ b/30-edk2-ovmf-4m-qcow2-x64-sb-enrolled.json @@ -7,11 +7,11 @@ "device": "flash", "mode" : "split", "executable": { - "filename": "/usr/share/edk2/ovmf-4m/OVMF_CODE.secboot.qcow2", + "filename": "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2", "format": "qcow2" }, "nvram-template": { - "filename": "/usr/share/edk2/ovmf-4m/OVMF_VARS.secboot.qcow2", + "filename": "/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2", "format": "qcow2" } }, diff --git a/40-edk2-ovmf-4m-qcow2-x64-sb.json b/40-edk2-ovmf-4m-qcow2-x64-sb.json index 25f2ecc..655dd42 100644 --- a/40-edk2-ovmf-4m-qcow2-x64-sb.json +++ b/40-edk2-ovmf-4m-qcow2-x64-sb.json @@ -7,11 +7,11 @@ "device": "flash", "mode" : "split", "executable": { - "filename": "/usr/share/edk2/ovmf-4m/OVMF_CODE.secboot.qcow2", + "filename": "/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2", "format": "qcow2" }, "nvram-template": { - "filename": "/usr/share/edk2/ovmf-4m/OVMF_VARS.qcow2", + "filename": "/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2", "format": "qcow2" } }, diff --git a/50-edk2-ovmf-4m-qcow2-x64-nosb.json b/50-edk2-ovmf-4m-qcow2-x64-nosb.json index eace752..d64735f 100644 --- a/50-edk2-ovmf-4m-qcow2-x64-nosb.json +++ b/50-edk2-ovmf-4m-qcow2-x64-nosb.json @@ -7,11 +7,11 @@ "device": "flash", "mode" : "split", "executable": { - "filename": "/usr/share/edk2/ovmf-4m/OVMF_CODE.qcow2", + "filename": "/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2", "format": "qcow2" }, "nvram-template": { - "filename": "/usr/share/edk2/ovmf-4m/OVMF_VARS.qcow2", + "filename": "/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2", "format": "qcow2" } }, diff --git a/edk2-build.fedora b/edk2-build.fedora index ccbd4e5..76ac0a5 100644 --- a/edk2-build.fedora +++ b/edk2-build.fedora @@ -71,9 +71,9 @@ arch = X64 opts = ovmf.common ovmf.4m plat = OvmfX64 -dest = Fedora/ovmf-4m -cpy1 = FV/OVMF_CODE.fd -cpy2 = FV/OVMF_VARS.fd +dest = Fedora/ovmf +cpy1 = FV/OVMF_CODE.fd OVMF_CODE_4M.fd +cpy2 = FV/OVMF_VARS.fd OVMF_VARS_4M.fd [build.ovmf.2m.sb.smm] desc = ovmf build (32/64-bit, 2MB, q35 only, needs smm, secure boot) @@ -95,8 +95,8 @@ opts = ovmf.common ovmf.4m ovmf.sb.smm plat = Ovmf3264 -dest = Fedora/ovmf-4m -cpy1 = FV/OVMF_CODE.fd OVMF_CODE.secboot.fd +dest = Fedora/ovmf +cpy1 = FV/OVMF_CODE.fd OVMF_CODE_4M.secboot.fd ##################################################################### diff --git a/edk2.spec b/edk2.spec index 5b685ea..55aca0b 100644 --- a/edk2.spec +++ b/edk2.spec @@ -362,8 +362,8 @@ virt-fw-vars --input Fedora/ovmf/OVMF_VARS.fd \ --output Fedora/ovmf/OVMF_VARS.secboot.fd \ --set-dbx DBXUpdate-%{DBXDATE}.x64.bin \ --enroll-redhat --secure-boot -virt-fw-vars --input Fedora/ovmf-4m/OVMF_VARS.fd \ - --output Fedora/ovmf-4m/OVMF_VARS.secboot.fd \ +virt-fw-vars --input Fedora/ovmf/OVMF_VARS_4M.fd \ + --output Fedora/ovmf/OVMF_VARS_4M.secboot.fd \ --set-dbx DBXUpdate-%{DBXDATE}.x64.bin \ --enroll-redhat --secure-boot virt-fw-vars --input Fedora/ovmf-ia32/OVMF_VARS.fd \ @@ -373,7 +373,7 @@ virt-fw-vars --input Fedora/ovmf-ia32/OVMF_VARS.fd \ build_iso Fedora/ovmf build_iso Fedora/ovmf-ia32 -for raw in */ovmf-4m/*.fd; do +for raw in */ovmf/*_4M*.fd; do qcow2="${raw%.fd}.qcow2" qemu-img convert -f raw -O qcow2 -o cluster_size=4096 -S 4096 "$raw" "$qcow2" rm -f "$raw" @@ -387,10 +387,13 @@ virt-fw-vars --input Fedora/experimental/OVMF.stateless.fd \ for image in \ Fedora/ovmf/OVMF_CODE.secboot.fd \ - Fedora/ovmf-4m/OVMF_CODE.secboot.qcow2 \ + Fedora/ovmf/OVMF_CODE_4M.secboot.qcow2 \ Fedora/experimental/OVMF.stateless.secboot.fd \ ; do - pcr="${image%.fd}.pcr" + pcr="${image}" + pcr="${pcr%.fd}" + pcr="${pcr%.qcow2}" + pcr="${pcr}.pcr" python3 /usr/share/doc/python3-virt-firmware/experimental/measure.py \ --image "$image" \ --version "%{name}-%{version}-%{release}" \ @@ -578,13 +581,11 @@ done %if %{defined fedora} %{_datadir}/%{name}/ovmf/MICROVM.fd %{_datadir}/qemu/firmware/50-edk2-ovmf-x64-microvm.json -%dir %{_datadir}/%{name}/ovmf-4m/ -%{_datadir}/%{name}/ovmf-4m/OVMF_CODE.qcow2 -%{_datadir}/%{name}/ovmf-4m/OVMF_CODE.secboot.qcow2 -%{_datadir}/%{name}/ovmf-4m/OVMF_VARS.qcow2 -%{_datadir}/%{name}/ovmf-4m/OVMF_VARS.secboot.qcow2 +%{_datadir}/%{name}/ovmf/OVMF_CODE_4M.qcow2 +%{_datadir}/%{name}/ovmf/OVMF_CODE_4M.secboot.qcow2 +%{_datadir}/%{name}/ovmf/OVMF_VARS_4M.qcow2 +%{_datadir}/%{name}/ovmf/OVMF_VARS_4M.secboot.qcow2 %{_datadir}/%{name}/ovmf/*.pcr -%{_datadir}/%{name}/ovmf-4m/*.pcr %endif # endif build_ovmf %endif