From 05b86525bbcc897218502aa80ebc193e6111e1bd Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 5 Sep 2023 13:41:15 +0200 Subject: [PATCH] split code/vars builds for riscv --- edk2-build.fedora | 9 ++++++--- edk2.spec | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/edk2-build.fedora b/edk2-build.fedora index 7e714e8..ebebb16 100644 --- a/edk2-build.fedora +++ b/edk2-build.fedora @@ -196,9 +196,12 @@ conf = OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc arch = RISCV64 plat = RiscVVirtQemu dest = Fedora/riscv -cpy1 = FV/RISCV_VIRT.fd -cpy2 = FV/RISCV_VIRT.fd RISCV_VIRT.raw -pad1 = RISCV_VIRT.raw 32m +cpy1 = FV/RISCV_VIRT_CODE.fd +cpy2 = FV/RISCV_VIRT_CODE.fd RISCV_VIRT_CODE.raw +cpy3 = FV/RISCV_VIRT_VARS.fd +cpy4 = FV/RISCV_VIRT_VARS.fd RISCV_VIRT_VARS.raw +pad1 = RISCV_VIRT_CODE.raw 32m +pad2 = RISCV_VIRT_VARS.raw 32m ##################################################################### diff --git a/edk2.spec b/edk2.spec index d42a436..0a15745 100644 --- a/edk2.spec +++ b/edk2.spec @@ -426,6 +426,11 @@ done %if %{build_riscv64} ./edk2-build.py --config edk2-build.fedora --silent --release-date "$RELEASE_DATE" -m riscv ./edk2-build.py --config edk2-build.fedora.platforms --silent -m riscv +for raw in */riscv/*.raw; do + qcow2="${raw%.raw}.qcow2" + qemu-img convert -f raw -O qcow2 -o cluster_size=4096 -S 4096 "$raw" "$qcow2" + rm -f "$raw" +done %endif %install @@ -688,7 +693,7 @@ done %files riscv64 %common_files %{_datadir}/%{name}/riscv/*.fd -%{_datadir}/%{name}/riscv/*.raw +%{_datadir}/%{name}/riscv/*.qcow2 %files ext4 %common_files