• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Building for ChromeOS
2
3crosvm is included in the ChromeOS source tree at `src/platform/crosvm`. Crosvm can be built with
4ChromeOS features using Portage or cargo.
5
6If ChromeOS-specific features are not needed, or you want to run the full test suite of crosvm, the
7[Building for Linux](#building-for-linux) workflows can be used from the crosvm repository of
8ChromeOS as well.
9
10## Using Portage
11
12crosvm on ChromeOS is usually built with Portage, so it follows the same general workflow as any
13`cros_workon` package. The full package name is `chromeos-base/crosvm`.
14
15See the [Chromium OS developer guide] for more on how to build and deploy with Portage.
16
17> NOTE: `cros_workon_make` modifies crosvm's Cargo.toml and Cargo.lock. Please be careful not to
18> commit the changes. Moreover, with the changes cargo will fail to build and clippy preupload check
19> will fail.
20
21## Using Cargo
22
23Since development using portage can be slow, it's possible to build crosvm for ChromeOS using cargo
24for faster iteration times. To do so, the `Cargo.toml` file needs to be updated to point to
25dependencies provided by ChromeOS using `./tools/chromeos/setup_cargo`.
26
27[chromium os developer guide]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_guide.md
28