the Chromium logo

The Chromium Projects

Adding a Package to the SDK

Add the Package

When adding a package to the SDK, for third-party packages not yet in the source tree, start by following the New & Upgrade Package Process guide (short version: use cros_portage_upgrade to pull the package from upstream). For new cros-workon packages, see Adding a New Package. Once the package is in place, add it as a dependency to the virtual/target-chromium-os-sdk ebuild to be automatically installed as part of the SDK.

Do note that because virtual/target-chromium-os-sdk is a cros-workon package, before adding the dependency, run:

cros-workon --host start virtual/target-chromium-os-sdk

Test the Package

To install the new package to test against (e.g. to run commands/tools, check behavior, etc.):

sudo emerge <package name>

To test the new package is installed correctly as part of the SDK, update the chroot:


Unit testing

To run the unit tests for the new package, run:

cros_run_unit_tests --host --packages <package name>

For cros-workon packages, as long as the package is in the virtual/target-chromium-os-sdk dependency tree, the unit tests will automatically be run on the SDK as part of the host-packages-cq builder in CQ and are required to pass. For third-party packages, unit tests can be run with the cros_run_unit_tests command above to get feedback locally, but they are not run as part of CQ and are not required to pass as it is expected that upstream releases have already been tested.

Test with the SDK Builder

For more information on the SDK Builder, see Chromium OS SDK Creation.

To test building the SDK itself with the new package, run the SDK builder via cros try:

cros try chromiumos_sdk -g <cl_1,cl_2,...>

Or, to just build the SDK board locally: