karlos/run-qemu.sh

17 lines
505 B
Bash
Executable file

#!/bin/sh
QEMU_OPTS=""
# ATA drive with EFI partition, incl. bootloader & kernel
QEMU_OPTS="$QEMU_OPTS -drive if=ide,format=raw,file=build/disk.img"
# SATA drive
QEMU_OPTS="$QEMU_OPTS -drive id=disk,format=raw,file=drive.img,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0,serial=DEADBEEF"
# VIRTIO drive
QEMU_OPTS="$QEMU_OPTS -drive file=drive-virtio.img,format=raw,if=virtio"
# Multicore
QEMU_OPTS="$QEMU_OPTS -smp sockets=1,cores=2,threads=1"
qemu-system-x86_64 $QEMU_OPTS "$@"