CrOS Tools

This aims to be an reference page to help find CrOS tools and their documentation.

Definitions

##Tools

Alphabetical List

build_image

build_image handles building ChromiumOS and ChromeOS images that can then be flashed to a device or USB stick. The build_packages script lives in the crosutils repo, at src/scripts in your ChroimiumOS checkout.

build_packages

build_packages compiles all of the packages for a given board into a sysroot. Packages can also be listed that should be built.

The build_packages script lives in the crosutils repo, at src/scripts in your ChroimiumOS checkout. It is also the directory you land in when you run cros_sdk.

cros deploy

cros deploy is used to install a single package to a DUT (Device Under Test).

cros flash

cros flash is used to flash an image to a DUT or a USB drive. See the tool's documentation for more information.

cros_run_unit_tests

This script runs the src_test phase of the ebuilds for the packages it tests. It allows giving a sysroot, build target (board), or a list of packages.

cros_sdk

The cros_sdk script lives in the [chromite] repo. The implementation can be found here, while its executable can be found in Chromite's bin directory. cros_sdk is used to manage the SDK/chroot. This is one of the first scripts that needs to be run in most cases, to create the chroot.

Some of the most common usages are:

  • Create SDK:
    • cros_sdk --create
  • Delete SDK:
    • cros_sdk --delete
  • Replace SDK:
    • cros_sdk --replace

cros_workon_make

Location: platform/dev-util

This script is a bash script that wraps the core operations for working on a specific workon package.

  • Build Package:
    • cros_workon_make --board=<board> <package>
  • Test Package:
    • cros_workon_make --test --board=<board> <package>
  • Install Package:
    • cros_workon_make --install --board=<board> <package>

security_test_image

Repo: chromite

This script uses a set of baselines to run security tests for a built image. For most use cases this currently generally requires an internal checkout. The tests it runs are also currently very strongly tied to the concept of the image being for a Chromebook. Use cases of ChromeOS/ChromiumOS for other uses usually fail these tests.

By Entity/Action

AP Firmware

  • Build: TODO
  • Test: TODO
  • Install: TODO

Chroot: See SDK

EC Firmware

  • Build: TODO
  • Test: TODO
  • Install: TODO

Image

Kernel

  • Build: TODO
  • Test: TODO
  • Install: TODO

Package

Note: This is distinct from the Packages section. This section focuses on operations that are relevant to a single package. The Packages section focuses on operations relevant to sets of packages (most often a full sysroot). There is overlap in these sections, and we hope one day to be able to collapse them into a single section.

Packages

  • Build
  • Test
  • Install: N/A
    • The installation of full sets of packages is currently done by creating and flashing an image.

SDK

  • Build
  • Test: None currently exist
  • Install: N/A

Sysroot

Handled automatically for most users!

Only use these if you're sure you really need to manually do so.

The current test/install phases of the sysroot are very limited and not distinct from the build phase.