File tree Expand file tree Collapse file tree 1 file changed +7
-21
lines changed
Expand file tree Collapse file tree 1 file changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -6,35 +6,21 @@ This document deals with debugging in [GDB](https://www.gnu.org/software/gdb/).
66
77This document expects the reader to understand some basic fundamentals about x86-64 assembly instructions and hexadecimal notation.
88
9- This document was written while using an Ubuntu 18.04 virtual machine within VirtualBox.
10-
11-
12- ## Building a binary for QEMU to boot
13-
14- The instructions below require the multiboot.bin and pure64.sys binaries from [ Pure64] ( https://github.com/ReturnInfinity/Pure64 ) .
15-
16- A couple steps need to be completed prior to compiling Pure64!
17-
18- 1 . Adjust the Pure64 ` multiboot.asm ` file to not use graphics. QEMU does not support multiboot graphics mode.
19-
20- Change the line ``FLAG_VIDEO equ 1<<2 ; set video mode`` to `FLAG_VIDEO equ 0<<2 ; clear video mode`
21-
22- 2 . Adjust Pure64 to just start the kernel instead of a stage 3 loader.
23-
24- `$ sed -i 's/call STAGE3/jmp 0x100000/g' pure64.asm`
25-
26- Use the following to build boot.bin:
27-
28- cat multiboot.sys pure64.sys kernel.sys > boot.bin
9+ This document was written while using an Ubuntu 25.04 virtual machine within VirtualBox.
2910
11+ This document is based on using BareMetal-OS and its script.
3012
3113## Debugging with GDB
3214
3315### Terminal 1
3416
3517Set a 'jmp $' somewhere in the source code.
3618
37- qemu-system-x86_64 -smp 2 -m 256 -serial file:serial.log -curses -kernel ./boot.bin -s
19+ Edit ` baremetal.sh ` and remove the comment for ` -s ` to enable GDB debugging
20+
21+ Start BareMetal-OS
22+
23+ ./baremetal.sh bnr
3824
3925
4026### Terminal 2
You can’t perform that action at this time.
0 commit comments