CI20: Switch to CMake
Welcome back to the CI20 bare-metal project! I’ve got a few interesting things planned, but this release is just a clean-up: there are no new features, but the project now builds using CMake.
CMake build scripts are quite a bit easier to understand than Make, not least because the tool implicitly understands C dependencies, such as header files. Of course, the downside is that we have added CMake as a dependency.
This release is tagged “cmake”:
$ git clone https://github.com/nfd/ci20-os
$ cd ci20-os
$ git checkout tags/cmake
To build it for the first time, run CMake:
$ cmake .
Then run make as usual.
You can then boot in the normal way:
$ python3 usbloader.py stage1/stage1.elf
$ python3 usbloader.py kernel/kernel.elf
After the first time, you shouldn’t have to re-run CMake — even if you change the build system (CMakeLists.txt).