Update boot.sh

This commit is contained in:
Kroese 2024-02-02 18:19:21 +01:00 committed by GitHub
parent 14fa19b727
commit 2f51c2f148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,6 @@ set -Eeuo pipefail
: "${BIOS:=""}" # Bios file
: "${BOOT_MODE:="uefi"}" # Boot mode
SECURE=""
BOOT_OPTS=""
DIR="/usr/share/qemu"
@ -49,12 +48,7 @@ else
[ ! -f "$AAVMF/$VARS" ] && error "UEFI vars file ($AAVMF/$VARS) not found!" && exit 45
cp "$AAVMF/$VARS" "$DEST.vars"
fi
if [[ "${BOOT_MODE,,}" != "uefi" ]]; then
SECURE=",smm=on"
BOOT_OPTS="$BOOT_OPTS -global driver=cfi.pflash01,property=secure,value=on"
fi
BOOT_OPTS="$BOOT_OPTS -drive file=$DEST.rom,if=pflash,unit=0,format=raw,readonly=on"
BOOT_OPTS="$BOOT_OPTS -drive file=$DEST.vars,if=pflash,unit=1,format=raw"