1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-17 03:06:12 +02:00
build/pkg/release-qemu/runqemu.sh
David Oberhollenzer c16ff53c14 Remove overlay partition setup from release shell scripts
The initial ram disk does that for us (with the propper permissions
in the case of Qemu).

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-11 19:02:11 +02:00

25 lines
647 B
Bash
Executable file

#!/bin/sh
SCRIPTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
BOOT="$SCRIPTDIR/bootfs"
OVERLAY="$SCRIPTDIR/overlay"
KERNEL=$(cat "$BOOT/kernel.txt")
CMDLINE=$(cat "$BOOT/cmdline.txt")
RAM="256M"
MAC0="52:54:00:12:34:56"
mkdir -p ${OVERLAY}
qemu-system-x86_64 \
-drive "file=fat:rw:$BOOT,readonly=off,format=raw,if=virtio" \
-m "$RAM" -accel kvm -cpu host \
-vga virtio -display sdl \
-netdev user,id=netdev0 \
-device virtio-net-pci,netdev=netdev0,mac="$MAC0" \
-fsdev "local,id=overlay,path=$OVERLAY,security_model=mapped" \
-device "virtio-9p-pci,fsdev=overlay,mount_tag=overlay" \
-kernel "$BOOT/$KERNEL" -append "$CMDLINE"