Professional cross-platform build system using CMake.
sudo apt install cmake build-essential nasm python3
sudo apt install gcc-x86-64-linux-gnu binutils-x86-64-linux-gnubrew install cmake nasm python3
brew install x86_64-elf-gcc x86_64-elf-binutilsmakemkdir build && cd build
cmake ..
makeOutput: build/bin/os.img
# Custom cross-compiler
make CROSS_COMPILE=x86_64-linux-gnu-
# Or with CMake directly
cmake .. -DCROSS_COMPILE=x86_64-linux-gnu-
# Clean build
make clean./run.shViOS64BitDev/
├── Makefile # Convenience wrapper
├── CMakeLists.txt # CMake configuration
├── scripts/ # Build helpers
├── ViOS64Bit/ # Kernel source
├── ViOS.c # UEFI bootloader
└── build/ # Build output
└── bin/os.img
Cross-compiler not found
Install the toolchain or specify alternative:
make CROSS_COMPILE=x86_64-linux-gnu-EDK2 build fails
Initialize EDK2:
cd /path/to/edk2
make -C BaseTools
source edksetup.shPermission errors
The build requires sudo for disk operations.
# Build
make
# Rebuild after changes
make
# Clean rebuild
make clean
make