OLD | NEW |
1 # Linux Chromium Arm Recipes | 1 # Linux Chromium Arm Recipes |
2 | 2 |
3 [TOC] | 3 [TOC] |
4 | 4 |
5 ## Recipe1: Building for an ARM CrOS device | 5 ## Recipe1: Building for an ARM CrOS device |
6 | 6 |
7 This recipe uses `ninja` (instead of `make`) so its startup time is much lower | |
8 (sub-1s, instead of tens of seconds), is integrated with goma (for | |
9 google-internal users) for very high parallelism, and uses `sshfs` instead of | |
10 `scp` to significantly speed up the compile-run cycle. It has moved to | |
11 https://sites.google.com/a/chromium.org/dev/developers/how-tos/-quickly-building
-for-cros-arm-x64 | 7 https://sites.google.com/a/chromium.org/dev/developers/how-tos/-quickly-building
-for-cros-arm-x64 |
12 (mostly b/c of the ease of attaching files to sites). | |
13 | |
14 | 8 |
15 ## Recipe2: Explicit Cross compiling | 9 ## Recipe2: Explicit Cross compiling |
16 | 10 |
17 Due to the lack of ARM hardware with the grunt to build Chromium native, cross | 11 Due to the lack of ARM hardware with the grunt to build Chromium native, cross |
18 compiling is currently the recommended method of building for ARM. | 12 compiling is currently the recommended method of building for ARM. |
19 | 13 |
20 These instruction are designed to run on Ubuntu Precise. | 14 These instruction are designed to run on Ubuntu Precise. |
21 | 15 |
22 ### Installing the toolchain | 16 ### Installing the toolchain |
23 | 17 |
24 The install-build-deps script can be used to install all the compiler | 18 The install-build-deps script can be used to install all the compiler |
25 and library dependencies directly from Ubuntu: | 19 and library dependencies directly from Ubuntu: |
26 | 20 |
27 $ ./build/install-build-deps.sh | 21 $ ./build/install-build-deps.sh |
28 | 22 |
29 ### Installing the sysroot | 23 ### Installing the sysroot |
30 | 24 |
31 A prebuilt sysroot image is kept up-to-date on Cloud Storage. It will | 25 A prebuilt sysroot image is kept up-to-date on Cloud Storage. It will |
32 automatically be installed by gclient runhooks installed if you have | 26 automatically be installed by gclient runhooks installed if you have |
33 `target_arch=arm` in your `GYP_DEFINES`. | 27 `target_arch=arm` in your `GYP_DEFINES`. |
34 | 28 |
35 To install the sysroot manually you can run: | 29 To install the sysroot manually you can run: |
36 | 30 |
37 ./chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py \ | 31 ./chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py \ |
38 --arch=arm | 32 --arch=arm |
39 | 33 |
40 ### Building | 34 ### Building |
41 | 35 |
42 To build for ARM, using the clang binary in the chrome tree, use the following | 36 To build for ARM, using the clang binary in the chrome tree, use the following |
43 settings: | 37 gn args: |
44 | 38 |
45 export GYP_CROSSCOMPILE=1 | 39 target_cpu = "arm" |
46 export GYP_DEFINES="target_arch=arm" | |
47 | 40 |
48 There variables need to be set at gyp-time (when you run `gyp_chromium`), | 41 Or the following gyp settings: |
49 but are not needed at build-time (when you run make/ninja). | 42 |
| 43 GYP_CROSSCOMPILE=1 |
| 44 GYP_DEFINES="target_arch=arm" |
50 | 45 |
51 ## Testing | 46 ## Testing |
52 | 47 |
53 ### Automated Build and Testing | 48 ### Automated Build and Testing |
54 | 49 |
55 Chromium's testing infrastructure for ARM/Linux is somewhat limited. | 50 Chromium's testing infrastructure for ARM/Linux is somewhat limited. |
56 There are currently two builders setup, one on the FYI waterfall and one | 51 There are currently two builders setup, one on the FYI waterfall and one |
57 the the trybot waterfall: | 52 the the trybot waterfall: |
58 | 53 |
59 * [Linux ARM](http://build.chromium.org/p/chromium.fyi/builders/Linux%20ARM) | 54 * [Linux ARM](http://build.chromium.org/p/chromium.fyi/builders/Linux%20ARM) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 Modes "1024x768" "800x600" "640x480" | 100 Modes "1024x768" "800x600" "640x480" |
106 EndSubSection | 101 EndSubSection |
107 EndSection | 102 EndSection |
108 ``` | 103 ``` |
109 | 104 |
110 ### Notes | 105 ### Notes |
111 | 106 |
112 * To building for thumb reduces the stripped release binary by around 9MB, | 107 * To building for thumb reduces the stripped release binary by around 9MB, |
113 equating to ~33% of the binary size. To enable thumb, set `'arm_thumb': 1` | 108 equating to ~33% of the binary size. To enable thumb, set `'arm_thumb': 1` |
114 * TCmalloc does not have an ARM port, so it is disabled. | 109 * TCmalloc does not have an ARM port, so it is disabled. |
OLD | NEW |