-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathqemu-run.sh
More file actions
executable file
·34 lines (29 loc) · 884 Bytes
/
qemu-run.sh
File metadata and controls
executable file
·34 lines (29 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/bash
# Fix the paths if necessary
HDA="-drive file=arch_aarch64.qcow2,format=qcow2"
KERNELSRC=../linux/
KERNEL="${KERNELSRC}/arch/arm64/boot/Image.gz"
# KDB=1
if [ -z ${KDB} ]; then
CMDLINE='root=/dev/vda2 rw console=ttyAMA0 kgdboc=ttyS0'
else
CMDLINE='root=/dev/vda2 rw console=ttyAMA0 kgdboc=ttyS0 kgdbwait'
fi
SHARED="./share"
VIRTFS+=" --virtfs local,path=${SHARED},mount_tag=share,security_model=passthrough,id=share "
qemu-system-aarch64 \
-nodefaults \
-nographic \
-vga none \
-cpu max \
-machine virt \
-m 1024 \
${HDA} \
${VIRTFS} \
-chardev stdio,mux=on,id=char0 \
-chardev socket,path=/tmp/qemu_socket.sock,server=on,wait=off,id=gnc0 \
-mon chardev=char0,mode=readline \
-serial chardev:char0 \
-device pci-serial,id=serial0,chardev=gnc0 \
-kernel "${KERNEL}" \
-append "${CMDLINE} "