Add scripts for running bootloader and memdumping

This commit adds two scripts: One for running the bootloader using
Qemu, and one for dumping the memory used by the bootloader for
debugging purposes.
This commit is contained in:
Eric-Paul Ickhorn 2024-07-19 01:51:28 +02:00
parent f573f49874
commit 3a778fee44
Signed by: epickh
GPG Key ID: 1358818BAA38B104
2 changed files with 23 additions and 0 deletions

20
i386/dump.bash Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
if [[ -f "memory.dump" ]];
then
rm -f memory.dump
fi
if [[ -f "memory.bin" ]];
then
rm memory.bin
fi
if [[ ! -e "qmp.socket" ]];
then
echo "Couldn't find socket (file: 'qmp.socket')."
exit -1
fi
echo "dump-guest-memory memory.dump" | qmp-shell -H qmp.socket
echo "dump memory memory.bin 0 0xa0000" | gdb --core=memory.dump

3
i386/run.bash Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
qemu-system-i386 nightloader.bin -qmp unix:qmp.socket,server,nowait