25 lines
679 B
Bash
Executable File
25 lines
679 B
Bash
Executable File
#!/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
|