Hobyist x64 kernel
Requirements: elf compatible x64 cross compiler without libgcc redzone support. For building the cross compiler use this script.
limine bootloader v5.x
is pulled and builded as dependency automatically.
In the future the os is going to use custom linear framebuffer
Build is currently only supported on linux (the script requires /dev/null device and forward slashes as path separator, will make it compatible for windows in future) !!!Bochs may not work properly if it was not compiled with graphics option!!!
- xorriso
- bash
- nm
- od
- nasm
- CC and LD (for dependencies)
- qemu or any emulator which is able to handle x64 iso and graphics mode
- objdump
- awk
- git
- gdb
- git
- python3 (pathlib, os, sys)
- VT100 compatible terminal that supports ANSI escape sequence for colored output
If running for the first time and you do not have separate x86_64-elf
cross compiler set check configk/config.mk
and run make first_setup
.
This will download the whole GNU toolhcian and set the symlink inside
the source directory for building.
If you already got working toolchain don't forget to set it inside
config/config.mk
.
make clean && make
. After build the ISO and ELF files alongside symbols
(if requested) are located inside the build directory.
If the Makefile doesn't automatically pull all build dependencies
(limine and flanterm) run make bootstrap
command.
make debug
. This creates external symbols inside file and disassembled source.
To run the target inside QEMU use make run
.
Settings and parameters can be adjusted inside config/config.mk
To debug the kernel run make run_dbg
and navigate in second terminal
to the same source directory and run GDB. This will automatically hook
the target and set up the symbols. If you get a warning about safe execution you might have to add the init script as trusted inside
your ~/.gdbinit
config.
- X64 compatible emulator
- SMBIOS3 only (for now)
- i8259A PIC with cascaded second PIC wired through IRQ2
- MBR and BIOS
- Limine bootloader (for now)
TODOLIST:
- ☑ Basic printing
- ☐ Better framebuffer interface
- ☑ GDT
- ☑ IDT
- ☑ ISR
- ☑ Kernel symbols
- ☑ Versioning scheme
- ☑ Limine bootloader
- ☑ SMBIOS Version 3
- ☐ SMBIOS Version 2
- ☐ HAL
- ☑ IRQ
- ☐ Better build system (CMake)
- ☐ TSS (partially implemented)
- ☑ PIT
- ☑ PIC
- ☑ PS2 keyboard
- ☑ Debugging support
- ☐ Paging
- ☐ VMM
- ☐ PMM
- ☐ SMP
- ☐ Threads
- ☐ Custom remote debugger using unix socket via qemu
- ☐ Usermode
- ☐ ACPI
- ☐ Kernel driver interface
- ☑ Kernel main
- ☐ Kconfig like customization
- ☐ µGUI port
- ☐ More user friendly toolchain builder
- ☐ C++ support
- ☐ Device manager
- ☐ ATA support
- ☐ AHCI support
- ☐ Fat32 file system
- ☐ Virtual filesystem
- ☑ Logging
- ☐ Network
- ☐ Serial debugging
- ☐ Processes
- ☐ Kernel libc
- ☐ libc
- ☐ libsys
- ☐ PCI driver
- ☐ APIC
- ☐ HPET
- ☐ Syscalls
- ☑ FPU
- ☑ SSE
- ☑ kernel error reporting
printf library MIT license
limine bootloader BSD-2-Clause license
framebuffer BSD-2- Clause license