BonsOS is an x86 only operating system aiming to run on most vms and on some hardware. A minimal bootloader loads the kernel which sets up all the essential things and initialize the comunication between hardware and software. After the initialization process, the kernel loads the init.elf
executable which is the root of all the processes.
The build process is meant to be runned under linux, if on windows please use WSL (I suggest using Ubuntu with WSL2). WSL supports GUI programs only under Windows 11, VcXsrv is a good option to emulate it under Winows 10.
You are going to need Visual Studio Code to easly run/debug the project.
On Windows make sure that you are using the Remote - WSL extension to run VSCode as if it was under linux.
Run $ ./dependencies.sh
to install al the needed dependencies and build a cross-compiler (this is a long process). The script is designed to run on Debian based distros, adapt it to your distro if needed.
To compile the code and generate the BonsOS.img
output file you can either run $ make
or in VSCode you can run the compile
task.
You can either run it manually via any virtual machine or inside VSCode running the run qemu (debug)
task. The script ./scripts/run_qemu.sh
runs the image in qemu with the correct flags
Open the folder in VSCode and install the Native Debug extension. Hit F5 to start the debugger.
If when pressing F5 in VSCode qemu idle with "Guest has not initialized the display (yet)" try increasing the sleep amount in the tasks.json
config file.
A big portion of the code present in the bootloader is inspired (copied) by Limine, do not assume i know anything about that code :P
Sometimes the keyboard driver may freeze the os if you type too fast, it's an easy fix but it requires a lot of rewrite so I'll do it later