diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-01-12 23:17:06 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-14 17:41:46 +0000 |
commit | f3ce439890b991b5a35c97b9aa5e61e9b5f9c7fc (patch) | |
tree | 1d75d15b95f487a255709d4fa4ace9b9a08ab81e /docs | |
parent | 0e0865f84590297ffb26a260fb29127476dcac29 (diff) | |
download | chrome-ec-f3ce439890b991b5a35c97b9aa5e61e9b5f9c7fc.tar.gz |
docs: Add doc on how to use Goma to compile the EC code
Simple steps on how to use Goma. Not under the zephyr/ directory
since I intend to eventually get the Makefile working with Goma as
well.
BUG=b:214323409
BRANCH=none
TEST=view in gitiles
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I5a50a32f009c3c0816e43e1bb8dd9c9708753dcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385777
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/goma.md | 52 | ||||
-rw-r--r-- | docs/sitemap.md | 1 | ||||
-rw-r--r-- | docs/zephyr/zephyr_build.md | 2 |
3 files changed, 55 insertions, 0 deletions
diff --git a/docs/goma.md b/docs/goma.md new file mode 100644 index 0000000000..843cf18e1e --- /dev/null +++ b/docs/goma.md @@ -0,0 +1,52 @@ +# Ludicrous Speed Compilation with Goma + +[TOC] + +*** note +At the moment, Goma is only available for Googlers. +*** + +All commands should be performed in the chroot. + +## Login to Goma + +First, login to Goma: + +``` shellsession +$ goma_auth login +``` + +You'll be prompted to accept an agreement, and copy a URL into your +browser for login. Be sure to use your @google.com account. + +The login info should persist across reboots, so you'll only need to +do this step once (or rarely, if you get logged out). + +## Start Goma + +Start Goma's `compiler_proxy` daemon. It will run in the background. + +``` shellsession +$ goma_ctl ensure_start +``` + +You'll need to do this each time you start your machine. + +## Compiling (Zephyr EC) + +Run `zmake` as you normally do, and just add the `--goma` flag. For +example: + +``` shellsession +$ zmake --goma testall +``` + +jrosenth@ observed on a ThinkStation P920 that a clean `testall` with +`--goma` takes only 1 minute 55 seconds, versus 8 minutes and 20 +seconds without, so it's worth setting up! + +## Compiling (Legacy EC) + +The `Makefile` doesn't yet support Goma, but this is planned for the +future. [b/214323409](https://issuetracker.google.com/214323409) +tracks the progress. diff --git a/docs/sitemap.md b/docs/sitemap.md index 2175501757..34c5090db9 100644 --- a/docs/sitemap.md +++ b/docs/sitemap.md @@ -74,6 +74,7 @@ * [Reducing EC Image Size](./reducing_ec_image_size.md) * [Code Reviews](./code_reviews.md) * [IDE Support](./ide-support.md) +* [Building with Goma (Googlers only)](./goma.md) [1]:https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging.md [2]:https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging_cr50.md diff --git a/docs/zephyr/zephyr_build.md b/docs/zephyr/zephyr_build.md index 7d78e801ab..b49e2ec4b1 100644 --- a/docs/zephyr/zephyr_build.md +++ b/docs/zephyr/zephyr_build.md @@ -138,6 +138,8 @@ You might also find these files useful (using read-only as an example): * `build-ro/zephyr/zephyr.dts` - devicetree that is used * `build-ro/zephyr/zephyr.dts` - map of image +Googlers may be interested in setting up [building with Goma](../goma.md) +as well. ### Looking at the Kconfig |