Setting up the Development Environment
1. Installing the Cross-Compiler
We use cross compilers from kernel tools.
Download the version for x86_64 target and unpack to a location of your choice.
In there you should eventually find a /bin directory.
Add this path as a variable named CROSS_PATH to the config.mk. See config.default.mk for default values.
config.mk is used by the makefile.
2. Installing BOOTBOOT/mkbootimg
BOOTBOOT is the bootloader we use. It ships with a tool called mkbootimg. mkbootimg generates a small bootable disk image which includes both the bootloader and our kernel.
Clone bootboot from gitlab to a location of your choice.
Add the path of your bootboot directory as a variable named BOOTBOOT to the config.mk. See config.default.mk for default values.
Build mkbootimg: cd into the mkbootimg directory inside bootboot, and execute make. This should generate an executable called mkbootimg.
3. Installing QEMU
You will need qemu-system-x86_64.
This should be available in most package managers.
Examples:
# Fedora
sudo dnf install qemu-system-x86
4. Customizing the build
For LSP Supprt in neovim you can use bear to create a compile-command.json