Skip to content

Instantly share code, notes, and snippets.

@Azkali
Created July 17, 2025 15:35
Show Gist options
  • Select an option

  • Save Azkali/4242cf1f16444865008db7b29692eea0 to your computer and use it in GitHub Desktop.

Select an option

Save Azkali/4242cf1f16444865008db7b29692eea0 to your computer and use it in GitHub Desktop.
HomeAssistant OS on L4T Fedora Nintendo Switch
#!/bin/bash
HAOS_VERSION=${HAOS_VERSION:-"16.0"}
if ! command -v qemu-system-aarch64 >/dev/null 2>&1
then
dnf in -y edk2-ovmf qemu-system-aarch64 seavgabios-bin
fi
if [[ ! -e haos_generic-aarch64-${HAOS_VERSION}.qcow2 ]]; then
wget https://github.com/home-assistant/operating-system/releases/download/${HAOS_VERSION}/haos_generic-aarch64-${HAOS_VERSION}.qcow2.xz
unxz haos_generic-aarch64-${HAOS_VERSION}.qcow2.xz
fi
if [[ ! -e .//flash0.img ]]; then
dd if=/dev/zero of=flash1.img bs=1M count=64
dd if=/dev/zero of=flash0.img bs=1M count=64
dd if=/usr/share/edk2/aarch64/QEMU_EFI.fd of=flash0.img conv=notrunc
fi
qemu-system-aarch64 \
-smp 2 \
-m 2G \
-M virt \
-cpu host \
-accel kvm \
-drive file=./flash0.img,format=raw,if=pflash \
-drive file=./flash1.img,format=raw,if=pflash \
-device qemu-xhci \
-device usb-kbd \
-device usb-tablet \
-drive file=./haos_generic-aarch64-${HAOS_VERSION}.qcow2,format=qcow2,if=none,id=drive0,cache=writeback \
-device virtio-blk,drive=drive0,bootindex=0 \
-device ramfb -device virtio-gpu-pci \
-netdev user,id=vnet,hostfwd=tcp::8123-:8123,hostfwd=tcp::22222-:22222 \
-device virtio-net-pci,netdev=vnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment