Skip to content

Commit

Permalink
feat: Support older Windows versions (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Jan 25, 2024
1 parent 888b4a1 commit 45bfb26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ case "${BOOT_MODE,,}" in
ROM="OVMF_CODE_4M.ms.fd"
VARS="OVMF_VARS_4M.ms.fd"
;;
windows_legacy)
BOOT_OPTS=""
;;
legacy)
BOOT_OPTS=""
;;
Expand All @@ -30,9 +33,8 @@ case "${BOOT_MODE,,}" in
;;
esac

if [[ "${BOOT_MODE,,}" != "legacy" ]]; then
if [[ "${BOOT_MODE,,}" != "legacy" ]] && [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then

BOOT_OPTS=""
OVMF="/usr/share/OVMF"
DEST="$STORAGE/${BOOT_MODE,,}"

Expand Down
2 changes: 1 addition & 1 deletion src/proc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [[ "$KVM" != [Nn]* ]]; then
CPU_FEATURES="kvm=on"
KVM_OPTS=",accel=kvm -enable-kvm"

if [[ "${BOOT_MODE,,}" == "windows" ]]; then
if [[ "${BOOT_MODE,,}" == "windows" ]] || [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then

CPU_FEATURES="kvm=on,+hypervisor,+invtsc,l3-cache=on,migratable=no,hv_passthrough"

Expand Down

0 comments on commit 45bfb26

Please sign in to comment.