Commit graph

134 commits

Author SHA1 Message Date
Dennis Kempin
df640d068c Add functional crosvm examples for running on linux
Two examples are added. A simple one and one with network
configured.

The examples are written in a way they can be integrated
with the mdbook to form a tutorial. This will ensure the
tutorial code snippets stay up to date.

The documentation for networking is added after
https://crrev.com/c/3237468 is merged.

BUG=b:214104901
TEST=./tools/examples/example_simple

Change-Id: I33682878858d8a0324fbb6a87e33cd55b29811b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3388063
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-18 23:24:00 +00:00
Alexandre Courbot
cfe5ab52ea mdbook: add instructions for network device setup
BUG=none
TEST=mdbook serve

Change-Id: Id72c44201b248e20761ec38e2c892f5c4993ef46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3237468
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-01-18 05:13:48 +00:00
Dennis Kempin
89ea04b4da ./tools/presubmit: Parallel execution and use dev container
The updated presubmit script allows parallel execution of checks
with --tmux.

It will also try to detect if the host is set up for aarch64 builds
and use the dev container if needed.

BUG=None
TEST=./tools/presubmit --tmux

Change-Id: I0247c39d826ee38d5f7f689de5e63380fe789cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3292101
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-19 20:09:40 +00:00
Dennis Kempin
95b80d13b2 dev_container: Preserve container between calls
This vastly improves iterative build times and enables more flexible
usage of the container.

BUG=None
TEST=./tools/dev_container cargo build
First run will build everything. Second run will finish right away.

Change-Id: I9b4eeee0689f0e9d07f0a32f846d21ab42f689f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3292100
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2021-11-19 20:09:39 +00:00
Junichi Uekawa
7225ebc077 crosvm: Sprinkle notes on API search.
It's not obvious it's possible to search API docs, it's one of the
things I would use the most often if it's reachable.

BUG=None
TEST=read it.

Change-Id: I29df6ae4df3eb667f17e22d0afc00aee80912187
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3267906
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-11-08 07:21:20 +00:00
Dennis Kempin
ccb9014afb Deprecate old dev tooling scripts
All of the developer tooling has moved to ./tools to make them
easier to discover.

BUG=None
TEST=None

Change-Id: I4daf6a0ca08c94a0c35ce8bc52f9d86e4cb15de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3251781
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-11-02 22:23:03 +00:00
Junichi Uekawa
b933598310 crosvm: Add python3-pip dependency.
This is required for the following step.

Updated installation steps so that it is possible to follow the steps
and build.

BUG=chromium:1265286
TEST=./install-deps inside docker container running ubuntu.

Change-Id: Icd6b1c9c3c74c790aba2fd41050ebd2f3470e946
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3255185
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
2021-11-01 23:58:39 +00:00
Keiichi Watanabe
1d0ef4d7a3 mdbook: Fix broken links detected by mdbook-linkcheck
Run mdbook-linkcheck locally and fix detected errors.
Note that we avoid running mdbook-linkcheck in CI, as its installation
takes ~1min.

BUG=none
TEST=run GitHub Action

Change-Id: I2bbd5f30486573454dc9ece86353296eca55be70
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3255194
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-11-01 19:07:01 +00:00
Keiichi Watanabe
cb14f61ce7 mdbook: Explain how to build a binary for beginner
Add a section to explain how to build crosvm binary for beginners who
may not have used cargo.
Also, ran mdformat on the file.

BUG=none
TEST=check

Change-Id: I902157cd471652b829d73bb27fc52e04db64d6d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3252186
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-10-29 16:43:56 +00:00
Keiichi Watanabe
105a94aaaf README: Use PNG logo image
Use PNG instead of SVG as Gitiles doesn't render SVG well.
In order to make ImageMagick's conversion work well, fill-opacity and
stroke-opacity are explicitly specified in the SVG.

Also, the PNG image will be put at the bottom of README so people can
read contents at first glance without scrolling over the logo.

BUG=none
TEST=check gitiles view on Gerrit
TEST=mdbook build

Change-Id: I2203be1258265400be3caf2ad8d8a1e8cacc5aab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3250151
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-10-29 01:56:23 +00:00
Keiichi Watanabe
31ef2d0b76 mdbook: Add links to source code at top page
BUG=none
TEST=none

