Before going further, ensure to get a functional build environment setup

You must complete the environment setup before executing any command from this page.

Building the CLIP OS toolkit (cosmk)

To build the CLIP OS toolkit, run and follow the setup instructions from the script:

$ ./toolkit/

Creating a config.toml for cosmk

We now need to tell cosmk what it should build by writing a config.toml file at the repository root directory. A working default configuration to build the CLIP OS project is provided in the config.toml.example file from the toolkit repository:

$ cp toolkit/config.toml.example config.toml

Instrumentation features for testing

Default builds of the project are meant to be set up with a production-ready configuration. There is currently no password-based local login available in this configuration. Thus if you want to test the project in QEMU, you will have to enable some instrumentation features in config.toml. Here are some good defaults for development builds:

$ sed -i '/#"instrumented-core"/s/#//g'        config.toml
$ sed -i '/#"passwordless-root-login"/s/#//g'  config.toml
$ sed -i '/#"allow-ssh-root-login"/s/#//g'     config.toml
$ sed -i '/#"instrumented-initramfs"/s/#//g'   config.toml
$ sed -i '/#"initramfs-no-require-tpm"/s/#//g' config.toml
$ sed -i '/#"initramfs-no-tpm-lockout"/s/#//g' config.toml
$ sed -i '/#"test-update"/s/#//g'              config.toml

This configuration will keep most system configuration unchanged, will install common tools (vim, tar, grep, etc.) and will give you local password-less root access.


Any change of instrumentation features requires a full project rebuild.

Building the full project

You will then be able to use cosmk to run commands to build CLIP OS. Building the CLIP OS project requires multiple successive steps that are described in TOML files called recipes.

By default, to reduce compilation time, cosmk will download pre-built SDKs from the public CLIP OS CI infrastructure. To further reduce compilation time, you may also download binary packages from the public CLIP OS CI using:

$ cosmk cache

To run all the steps required to build CLIP OS:

$ cosmk all

Congratulations, you are now ready to test CLIP OS.