Adding a Package to the SDK
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
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
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:
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
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.
For more information on the SDK Builder, see Chromium OS SDK Creation.
To test building the SDK itself with the new package, by running the entire SDK builder process, launch an SDK builder tryjob:
cros tryjob -g <cl 1> [-g ...] chromiumos-sdk-tryjob
Or, to just build the SDK board locally: