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:
parent
f573f49874
commit
3a778fee44
|
@ -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
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
qemu-system-i386 nightloader.bin -qmp unix:qmp.socket,server,nowait
|
Loading…
Reference in New Issue