scripts/run_archiso.sh: use 4 MiB OVMF files

Use `OVMF_CODE.4m.fd` and `OVMF_VARS.4m.fd` instead of the old 2 MiB
`OVMF_CODE.fd` and `OVMF_VARS.fd`.
This commit is contained in:
nl6720 2024-05-06 17:14:10 +03:00
parent e567a2ab26
commit 2febfabd6c
No known key found for this signature in database
GPG key ID: 6B5387E670A955AD
2 changed files with 7 additions and 6 deletions

View file

@ -13,6 +13,7 @@ Changed
- Moved the ``pkglist.x86_64.txt`` file outside the bootstrap tarball's ``root.x86_64`` directly to avoid polluting the - Moved the ``pkglist.x86_64.txt`` file outside the bootstrap tarball's ``root.x86_64`` directly to avoid polluting the
root file system. root file system.
- Use 4 MiB OVMF files in ``run_archiso`` instead of the old 2 MiB ones.
Deprecated Deprecated
---------- ----------

View file

@ -44,11 +44,11 @@ cleanup_working_dir() {
} }
copy_ovmf_vars() { copy_ovmf_vars() {
if [[ ! -f '/usr/share/edk2-ovmf/x64/OVMF_VARS.fd' ]]; then if [[ ! -f '/usr/share/edk2/x64/OVMF_VARS.4m.fd' ]]; then
printf 'ERROR: %s\n' "OVMF_VARS.fd not found. Install edk2-ovmf." printf 'ERROR: %s\n' "OVMF_VARS.4m.fd not found. Install edk2-ovmf."
exit 1 exit 1
fi fi
cp -av -- '/usr/share/edk2-ovmf/x64/OVMF_VARS.fd' "${working_dir}/" cp -av -- '/usr/share/edk2/x64/OVMF_VARS.4m.fd' "${working_dir}/"
} }
check_image() { check_image() {
@ -67,13 +67,13 @@ run_image() {
copy_ovmf_vars copy_ovmf_vars
if [[ "${secure_boot}" == 'on' ]]; then if [[ "${secure_boot}" == 'on' ]]; then
printf '%s\n' 'Using Secure Boot' printf '%s\n' 'Using Secure Boot'
local ovmf_code='/usr/share/edk2-ovmf/x64/OVMF_CODE.secboot.fd' local ovmf_code='/usr/share/edk2/x64/OVMF_CODE.secboot.4m.fd'
else else
local ovmf_code='/usr/share/edk2-ovmf/x64/OVMF_CODE.fd' local ovmf_code='/usr/share/edk2/x64/OVMF_CODE.4m.fd'
fi fi
qemu_options+=( qemu_options+=(
'-drive' "if=pflash,format=raw,unit=0,file=${ovmf_code},read-only=on" '-drive' "if=pflash,format=raw,unit=0,file=${ovmf_code},read-only=on"
'-drive' "if=pflash,format=raw,unit=1,file=${working_dir}/OVMF_VARS.fd" '-drive' "if=pflash,format=raw,unit=1,file=${working_dir}/OVMF_VARS.4m.fd"
'-global' "driver=cfi.pflash01,property=secure,value=${secure_boot}" '-global' "driver=cfi.pflash01,property=secure,value=${secure_boot}"
) )
fi fi