Change-Id: Ife7f1d7c8d5885f72e9b489e62735e8b236c1750
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3245056
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-28 10:44:45 +00:00
Keiichi Watanabe
feb0e8d728 CONTRIBUTING: Add code submit workflow
Explain how to submit a CL for non-Chromium OS developers.

BUG=none
TEST=none

Change-Id: I3ee0e47eac1f0320f4c086a895f91ebf5fbf2d74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3241903
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-10-26 05:06:59 +00:00
Keiichi Watanabe
4a0ceade44 Add crosvm logo in README and mdbook
BUG=none
TEST=none

Change-Id: Ifc5851b2936fe11f28ddec66af6a5d3e42c2c047
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3237467
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-10-25 14:48:14 +00:00
Keiichi Watanabe
3e45862750 mdbook: Add page of "Basic Usage"
Add a starter document.
The most of content is moved from example usage doc [1] except GUI features.

[1]: https://google.github.io/crosvm/appendix/example_usage.html

BUG=b:195003973
TEST=none

Change-Id: I5fd1398795087edc1b41984cb579b59b9f34be5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188677
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-25 14:48:12 +00:00
Dennis Kempin
66431d7f45 Add onboarding resources to mdbook
This is converted from our onboarding doc with internal references
removed.

BUG=b:199926026
TEST=None

Change-Id: Ibb94e194583b12c1ec7fe3d80306156e34e50000
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3229948
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-21 19:32:14 +00:00
Keiichi Watanabe
26b03d02bd mdbook: Fix typos in proper names and script paths
Apply changes of crrev.com/c/3236708 to mdbook

BUG=none
TEST=none

Change-Id: Ida84a9157197a435156957a7eccce07de16b9cec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3237466
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-21 17:10:59 +00:00
Dennis Kempin
1b284f8dcd Docs: Update linux build instructions for new tooling
BUG=b:199951064
TEST=None

Change-Id: I7518790461f43a97db007eda86f56027f527ec95
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3226277
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-18 20:10:43 +00:00
Keiichi Watanabe
a493fc52d0 mdbook: Generate cargo-doc by GitHub Actions
BUG=b:199874828
TEST=run in my GitHub account

Change-Id: Ie456a90731ccedc4934a13110902ea153fce23ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3159891
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-10-06 15:10:23 +00:00
Keiichi Watanabe
eaaba5eb54 mdbook: Add more virtio devices in devices.md
BUG=b:195003973
TEST=none

Change-Id: Ie383d75f540ff4fc904d64e130d5c9ddb071a84e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3067484
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-09-30 11:44:33 +00:00
Keiichi Watanabe
909d7f3c05 docs: Add ARCHITECTURE.md
It's a common idea to have ARCHITECTURE.md next to README.md and
CONTRIBUTING.md [1].
So, let's do so instead of having the doc only under mdbook.

[1] https://matklad.github.io//2021/02/06/ARCHITECTURE.md.html

BUG=b:195003973
TEST=mdbook build

Change-Id: I8d3f479ba65c7f85865c51b5c22fb5b37d6e8f78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188675
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-09-29 16:19:50 +00:00
Keiichi Watanabe
b8bfe8dd04 mdbook: miscellaneous cleanup
* Remove an unnecessary index in SUMMARY.md
* Fix section levels in usage.md

BUG=b:195003973
TEST=mdbook build

Change-Id: Icf97038f664d02d169f9db30f4999f053ed2ed81
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188673
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-09-29 16:19:49 +00:00
Keiichi Watanabe
c912894ae9 docs: Run mdformat
Ran:
$ find ./docs/book/src/ -name "*.md" | xargs mdformat --in_place

BUG=none
TEST=mdbook build

Change-Id: I56c74538a4c2643fa2c6e33fe99660611442b4dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3188672
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-09-29 16:19:48 +00:00
Keiichi Watanabe
eced721cc8 mdbook: Add 'Running Crosvm' section
BUG=b:199874828
TEST=mdbook build

Change-Id: I760ce0aa072fcc0194353ceaf2396357005b3aea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3159888
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-09-20 12:45:44 +00:00
Keiichi Watanabe
db6b0170c8 mdbook: Add "Building Crosvm" section
Duplicate sections from README

