2025-01-21 01:17:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
BUILDROOT="${BUILDROOT:-$RISCV/buildroot}"
|
|
|
|
IMAGES="$BUILDROOT"/output/images
|
2025-01-21 03:16:55 +00:00
|
|
|
|
|
|
|
if [[ "$1" == "--gdb" && -n "$2" ]]; then
|
|
|
|
GDB_FLAG="-gdb tcp::$2 -S"
|
|
|
|
fi
|
|
|
|
|
2025-01-21 01:17:43 +00:00
|
|
|
qemu-system-riscv64 \
|
|
|
|
-M virt -m 256M -nographic \
|
|
|
|
-bios "$IMAGES"/fw_jump.bin \
|
|
|
|
-kernel "$IMAGES"/Image \
|
|
|
|
-initrd "$IMAGES"/rootfs.cpio \
|
|
|
|
-dtb "$IMAGES"/wally-virt.dtb \
|
2025-01-21 03:16:55 +00:00
|
|
|
-cpu rva22s64,zicond=true,zfa=true,zfh=true,zcb=true,zbc=true,zkn=true,sstc=true,svadu=true,svnapot=true \
|
|
|
|
$GDB_FLAG
|