summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-03-26 12:26:18 +0000
committerAlyssa Ross <hi@alyssa.is>2020-03-26 12:26:18 +0000
commitdbd5f925b6b2f4cb1bf87563be4d24c8ed35689a (patch)
tree5a51c0af87b6a8bb3dfe43d599cabf96523a7f6f /README.md
parent88b7821302043b7ad871fcc0c7748573d0f140e2 (diff)
parent22964eab8874d41cf0eadf03dfeb1ffb653283e5 (diff)
downloadcrosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.tar
crosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.tar.gz
crosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.tar.bz2
crosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.tar.lz
crosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.tar.xz
crosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.tar.zst
crosvm-dbd5f925b6b2f4cb1bf87563be4d24c8ed35689a.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'README.md')
-rw-r--r--README.md52
1 files changed, 51 insertions, 1 deletions
diff --git a/README.md b/README.md
index 09e8c1c..5756dbf 100644
--- a/README.md
+++ b/README.md
@@ -11,11 +11,61 @@ an exploit in the devices.
 The channel #crosvm on [freenode](https://webchat.freenode.net/#crosvm) is used
 for technical discussion related to crosvm development and integration.
 
-## Building with Docker
+## Getting started
+
+### Building for CrOS
+
+crosvm on Chromium OS is built with Portage, so it follows the same general
+workflow as any `cros_workon` package. The full package name is
+`chromeos-base/crosvm`.
+
+See the [Chromium OS developer guide] for more on how to build and deploy with
+Portage.
+
+[Chromium OS developer guide]: https://chromium.googlesource.com/chromiumos/docs/+/master/developer_guide.md
+
+### Building with Docker
 
 See the [README](docker/README.md) from the `docker` subdirectory to learn how
 to build crosvm in enviroments outside of the Chrome OS chroot.
 
+### Building for Linux
+
+>**NOTE:** Building for Linux natively is new and not fully supported.
+
+First, [set up depot_tools] and use `repo` to sync down the crosvm source
+tree. This is a subset of the entire Chromium OS manifest with just enough repos
+to build crosvm.
+
+```sh
+mkdir crosvm
+cd crosvm
+repo init -g crosvm -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url=https://chromium.googlesource.com/external/repo.git
+repo sync
+```
+
+A basic crosvm build links against `libcap` and `libfdt`. On a Debian-based system,
+you can install `libcap-dev` and `libfdt-dev`.
+
+Handy Debian one-liner for all build and runtime deps, particularly if you're
+running Crostini:
+```sh
+sudo apt install build-essential libcap-dev libfdt-dev pkg-config python
+```
+
+Known issues:
+*   Seccomp policy files have hardcoded absolute paths. You can either fix up
+    the paths locally, or set up an awesome hacky symlink: `sudo mkdir
+    /usr/share/policy && sudo ln -s /path/to/crosvm/seccomp/x86_64
+    /usr/share/policy/crosvm`. We'll eventually build the precompiled
+    policies [into the crosvm binary](http://crbug.com/1052126).
+*   Devices can't be jailed if `/var/empty` doesn't exist. `sudo mkdir -p
+    /var/empty` to work around this for now.
+
+And that's it! You should be able to `cargo build/run/test`.
+
+[set up depot_tools]: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
+
 ## Usage
 
 To see the usage information for your version of crosvm, run `crosvm` or `crosvm