Skip to content

Commit

Permalink
feat: Change installation order (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Jun 5, 2024
1 parent 8bf8242 commit 2b01199
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
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

0 comments on commit 2b01199

Please sign in to comment.