OLD | NEW |
| (Empty) |
1 # ChromeOS Build Instructions (Chromium OS on Linux) | |
2 | |
3 Chromium on Chromium OS is built from a mix of code sourced from Chromium | |
4 on Linux and Chromium on Windows. Much of the user interface code is | |
5 shared with Chromium on Windows. | |
6 | |
7 If you make changes to Chromium on Windows, they may affect Chromium | |
8 on Chromium OS. Fortunately to test the effects of your changes you | |
9 don't need to build all of Chromium OS, you can just build Chromium for | |
10 Chromium OS directly on Linux. | |
11 | |
12 First, follow the [normal Linux build | |
13 instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux
_build_instructions.md) | |
14 as usual to get a Chromium checkout. | |
15 | |
16 ## Building and running Chromium with Chromium OS UI on your local machine | |
17 | |
18 If you plan to test the Chromium build on your dev machine and not a | |
19 Chromium OS device, run the following in your chromium checkout: | |
20 | |
21 $ gn gen out/Default --args='target_os="chromeos"' | |
22 $ ninja -C out/Default | |
23 | |
24 NOTE: You may wish to replace 'Default' with something like 'Cros' if | |
25 you switch back and forth between Linux and Chromium OS builds, or 'Debug' | |
26 if you want to differentiate between Debug and Release builds (see below) | |
27 or DebugCros or whatever you like. | |
28 | |
29 Now, when you build, you will build with Chromium OS features turned on. | |
30 | |
31 See [GN Build Configuration](https://www.chromium.org/developers/gn-build-config
uration) | |
32 for more information about configuring your build. | |
33 | |
34 If you have not already done so, be sure to set the following to prevent | |
35 'gclient runhooks' from executing 'gyp_chromium': | |
36 | |
37 export GYP_CHROMIUM_NO_ACTION=1 | |
38 | |
39 Some additional options you may wish to set by passing in **--args** to | |
40 **gn gen** or running **gn args out/Default**: | |
41 | |
42 is_component_build = true | |
43 use_goma = true | |
44 is_debug = false # Release build | |
45 dcheck_always_on = true # Enable DCHECK (with is_debug = false) | |
46 is_official_build = true | |
47 is_chrome_branded = true | |
48 | |
49 ## Notes | |
50 | |
51 When you build Chromium OS Chromium, you'll be using the TOOLKIT\_VIEWS | |
52 front-end just like Windows, so the files you'll probably want are in | |
53 src/ui/views and src/chrome/browser/ui/views. | |
54 | |
55 When target_os = "chromeos", then toolkit\_views need not (and should not) | |
56 be specified. | |
57 | |
58 The Chromium OS build requires a functioning GL so if you plan on | |
59 testing it through Chromium Remote Desktop you might face drawing | |
60 problems (e.g. Aura window not painting anything). Possible remedies: | |
61 | |
62 * --ui-enable-software-compositing --ui-disable-threaded-compositing | |
63 * --use-gl=osmesa, but it's ultra slow, and you'll have to build | |
64 osmesa yourself. | |
65 * ... or just don't use Remote Desktop. :) | |
66 | |
67 To more closely match the UI used on devices, you can install fonts used | |
68 by Chrome OS, such as Roboto, on your Linux distro. | |
69 | |
70 To specify a logged in user: | |
71 | |
72 * For first run, add the following options to the command line: | |
73 **--user-data-dir=/tmp/chrome --login-manager** | |
74 * Go through the out-of-the-box UX and sign in as | |
75 **username@gmail.com** | |
76 * For subsequent runs, add the following to the command line: | |
77 **--user-data-dir=/tmp/chrome --login-user=username@gmail.com**. | |
78 * To run in guest mode instantly, you can run add the arguments | |
79 **--user-data-dir=/tmp/chrome --bwsi --incognito | |
80 --login-user='$guest' --login-profile=user** | |
81 | |
82 Signing in as a specific user is useful for debugging features like sync | |
83 that require a logged in user. | |
84 | |
85 ## Compile Chromium for a Chromium OS device using the Chromium OS SDK | |
86 | |
87 See [Building Chromium for a Chromium OS device](https://www.chromium.org/chromi
um-os/how-tos-and-troubleshooting/building-chromium-browser) | |
88 for information about building and testing chromium for Chromium OS. | |
OLD | NEW |