Update boot.sh

This commit is contained in:
Kroese 2025-03-14 20:20:40 +01:00 committed by GitHub
parent 1c7b2798a1
commit 5dc0a95e79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,23 +2,17 @@
set -Eeuo pipefail
# Docker environment variables
: "${BIOS:=""}" # BIOS file
: "${BIOS:=""}" # BIOS file
: "${SMM:="N"}" # Disable SMM
BOOT_DESC=""
BOOT_OPTS=""
SECURE="off"
BOOT_OPTS=""
BOOT_DESC=""
if [ -n "$BIOS" ]; then
BOOT_MODE="custom"
BOOT_OPTS="-bios $BIOS"
BOOT_DESC=" with custom BIOS file"
return 0
fi
[[ "$SMM" == [Yy1]* ]] && SECURE="on"
[ -n "$BIOS" ] && BOOT_MODE="custom"
case "${BOOT_MODE,,}" in
"legacy" )
BOOT_DESC=" with SeaBIOS"
;;
"uefi" | "" )
BOOT_MODE="uefi"
ROM="AAVMF_CODE.no-secboot.fd"
@ -42,6 +36,13 @@ case "${BOOT_MODE,,}" in
VARS="AAVMF_VARS.ms.fd"
BOOT_OPTS="-rtc base=localtime"
;;
"legacy" )
BOOT_DESC=" with SeaBIOS"
;;
"custom" )
BOOT_OPTS="-bios $BIOS"
BOOT_DESC=" with custom BIOS file"
;;
*)
error "Unknown BOOT_MODE, value \"${BOOT_MODE}\" is not recognized!"
exit 33