Update boot.sh
This commit is contained in:
parent
1c7b2798a1
commit
5dc0a95e79
1 changed files with 14 additions and 13 deletions
25
src/boot.sh
25
src/boot.sh
|
@ -3,22 +3,16 @@ set -Eeuo pipefail
|
|||
|
||||
# Docker environment variables
|
||||
: "${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
|
||||
|
|
Loading…
Reference in a new issue