From 03e6a72d2b247bbf0d9ca527418f01c62958b629 Mon Sep 17 00:00:00 2001 From: Kamen Tomov <7019247-kam_n@users.noreply.gitlab.com> Date: Thu, 23 Dec 2021 11:06:41 +0200 Subject: [PATCH] Fixes for NixOS and for better handling --- basic.sh | 12 +++++++----- firmware/OVMF_VARS-1024x768.fd | Bin 540672 -> 540672 bytes jumpstart.sh | 4 ++-- make.sh | 2 +- tools/FetchMacOS/fetch.sh | 2 +- tools/template.xml.in | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/basic.sh b/basic.sh index add14b5..db1accb 100755 --- a/basic.sh +++ b/basic.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -VMDIR=$PWD +VMDIR=$(realpath $(dirname $0)) OVMF=$VMDIR/firmware #export QEMU_AUDIO_DRV=pa #QEMU_AUDIO_DRV=pa @@ -18,11 +18,13 @@ qemu-system-x86_64 \ -drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \ -vga qxl \ -device ich9-intel-hda -device hda-output \ - -usb -device usb-kbd -device usb-mouse \ + -usb -device usb-kbd -device usb-tablet \ -netdev user,id=net0 \ -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ -device ich9-ahci,id=sata \ - -drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \ + -drive id=ESP,if=none,format=qcow2,file="${VMDIR}/ESP.qcow2" \ -device ide-hd,bus=sata.2,drive=ESP \ - -drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \ + -drive id=InstallMedia,format=raw,if=none,file="${VMDIR}/BaseSystem.img" \ -device ide-hd,bus=sata.3,drive=InstallMedia \ + -drive id=SystemDisk,if=none,file="${VMDIR}/MyDisk.qcow2" \ + -device ide-hd,bus=sata.4,drive=SystemDisk diff --git a/firmware/OVMF_VARS-1024x768.fd b/firmware/OVMF_VARS-1024x768.fd index 76f536bad02e397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DnW>(4L0EtQr9U$`Bt zQavk{s5>f6hUph3)KeuD>XADt)GcLo>dgC%bMiA%5jdmfN-kHYcpqA$lgpRQdk_P_ zh|X9m)Sb*m7|>2V4cBPTHNuv{KiVEI))*sP{B=3%mrNLIw2NrJi1u@d?M1YoO-~&T z#_Eu)JT8kIi&Al##d+Dm;dYWGMLREWvLIfNo&Mj@K9uKFgF02Q)})gIL%dqrT6pg_ z8}O8?7<#)`UAnfYaC>3VI#pf`gL%Rd@ow{+UzknAzX2=IiUj}w delta 206 zcmZo@P;3CAEsSxqC$}*vZEu*(=%q6K+A~JA?H~3t9%2RwPJR%$XZwUBjEfk-ybFsC zOuq2hV7kL8MwaOXj7(mW_w`s!e$Z_*xxk`edVvI^#`Faz7{jKwaWg4R|L~46V|v3$ z#w;**azmiebh}fGJYa(wl+`BxGPjz%Aao5#o5J)n=NLJ*FF4H@!~~X~AfdphJKga= rqxy6O3C04Dv`Bj)KNAo$Z*SmdQgCb&U}+OzZ4+Q?6JTE^z+nIYm)=f4 diff --git a/jumpstart.sh b/jumpstart.sh index 1b8756e..28c2d88 100755 --- a/jumpstart.sh +++ b/jumpstart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # jumpstart.sh: Fetches BaseSystem and converts it to a viable format. # by Foxlet @@ -36,4 +36,4 @@ case $argument in ;; esac -"$TOOLS/dmg2img" "$TOOLS/FetchMacOS/BaseSystem/BaseSystem.dmg" "$PWD/BaseSystem.img" +dmg2img "$TOOLS/FetchMacOS/BaseSystem/BaseSystem.dmg" "$PWD/BaseSystem.img" diff --git a/make.sh b/make.sh index 8495561..df6567c 100755 --- a/make.sh +++ b/make.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # make.sh: Generate customized libvirt XML. # by Foxlet diff --git a/tools/FetchMacOS/fetch.sh b/tools/FetchMacOS/fetch.sh index df76311..df5c8de 100755 --- a/tools/FetchMacOS/fetch.sh +++ b/tools/FetchMacOS/fetch.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # fetch.sh: Run fetch-macos.py with safety checks # by Foxlet diff --git a/tools/template.xml.in b/tools/template.xml.in index 321552f..2d89087 100644 --- a/tools/template.xml.in +++ b/tools/template.xml.in @@ -31,7 +31,7 @@ - /usr/bin/qemu-system-x86_64 + /run/current-system/sw/bin/qemu-system-x86_64