blob: c0b6ec3ea6cd022a048f82934c50aeeb737f725f [file] [log] [blame] [view]
andybonsad92aa32015-08-31 02:27:441# Linux Chromium Arm Recipes
2
3[TOC]
4
5## Recipe1: Building for an ARM CrOS device
6
andybonsad92aa32015-08-31 02:27:447https://sites.google.com/a/chromium.org/dev/developers/how-tos/-quickly-building-for-cros-arm-x64
andybons3322f762015-08-24 21:37:098
andybonsad92aa32015-08-31 02:27:449## Recipe2: Explicit Cross compiling
andybons3322f762015-08-24 21:37:0910
andybonsad92aa32015-08-31 02:27:4411Due to the lack of ARM hardware with the grunt to build Chromium native, cross
12compiling is currently the recommended method of building for ARM.
andybons3322f762015-08-24 21:37:0913
14These instruction are designed to run on Ubuntu Precise.
15
16### Installing the toolchain
17
18The install-build-deps script can be used to install all the compiler
19and library dependencies directly from Ubuntu:
20
sbcedd75c22015-11-22 04:53:4321 $ ./build/install-build-deps.sh
andybons3322f762015-08-24 21:37:0922
sbc9f033f82015-11-26 00:50:5223### Installing the sysroot
andybons3322f762015-08-24 21:37:0924
thakis3e861de2016-06-14 14:24:0125A prebuilt sysroot image is kept up to date on Cloud Storage. It will
andybonsad92aa32015-08-31 02:27:4426automatically be installed by gclient runhooks installed if you have
27`target_arch=arm` in your `GYP_DEFINES`.
andybons3322f762015-08-24 21:37:0928
29To install the sysroot manually you can run:
andybonsad92aa32015-08-31 02:27:4430
31 ./chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py \
32 --arch=arm
andybons3322f762015-08-24 21:37:0933
34### Building
35
andybonsad92aa32015-08-31 02:27:4436To build for ARM, using the clang binary in the chrome tree, use the following
sbc84dfa8ed2015-12-02 23:45:3737gn args:
andybons3322f762015-08-24 21:37:0938
sbc84dfa8ed2015-12-02 23:45:3739 target_cpu = "arm"
andybons3322f762015-08-24 21:37:0940
andybons3322f762015-08-24 21:37:0941## Testing
42
43### Automated Build and Testing
44
sbcedd75c22015-11-22 04:53:4345Chromium's testing infrastructure for ARM/Linux is somewhat limited.
46There are currently two builders setup, one on the FYI waterfall and one
47the the trybot waterfall:
andybons3322f762015-08-24 21:37:0948
nodira6074d4c2015-09-01 04:26:4549* [Linux ARM](http://build.chromium.org/p/chromium.fyi/builders/Linux%20ARM)
sbcf61cb5a2015-12-16 19:36:4350* [linux_arm](http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_arm)
andybons3322f762015-08-24 21:37:0951
sbcedd75c22015-11-22 04:53:4352These bots run x86-64 linux and cross-compile the ARM targets. Tests are
53run on ARM hardware via swarming.
54
andybons3322f762015-08-24 21:37:0955### Testing with QEMU
56
andybonsad92aa32015-08-31 02:27:4457If you don't have a real ARM machine, you can test with QEMU. For instance,
58there are some prebuilt QEMU Debian images here:
59http://people.debian.org/~aurel32/qemu/. Another option is to use the rootfs
60generated by rootstock, as mentioned above.
andybons3322f762015-08-24 21:37:0961
62Here's a minimal xorg.conf if needed:
63
64```
65Section "InputDevice"
66 Identifier "Generic Keyboard"
67 Driver "kbd"
68 Option "XkbRules" "xorg"
69 Option "XkbModel" "pc105"
70 Option "XkbLayout" "us"
71EndSection
72
73Section "InputDevice"
74 Identifier "Configured Mouse"
75 Driver "mouse"
76EndSection
77
78Section "Device"
79 Identifier "Configured Video Device"
80 Driver "fbdev"
81 Option "UseFBDev" "true"
82EndSection
83
84Section "Monitor"
85 Identifier "Configured Monitor"
86EndSection
87
88Section "Screen"
89 Identifier "Default Screen"
90 Monitor "Configured Monitor"
91 Device "Configured Video Device"
92 DefaultDepth 8
93 SubSection "Display"
94 Depth 8
95 Modes "1024x768" "800x600" "640x480"
96 EndSubSection
97EndSection
98```
99
100### Notes
andybonsad92aa32015-08-31 02:27:44101
102* To building for thumb reduces the stripped release binary by around 9MB,
103 equating to ~33% of the binary size. To enable thumb, set `'arm_thumb': 1`
104* TCmalloc does not have an ARM port, so it is disabled.