This is a 32-bit kernel designed for i386 architecture following the course Developing a Multithreaded Kernel From Scratch! presented by the brilliant instructor Daniel McCarthy.
I made specific folders for my progress in the course---they can be distinguished by their naming scheme that begins with V#
and so on. Additionally, for every main section in the course, a README file can be found in its directory with my notes: some of it is just rephrasing the presentation slides and some are my personal explanation for certain points that need clarification.
- Make sure
qemu
is installed before proceeding. - Go to
hehOS
directory. - Enter
make clean
command to delete all previously-built .o files. - Enter
make all
command to build hehOS from source. - Enter
make launch
command to launch hehOS.
-
Launch
GDB
gdb
-
Add symbol file to debugging session (symbol file contains info that helps with debugging like function names) and start address
add-symbol-file ./build/kernelfull.o 0x1000000
-
Tell
GDB
to connect to a remote targetqemu
for debugging the passed binary fileos.bin
along with debugging flags:-hda
makesqemu
useos.bin
as a virtual hard disk to read from;-S
tellsqemu
to start in a suspended state and not start executing unless stated byGDB
;-gdb stdio
enablesGDB
's remote debugging support inqemu
and directsqemu
to use standard input/output (stdio) for communicating withGDB
.target remote | qemu-system-i386 -hda ./bin/os.bin -S -gdb stdio
-
To place a breakpoint (since symbol file is added, gdb will recognize function names):
break LABEL_NAME
-
To continue executing until breakpoint is reached:
c
-
To print a variable's value (if it is a pointer for example):
print *PTR_NAME
-
To single step in C code:
n
-
To switch code layout from C to Assembly:
layout asm
-
To single step in Assembly code:
stepi
si
-
To switch code layout back to C:
layout previous
- Task and process management.
- A FAT16 filesystem.
- Programmable system interrupts.
- PS/2 keyboard driver.
- Kernel/user process memory management and paging.
- Support for
.bin
and.elf
file execution. - Solid base to implement multi-tasking.
- Interactive shell able to parse program names and arguments and launch them.
- Add more programs like the already-implemented echo.
- Implement multi-tasking.
- Add more eastereggs like the one showcased down below wink wink.