blob: 07c4562f4a224f11029182eebee0b5da060ec941 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
pwd="/home/zy/Git/variable_monitor"
box=/home/zy/qemu_uintr/initramfs/initramfs-busybox-x86_64.cpio.gz
busybox=$pwd/miniroot/busybox.cpio.gz
ubuntu=$pwd/miniroot/ubuntu.cpio.gz
PORT=2222
QEMU=qemu-system-x86_64
KERNEL=$pwd/linux-5.17.15/arch/x86_64/boot/bzImage
$QEMU -smp 4 \
-machine q35,kernel_irqchip=split \
-m 4096M -nographic -cpu qemu64 \
-kernel $KERNEL \
-initrd $ubuntu \
-append "root=/dev/ram0 rw rootfstype=ext4 console=ttyS0 init=/linuxrc" \
-net user,hostfwd=tcp::${PORT}-:22 -net nic,model=e1000e \
-serial mon:stdio \
-virtfs local,path=$pwd/build,mount_tag=test,security_model=passthrough,id=test \
-s -S
# -D none
# 等待gdb连接
# -s -S
|