summaryrefslogtreecommitdiff
path: root/experiments/04_20251216_pkg_store/run_qemu.sh
blob: 3d688925484243fd2016916d3f45d723e826db5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env sh

QEMU_CMD="qemu-system-x86_64	                \
	-nographic                              \
	-m 1024M                                \
	-kernel linux_custom                    \
	-initrd initrd.cpio.gz                  \
	-append 'root=/dev/sda console=ttyS0'   \
	-virtfs local,path=./pkg_store,mount_tag=host0,readonly=on,security_model=passthrough,id=host0 \
	-append 'root=/dev/sda console=ttyS0'"

run_tmux() {
	tmux new-window                                         \
		-n "qemu-system"                                \
		sh -c "$QEMU_CMD"
}

case "$1" in
	t) run_tmux         	;;
	*) sh -c "$QEMU_CMD"	;;
esac