Using the Makefile, to build with no debug print statements:
make qemuWith debug print statements:
make qemu DEBUG_ENABLED=1To clean the build:
make cleanTo quit QEMU, Ctrl + A, then X.
To specify a logfile, use the argument QEMU_LOG=kernel_output.log, for example:
make qemu DEBUG_ENABLED=1 QEMU_LOG=output.logUse the Make target
make debugand follow the instructions from there.
To help simplify debugging, use debug.sh, which will build the kernel with debug symbols and attach the GDB script, gdb-init-script.gdb.
The script run_until_unexpected.sh will continuously run the kernel until the last line of kernel output is different than expected. You will need to change the variables at the top of the script to your desired values.