BUG=b:199874828
TEST=mdbook build

Change-Id: Id097a4077f5e844bf36528fc49de887df6409c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3159887
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-09-20 12:45:43 +00:00
Keiichi Watanabe
9ad1788661 mdbook: Simplify SUMMARY.md
* Remove sections whose contents don't exist.
* Move supplementary or/and out-dated documentations to Appendix.
  - Add notes in example_usage.md

BUG=b:199874828
TEST=run `mdbook build` in /docs/book/

Change-Id: Id9d3e90df40fdd138d6c3a39066c5352ec66c41d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3159886
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-09-20 12:45:42 +00:00
Zach Reizner
9c9fd5fcf5 book: add features chapter
TEST=mdbook docs/book
BUG=None

Change-Id: I1a9c0553e801c293b42fd3f2f4c7b03357cb6f29
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2991093
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-07-01 16:28:33 +00:00
Zach Reizner
7a96510dcd book: add mermaid-js support
TEST=mdbook docs/book
BUG=None

Change-Id: I63c487e3718ed47f7084b211fa398422b8b571fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2991090
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-07-01 16:28:32 +00:00
Zach Reizner
81f717b152 book: add sandboxing chapters
BUG=None
TEST=mdbook docs/book

Change-Id: Idadd7c807ea37a27cfdc90cb1280762e98253ea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2991089
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-07-01 16:28:31 +00:00
Zach Reizner
c663173cae book: add initial book using mdbook
This change adds a document that was already written, but never
published before. Also, the summary includes a skeleton of chapters to
be filled in by future changes.

TEST=mdbook build docs/book
BUG=None

Change-Id: If1d6e295b6d5a639f728f5de0df73de094399166
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2982861
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-07-01 16:28:29 +00:00
Daniel Verkamp
6ded64f192 unblocked_terms.txt: clean up trivial cases
Avoid some easily-replaced non-inclusive words and remove them from the
unblocked_terms.txt list.

Remove a clippy lint with a name matching the list since all affected
warnings have already been removed.

Remove all terms that are already not present in the crosvm
repository from unblocked_terms.txt (including the commented lines).

BUG=b:178821708
TEST=../dev/contrib/search_blocked_words.sh unblocked_terms.txt
TEST=cargo test -p devices
TEST=cargo test -p disk
TEST=bin/clippy

Change-Id: I8261921380decc839f01adb9ad1d4d14d5a85114
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2847462
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2021-04-26 20:32:38 +00:00
Zach Reizner
d49bcdb081 replace all usage of MsgOnSocket derives
Replaced all usage of MsgSocket with Tube.

BUG=b:176847362
TEST=run_tests

Change-Id: Ie647f79926bc0414c125a776eafe7f60c071bab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2710324
Auto-Submit: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2021-04-02 15:40:41 +00:00
Dylan Reid
0cd3606024 docs: Add note about rust-vmm integration
This is mostly a place holder that will be replaced if and when we
determine a complete plan for consuming crates from rust-vmm.

Change-Id: I8eec6313f40822a887b34d51b462268de5d01fd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2429813
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
2020-10-01 20:43:41 +00:00
Allen Webb
f3024c8976 io_jail: Remove now that the code lives in aosp/external/minijail
io_jail has been migrated to aosp/external/minijail/rust/minijail.
This removes the crosvm copy and updates the references to use the new
location.

BUG=chromium:1096175
TEST=cargo test

Cq-Depend: chromium:2254418
Change-Id: I29d5c6178b6faf5e52671cfbe6fc7e51f0d21dd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2254298
Tested-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Allen Webb <allenwebb@google.com>
2020-06-26 17:27:44 +00:00
Zach Reizner
f9fc42376a flesh out high level documentation
This change adds a CONTRIBUTING.md and some architectural documentation
for people new to submitting code to crosvm.

TEST=check the gittiles markdown
BUG=None

Change-Id: Ib792220ae50329413f487c5d87b29ad3b2f7c59c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2013213
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Auto-Submit: Zach Reizner <zachr@chromium.org>
2020-01-22 19:10:45 +00:00