diff --git a/docs/book/src/building_crosvm/linux.md b/docs/book/src/building_crosvm/linux.md index e86cc57908..5d4c92497e 100644 --- a/docs/book/src/building_crosvm/linux.md +++ b/docs/book/src/building_crosvm/linux.md @@ -67,12 +67,21 @@ The container image is big and may take a while to download when first used. Once started, you can follow all instructions in this document within the container shell. +## Building a binary + +If you simply want to try crosvm, run `cargo build`. Then the binary is +generated at `./target/debug/crosvm`. Now you can move to +[Basic Usage](/running_crosvm/basic_usage.html). + +If you want to enable [additional features](/running_crosvm/features.html), use +the `--features` flag. (e.g. `cargo build --features=gdb`) + ## Development ### Iterative development -You can use cargo as usual for crosvm development to `cargo build` and -`cargo test` single crates that you are working on. +You can use cargo as usual for crosvm development to `cargo build` and `cargo +test` single crates that you are working on. If you are working on aarch64 specific code, you can use the `set_test_target` tool to instruct cargo to build for aarch64 and run tests on a VM: @@ -159,15 +168,14 @@ skip some slower checks, like building for other platforms. also stop minijail from killing processes that violate the seccomp rule, making the sandboxing much less aggressive. - 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 + 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. +- Devices can't be jailed if `/var/empty` doesn't exist. `sudo mkdir -p + /var/empty` to work around this for now. - You need read/write permissions for `/dev/kvm` to run tests or other crosvm - instances. Usually it's owned by the `kvm` group, so - `sudo usermod -a -G kvm $USER` and then log out and back in again to fix - this. + instances. Usually it's owned by the `kvm` group, so `sudo usermod -a -G kvm + $USER` and then log out and back in again to fix this. - Some other features (networking) require `CAP_NET_ADMIN` so those usually need to be run as root.