1 # Linux Chromium Arm Recipes
5 ## Recipe1: Building for an ARM CrOS device
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
12 (mostly b/c of the ease of attaching files to sites).
15 ## Recipe2: Explicit Cross compiling
17 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.
20 These instruction are designed to run on Ubuntu Precise.
22 ### Installing the toolchain
24 The install-build-deps script can be used to install all the compiler
25 and library dependencies directly from Ubuntu:
27 $ ./build/install-build-deps.sh --arm
29 ### Installing the rootfs
31 A prebuilt rootfs image is kept up-to-date on Cloud Storage. It will
32 automatically be installed by gclient runhooks installed if you have
33 `target_arch=arm` in your `GYP_DEFINES`.
35 To install the sysroot manually you can run:
37 ./chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py \
42 To build for ARM, using the clang binary in the chrome tree, use the following
45 export GYP_CROSSCOMPILE=1
46 export GYP_DEFINES="target_arch=arm"
48 There variables need to be set at gyp-time (when you run `gyp_chromium`),
49 but are not needed at build-time (when you run make/ninja).
53 ### Automated Build and Testing
55 Chromium's testing infrastructure for ARM/Linux is (to say the least)
56 in its infancy. There are currently two builders setup, one on the
57 FYI waterfall and one the the trybot waterfall:
59 * [Linux ARM Cross-Compile](http://build.chromium.org/p/chromium.fyi/builders/Linux%20ARM%20Cross-Compile)
60 * [linux_arm](http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_arm)
62 These builders cross compile on x86-64 and then trigger testing on real ARM hard
65 * [Linux ARM Tests (Panda)](http://build.chromium.org/p/chromium.fyi/builders/Linux%20ARM%20Tests%20%28Panda%29/)
66 * [linux_arm_tester](http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_arm_tester)
68 Unfortunately, even those the builders are usually green, the testers are not
69 yet well maintained or monitored.
71 There is compile-only trybot and fyi bot also:
73 * [Linux ARM](http://build.chromium.org/p/chromium.fyi/builders/Linux%20ARM)
74 * [linux_arm_compile](http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_arm_compile)
78 If you don't have a real ARM machine, you can test with QEMU. For instance,
79 there are some prebuilt QEMU Debian images here:
80 http://people.debian.org/~aurel32/qemu/. Another option is to use the rootfs
81 generated by rootstock, as mentioned above.
83 Here's a minimal xorg.conf if needed:
87 Identifier "Generic Keyboard"
89 Option "XkbRules" "xorg"
90 Option "XkbModel" "pc105"
91 Option "XkbLayout" "us"
95 Identifier "Configured Mouse"
100 Identifier "Configured Video Device"
102 Option "UseFBDev" "true"
106 Identifier "Configured Monitor"
110 Identifier "Default Screen"
111 Monitor "Configured Monitor"
112 Device "Configured Video Device"
116 Modes "1024x768" "800x600" "640x480"
123 * To building for thumb reduces the stripped release binary by around 9MB,
124 equating to ~33% of the binary size. To enable thumb, set `'arm_thumb': 1`
125 * TCmalloc does not have an ARM port, so it is disabled.