Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Change installation order #22

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ case "${BOOT_MODE,,}" in
;;
esac

BOOT_OPTS="$BOOT_OPTS -smbios type=2"
BOOT_OPTS="$BOOT_OPTS -rtc base=utc,base=localtime"
BOOT_OPTS="$BOOT_OPTS -global ICH9-LPC.disable_s3=1"
BOOT_OPTS="$BOOT_OPTS -global ICH9-LPC.disable_s4=1"
BOOT_OPTS="$BOOT_OPTS -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off"
BOOT_OPTS+=" -smbios type=2"
BOOT_OPTS+=" -rtc base=utc,base=localtime"
BOOT_OPTS+=" -global ICH9-LPC.disable_s3=1"
BOOT_OPTS+=" -global ICH9-LPC.disable_s4=1"
BOOT_OPTS+=" -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off"

osk=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')
BOOT_OPTS="$BOOT_OPTS -device isa-applesmc,osk=$osk"
BOOT_OPTS+=" -device isa-applesmc,osk=$osk"

# OVMF
BOOT_OPTS="$BOOT_OPTS -drive if=pflash,format=raw,readonly=on,file=$OVMF/$ROM"
BOOT_OPTS="$BOOT_OPTS -drive if=pflash,format=raw,file=$OVMF/$VARS"
BOOT_OPTS+=" -drive if=pflash,format=raw,readonly=on,file=$OVMF/$ROM"
BOOT_OPTS+=" -drive if=pflash,format=raw,file=$OVMF/$VARS"

# OpenCoreBoot
DISK_OPTS="$DISK_OPTS -device virtio-blk-pci,drive=${BOOT_DRIVE_ID},scsi=off,bus=pcie.0,addr=0x5,iothread=io2,bootindex=1"
DISK_OPTS="$DISK_OPTS -drive file=$BOOT_DRIVE,id=$BOOT_DRIVE_ID,format=qcow2,cache=$DISK_CACHE,aio=$DISK_IO,readonly=on,if=none"
DISK_OPTS+=" -device virtio-blk-pci,drive=${BOOT_DRIVE_ID},scsi=off,bus=pcie.0,addr=0x5,iothread=io2,bootindex=1"
DISK_OPTS+=" -drive file=$BOOT_DRIVE,id=$BOOT_DRIVE_ID,format=qcow2,cache=$DISK_CACHE,aio=$DISK_IO,readonly=on,if=none"

CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}')
CPU_FLAGS="vendor=GenuineIntel,vmware-cpuid-freq=on,-pdpe1gb"
Expand All @@ -59,7 +59,7 @@ if [[ "$CPU_VENDOR" != "GenuineIntel" ]]; then
fi

USB="nec-usb-xhci,id=xhci"
USB="$USB -device usb-kbd,bus=xhci.0"
USB="$USB -global nec-usb-xhci.msi=off"
USB+=" -device usb-kbd,bus=xhci.0"
USB+=" -global nec-usb-xhci.msi=off"

return 0
2 changes: 1 addition & 1 deletion src/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ SUPPORT="https://github.com/dockur/macos"
cd /run

. reset.sh # Initialize system
. disk.sh # Initialize disks
. install.sh # Get the OSX images
. disk.sh # Initialize disks
. display.sh # Initialize graphics
. network.sh # Initialize network
. boot.sh # Configure boot
Expand Down
4 changes: 2 additions & 2 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ "$VERSION" != "$STORED_VERSION" ]; then
fi
fi

DISK_OPTS="$DISK_OPTS -device virtio-blk-pci,drive=${BASE_IMG_ID},scsi=off,bus=pcie.0,addr=0x6,iothread=io2"
DISK_OPTS="$DISK_OPTS -drive file=$BASE_IMG,id=$BASE_IMG_ID,format=dmg,cache=$DISK_CACHE,aio=$DISK_IO,readonly=on,if=none"
DISK_OPTS="-device virtio-blk-pci,drive=${BASE_IMG_ID},scsi=off,bus=pcie.0,addr=0x6,iothread=io2"
DISK_OPTS+=" -drive file=$BASE_IMG,id=$BASE_IMG_ID,format=dmg,cache=$DISK_CACHE,aio=$DISK_IO,readonly=on,if=none"

return 0