Maintaining the SDK

Before going further, make sure to update the Portage tree

You should complete the Portage tree update steps before executing any command from this page.

Grabbing a new Gentoo stage 3 tarball

In order to obtain the latest Gentoo stage 3 tarball, use the vendor-gentoo-stage3 helper script, which shall store it in assets/gentoo:

$ toolkit/helpers/

Updating the SDK recipe

The SDK recipe then needs to be updated:

# product/clipos/sdk/sdk.toml
tag = <portage tree tag>
rootfs = "assets/gentoo/stage3-amd64-hardened+nomultilib-<portage tree tag>.tar.xz"

Rebuilding the SDK from scratch

  • Remove all distfiles from the assets/distfiles directory (and only distfiles, do not delete nor hidden configuration files)
  • Delete the out/sdk and cache/sdk directories.
  • Disable all instrumentation features for the SDK build and rebuild the SDK:
$ cosmk bootstrap sdk

The resulting SDK can then be employed, for instance, to launch a full project rebuild with the up-to-date Portage tree and the desired instrumentation features.