Commit 4dca0796 authored by James Cook's avatar James Cook Committed by Commit Bot

cros: Update linux-chromeos documentation

* Eliminate references to Windows
* Specify the binary to run
* Document GN args

Bug: none
Test: markdown preview
Change-Id: I29b3179b4b74289a35e53cf2cd2ff5658ef7df6e
Reviewed-on: https://chromium-review.googlesource.com/884321Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531729}
parent a12ebfd1
# Chrome OS Build Instructions (Chromium OS on Linux)
Chromium on Chromium OS is built from a mix of code sourced from Chromium
on Linux and Chromium on Windows. Much of the user interface code is
shared with Chromium on Windows.
Chromium on Chromium OS uses Linux Chromium as a base, but adds a large number
of features to the code. For example, the login UI, window manager and system UI
are part of the Chromium code base and built into the chrome binary.
If you make changes to Chromium on Windows, they may affect Chromium
on Chromium OS. Fortunately to test the effects of your changes you
don't need to build all of Chromium OS, you can just build Chromium for
Chromium OS directly on Linux.
Fortunately, most Chromium changes that affect Chromium OS can be built and
tested on a Linux workstation. This build is called "linux-chromeos". In this
configuration most system services (like the power manager, bluetooth daemon,
etc.) are stubbed out. The entire system UI runs in a single X11 window on your
desktop.
First, follow the [normal Linux build
instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md)
......@@ -15,38 +16,52 @@ as usual to get a Chromium checkout.
## Building and running Chromium with Chromium OS UI on your local machine
If you plan to test the Chromium build on your dev machine and not a
Chromium OS device, run the following in your chromium checkout:
Run the following in your chromium checkout:
$ gn gen out/Default --args='target_os="chromeos"'
$ ninja -C out/Default -j32
$ autoninja -C out/Default chrome
$ out/Default/chrome
Some additional options you may wish to set by passing in `--args` to `gn gen`
or running `gn args out/Default`:
use_goma = true # Googlers: Use build farm, compiles faster.
is_component_build = true # Links faster.
is_debug = false # Release build, runs faster.
dcheck_always_on = true # Enables DCHECK despite release build.
enable_nacl = false # Skips native client build, compiles faster.
# Set the following true to create a Chrome (instead of Chromium) build.
# This requires a src-internal checkout.
is_chrome_branded = false # Adds internal features and branded art assets.
is_official_build = false # Turns on many optimizations, slower build.
NOTE: You may wish to replace 'Default' with something like 'Cros' if
you switch back and forth between Linux and Chromium OS builds, or 'Debug'
if you want to differentiate between Debug and Release builds (see below)
or DebugCros or whatever you like.
NOTE: If using goma increase -j32 (which controls parallelization) to something
higher, 500 or 1000. Consider adding `-l20` which prevents ninja from starting
jobs if the load average is too high - this prevents system hangs when using
-j1000 when goma is down.
if you want to differentiate between Debug and Release builds (see below).
See [GN Build Configuration](https://www.chromium.org/developers/gn-build-configuration)
for more information about configuring your build.
Some additional options you may wish to set by passing in `--args` to `gn gen`
or running `gn args out/Default`:
You can also build and run test targets like `unit_tests`, `browser_tests`, etc.
is_component_build = true
use_goma = true
is_debug = false # Release build, significantly faster
dcheck_always_on = true # Enable DCHECK (with is_debug = false)
## Login notes
# Set the following true to create a Chrome (instead of Chromium) build.
is_official_build = false
is_chrome_branded = false
By default this build signs in with a stub user. To specify a real user:
## Notes
* For first run, add the following options to chrome's command line:
`--user-data-dir=/tmp/chrome --login-manager`
* Go through the out-of-the-box UX and sign in with a real Gmail account.
* For subsequent runs, add:
`--user-data-dir=/tmp/chrome --login-user=username@gmail.com`
* To run in guest mode instantly, add:
`--user-data-dir=/tmp/chrome --bwsi --incognito --login-user='$guest'
--login-profile=user`
Signing in as a specific user is useful for debugging features like sync
that require a logged in user.
## Graphics notes
The Chromium OS build requires a functioning GL so if you plan on
testing it through Chromium Remote Desktop you might face drawing
......@@ -59,22 +74,7 @@ problems (e.g. Aura window not painting anything). Possible remedies:
To more closely match the UI used on devices, you can install fonts used
by Chrome OS, such as Roboto, on your Linux distro.
To specify a logged in user:
* For first run, add the following options to the command line:
`--user-data-dir=/tmp/chrome --login-manager`
* Go through the out-of-the-box UX and sign in as
**username@gmail.com**.
* For subsequent runs, add the following to the command line:
`--user-data-dir=/tmp/chrome --login-user=username@gmail.com`
* To run in guest mode instantly, you can run add the arguments:
`--user-data-dir=/tmp/chrome --bwsi --incognito --login-user='$guest'
--login-profile=user`
Signing in as a specific user is useful for debugging features like sync
that require a logged in user.
## Compile Chromium for a Chromium OS device using the Chromium OS SDK
## Compile Chromium for a Chromium OS device
See [Building Chromium for a Chromium OS device](https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/building-chromium-browser)
for information about building and testing chromium for Chromium OS.
See [Building Chromium for a Chromium OS device](https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md)
for information about building and testing Chromium for Chromium OS.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment