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/
Do note that because virtual/
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/
sudo emerge <package name>
To test the new package is installed correctly as part of the SDK, update the chroot:
update_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/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:
~/chromiumos/src/scripts/build_sdk_board