2021-06-10 13:58:20 +00:00
|
|
|
# =========== Debug the Process ==========
|
|
|
|
# Uncomment this version for GDB/QEMU debugging
|
|
|
|
# - Opens up GDB interactively
|
|
|
|
# - Logs raw QEMU output to qemu_output.txt
|
2021-06-17 04:50:02 +00:00
|
|
|
#(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2> qemu_output.txt) & riscv64-unknown-elf-gdb
|
2021-06-10 13:58:20 +00:00
|
|
|
|
|
|
|
# Uncomment this version to generate qemu_output.txt
|
|
|
|
# - Uses GDB script
|
|
|
|
# - Logs raw QEMU output to qemu_output.txt
|
2021-06-17 04:50:02 +00:00
|
|
|
#(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2>qemu_output.txt) & riscv64-unknown-elf-gdb -x gdbinit_qemulog_debug
|
2021-06-10 13:58:20 +00:00
|
|
|
|
|
|
|
# Uncomment this version for parse_qemu.py debugging
|
|
|
|
# - Uses qemu_output.txt
|
|
|
|
# - Makes qemu_in_gdb_format.txt
|
|
|
|
# - Logs parse_qemu.py's simulated gdb output to qemu_in_gdb_format.txt
|
2021-06-17 04:50:02 +00:00
|
|
|
#cat qemu_output.txt | ./parse_qemu.py >qemu_in_gdb_format.txt
|
|
|
|
#cat qemu_output.txt | ./parse_qemu.py | ./parse_gdb_output.py "/courses/e190ax/buildroot_boot/"
|
2021-06-10 13:58:20 +00:00
|
|
|
|
|
|
|
# Uncomment this version for parse_gdb_output.py debugging
|
|
|
|
# - Uses qemu_in_gdb_format.txt
|
|
|
|
# - Logs info needed by buildroot testbench
|
2021-06-17 04:50:02 +00:00
|
|
|
#cat qemu_in_gdb_format.txt | ./parse_gdb_output.py "/courses/e190ax/buildroot_boot/"
|
2021-06-10 13:58:20 +00:00
|
|
|
|
|
|
|
# =========== Just Do the Thing ==========
|
2021-06-17 04:50:02 +00:00
|
|
|
# Uncomment this version for the whole thing
|
2021-06-10 13:58:20 +00:00
|
|
|
# - Logs info needed by buildroot testbench
|
2021-06-24 12:35:00 +00:00
|
|
|
(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2>&1 >/dev/null | ./parse_qemu.py | ./parse_gdb_output.py "/courses/e190ax/buildroot_boot_new/") & riscv64-unknown-elf-gdb -x gdbinit_qemulog
|