diff --git a/src/boot.sh b/src/boot.sh index e3bcafb..2034a38 100644 --- a/src/boot.sh +++ b/src/boot.sh @@ -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" @@ -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 diff --git a/src/entry.sh b/src/entry.sh index 11d4373..99c28b3 100644 --- a/src/entry.sh +++ b/src/entry.sh @@ -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 diff --git a/src/install.sh b/src/install.sh index 0b9acdd..421361c 100644 --- a/src/install.sh +++ b/src/install.sh @@ -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