updated with x86_64 support
This commit is contained in:
parent
33eb9fa761
commit
d76f401595
1 changed files with 31 additions and 3 deletions
|
@ -1,14 +1,23 @@
|
|||
#!/bin/bash
|
||||
if [ ! -f $HOME/.guix/qemu/guix-user.qcow2 ]
|
||||
if [ ! -f $HOME/.guix/qemu/guix-user.qcow2 ] && [ $(uname -m) == 'arm64' ]
|
||||
then
|
||||
/opt/homebrew/bin/wget https://objectstorage.us-phoenix-1.oraclecloud.com/n/axfgkze2xif1/b/guix-system/o/msg-system-aarch64guix-user.qcow2.tar.gz -O $HOME/.guix/qemu/guix.qcow2.tar.gz
|
||||
tar -xvzf $HOME/.guix/qemu/guix.qcow2.tar.gz -C $HOME/.guix/qemu/
|
||||
fi
|
||||
|
||||
if [ ! -f $HOME/.guix/qemu/guix-user.qcow2 ] && [ $(uname -m) == 'x86_64' ]
|
||||
then
|
||||
/usr/local/bin/wget https://objectstorage.us-phoenix-1.oraclecloud.com/n/axfgkze2xif1/b/guix-system/o/msg-system-x86_64guix-user-x86.qcow2.tar.gz -O $HOME/.guix/qemu/guix.qcow2.tar.gz
|
||||
tar -xvzf $HOME/.guix/qemu/guix.qcow2.tar.gz -C $HOME/.guix/qemu/
|
||||
|
||||
fi
|
||||
|
||||
chmod 700 $HOME/.guix/ssh-cert/msg_rsa
|
||||
|
||||
echo "GUIX is now running"
|
||||
|
||||
if [[ $(uname -m) == 'arm64' ]]
|
||||
then
|
||||
/opt/homebrew/bin/qemu-system-aarch64 \
|
||||
-machine virt,highmem=on \
|
||||
-accel hvf \
|
||||
|
@ -22,4 +31,23 @@ echo "GUIX is now running"
|
|||
-device virtio-net,netdev=vmnic \
|
||||
-netdev user,id=vmnic,hostfwd=tcp:127.0.0.1:9001-:22 \
|
||||
&& exit
|
||||
fi
|
||||
|
||||
if [[ $(uname -m) == 'x86_64' ]]
|
||||
then
|
||||
/usr/local/bin/qemu-system-x86_64 \
|
||||
-machine type=q35,accel=hvf \
|
||||
-smp 4 \
|
||||
-hda $HOME/.guix/qemu/guix-user.qcow2 \
|
||||
-m 4G \
|
||||
-display none \
|
||||
-cpu Nehalem \
|
||||
-virtfs local,path=$HOME/.guix,security_model=mapped,mount_tag=macos \
|
||||
-device virtio-net,netdev=vmnic \
|
||||
-netdev user,id=vmnic,hostfwd=tcp:127.0.0.1:9001-:22 \
|
||||
&& exit
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue