CosmOS requires:
HomeBrew can be used on OS X to install the prerequisites
brew install x86_64-elf-binutils
brew install x86_64-elf-gcc
brew install nasm
brew install qemu
brew install clang-format
OS X includes Clang.
On Ubuntu apt can be used on Linux to install the prerequisites
sudo apt install git
sudo apt install gcc-10
sudo apt install make
sudo apt install nasm
sudo apt install qemu-system-x86
sudo apt install clang-format
CosmOS builds with GNU Make
From the root directory:
make clean;make
The command make qemu will start QEMU and boot the image. The QEMU monitor is exposed on port 45454 and can be connected to with telnet localhost:45454
As an alternative to installing the build tools (gcc, binutils, nasm) on your local machine, you can use Docker. Simply prefix any build-related command with ./ktool to run the command inside the docker context. Scripts run in the working directory on the host, and the container is immediately destroyed after use.
For example:
$ ./ktool make clean;make