Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # ChromeOS Build Instructions (Chromium OS on Linux) | 1 # ChromeOS Build Instructions (Chromium OS on Linux) |
| 2 | 2 |
| 3 Chromium on Chromium OS is built on a mix of code sourced from Chromium | 3 Chromium on Chromium OS is built on a mix of code sourced from Chromium |
| 4 on Linux and Chromium on Windows. Much of the user interface code is | 4 on Linux and Chromium on Windows. Much of the user interface code is |
| 5 shared with Chromium on Windows. As such, if you make a change to | 5 shared with Chromium on Windows. As such, if you make a change to |
| 6 Chromium on Windows you may find your changes affect Chromium on | 6 Chromium on Windows you may find your changes affect Chromium on |
| 7 Chromium OS. Fortunately to test the effect of your changes you don't | 7 Chromium OS. Fortunately to test the effect of your changes you don't |
| 8 have to build all of Chromium OS, you can just build Chromium for | 8 have to build all of Chromium OS, you can just build Chromium for |
| 9 Chromium OS directly on Linux. | 9 Chromium OS directly on Linux. |
| 10 | 10 |
| 11 First, follow the [normal Linux build | 11 First, follow the [normal Linux build |
| 12 instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux _build_instructions.md) | 12 instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux _build_instructions.md) |
| 13 as usual to get a Chromium checkout. | 13 as usual to get a Chromium checkout. |
| 14 | 14 |
| 15 ## Running Chromium on your local machine | 15 ## Building and running Chromium with Chromium OS UI on your local machine |
| 16 | 16 |
| 17 If you plan to test the Chromium build on your dev machine and not a | 17 If you plan to test the Chromium build on your dev machine and not a |
| 18 Chromium OS device run: | 18 Chromium OS device, run the following in your chromium checkout: |
| 19 | 19 |
| 20 ```shell | 20 $ gn gen out/Default --args='target_os="chromeos"' |
| 21 export GYP_DEFINES="chromeos=1" | 21 $ ninja -C out/Default |
| 22 gclient runhooks | 22 |
| 23 NOTE: You may wish to replace 'Default' with something like 'Cros' if | |
| 24 you switch back and forth between Linux and Chromium OS builds, or 'Debug' | |
| 25 if you want to differentiate between Debug and Release builds (see below) | |
| 26 or DebugCros or whatever you like. | |
| 27 | |
| 28 Now, when you build, you will build with Chromium OS features turned on. | |
| 29 | |
| 30 See [GN Build Configuration](https://www.chromium.org/developers/gn-build-config uration) | |
| 31 for more information about configuring your build. | |
| 32 | |
| 33 Some additional options you may wish to set: | |
| 34 ``` | |
| 35 is_component_build = true | |
| 36 use_goma = true | |
| 37 is_debug = false # Release build | |
| 38 dcheck_always_on = true # Enable DCHECK (with is_debug = false) | |
| 39 is_official_build = true | |
| 40 is_chrome_branded = true | |
| 23 ``` | 41 ``` |
| 24 | 42 |
| 25 Now, once you build, you will build with Chromium OS features turned on. | 43 ## Notes |
| 26 | |
| 27 ### Notes | |
| 28 | 44 |
| 29 When you build Chromium OS Chromium, you'll be using the TOOLKIT\_VIEWS | 45 When you build Chromium OS Chromium, you'll be using the TOOLKIT\_VIEWS |
| 30 front-end just like Windows, so the files you'll probably want are in | 46 front-end just like Windows, so the files you'll probably want are in |
| 31 src/ui/views and src/chrome/browser/ui/views. | 47 src/ui/views and src/chrome/browser/ui/views. |
| 32 | 48 |
| 33 If chromeos=1 is specified, then toolkit\_views=0 must not be specified. | 49 When target_os=chromeos, then toolkit\_views should not be specified. |
|
Dirk Pranke
2016/04/18 21:49:30
nit: s/chromeos/"chromeos"/, s/should not/need not
stevenjb
2016/04/18 22:01:47
Done and added both: "need not (and should not)"
| |
| 34 | 50 |
| 35 The Chromium OS build requires a functioning GL so if you plan on | 51 The Chromium OS build requires a functioning GL so if you plan on |
| 36 testing it through Chromium Remote Desktop you might face drawing | 52 testing it through Chromium Remote Desktop you might face drawing |
| 37 problems (e.g. Aura window not painting anything). Possible remedies: | 53 problems (e.g. Aura window not painting anything). Possible remedies: |
| 38 | 54 |
| 39 * --ui-enable-software-compositing --ui-disable-threaded-compositing | 55 * --ui-enable-software-compositing --ui-disable-threaded-compositing |
| 40 * --use-gl=osmesa, but it's ultra slow, and you'll have to build | 56 * --use-gl=osmesa, but it's ultra slow, and you'll have to build |
| 41 osmesa yourself. | 57 osmesa yourself. |
| 42 * ... or just don't use Remote Desktop. :) | 58 * ... or just don't use Remote Desktop. :) |
| 43 | 59 |
| 44 Note the underscore in the GYP_DEFINES variable name, as people | |
| 45 sometimes mistakenly write it GYPDEFINES. | |
| 46 | |
| 47 To more closely match the UI used on devices, you can install fonts used | 60 To more closely match the UI used on devices, you can install fonts used |
| 48 by Chrome OS, such as Roboto, on your Linux distro. | 61 by Chrome OS, such as Roboto, on your Linux distro. |
| 49 | 62 |
| 50 To specify a logged in user: | 63 To specify a logged in user: |
| 51 | 64 |
| 52 * For first run, add the following options to the command line: | 65 * For first run, add the following options to the command line: |
| 53 **--user-data-dir=/tmp/chrome --login-manager** | 66 **--user-data-dir=/tmp/chrome --login-manager** |
| 54 * Go through the out-of-the-box UX and sign in as | 67 * Go through the out-of-the-box UX and sign in as |
| 55 **username@gmail.com** | 68 **username@gmail.com** |
| 56 * For subsequent runs, add the following to the command line: | 69 * For subsequent runs, add the following to the command line: |
| 57 **--user-data-dir=/tmp/chrome --login-user=username@gmail.com**. | 70 **--user-data-dir=/tmp/chrome --login-user=username@gmail.com**. |
| 58 * To run in guest mode instantly, you can run add the arguments | 71 * To run in guest mode instantly, you can run add the arguments |
| 59 **--user-data-dir=/tmp/chrome --bwsi --incognito | 72 **--user-data-dir=/tmp/chrome --bwsi --incognito |
| 60 --login-user='$guest' --login-profile=user** | 73 --login-user='$guest' --login-profile=user** |
| 61 | 74 |
| 62 Signing in as a specific user is useful for debugging features like sync | 75 Signing in as a specific user is useful for debugging features like sync |
| 63 that require a logged in user. | 76 that require a logged in user. |
| 64 | 77 |
| 65 ### Compile Testing Chromium with the Chromium OS SDK (quick version) | 78 ## Compile Testing Chromium with the Chromium OS SDK (quick version) |
| 66 | 79 |
| 67 Note: These instructions are intended for Chromium developers trying to | 80 See [Building Chromium for a Chromium OS device](https://www.chromium.org/chromi um-os/how-tos-and-troubleshooting/building-chromium-browser) |
| 68 diagnose compile issues on Chromium OS, which can block changes in the | 81 for information about building & testing chromium for Chromium OS. |
| 69 CQ. See the [full | |
| 70 documentation](http://www.chromium.org/chromium-os/how-tos-and-troubleshooting/b uilding-chromium-browser) | |
| 71 for more information about building & testing chromium for Chromium OS. | |
| 72 | |
| 73 To do a build of Chromium that can run on Chromium OS itself, the Chromium OS | |
| 74 SDK must be used. The SDK provides all of chromium's dependencies as they are | |
| 75 distributed with Chromium OS (as opposed to other distributions such as Ubuntu). | |
| 76 | |
| 77 To enter the SDK build environment, run the following command (replace the value | |
| 78 of the `--board` flag with the name of the configuration you want to test). | |
| 79 | |
| 80 ```shell | |
| 81 cros chrome-sdk --board=amd64-generic --use-external-config | |
| 82 ``` | |
| 83 | |
| 84 Once in the SDK build environment, build using the normal linux workflow (except | |
| 85 for a different build directory): | |
| 86 | |
| 87 ```shell | |
| 88 gclient runhooks | |
| 89 ninja -C out_amd64-generic/Release chromium_builder_tests | |
| 90 ``` | |
| 91 | |
| 92 The current configurations verified by the CQ are: | |
| 93 | |
| 94 Board Flag | Build Directory | CPU architecture | |
| 95 --- | --- | --- | |
| 96 amd64-generic | out_amd64-generic | 64-bit Intel | |
| 97 x86-generic | out_x86-generic | 32-bit Intel | |
| 98 daisy | out_daisy | 32-bit ARM | |
| 99 | |
| 100 ## Running Chromium on a Chromium OS device | |
| 101 | |
| 102 Look at the [Chromium OS | |
| 103 documentation](http://www.chromium.org/chromium-os/how-tos-and-troubleshooting/b uilding-chromium-browser) | |
| 104 for the official flow for doing this. | |
| OLD | NEW |