| 63 | |
| 64 | == Cross Compiling for ARM devices == |
| 65 | |
| 66 | If you need to make ARM builds you might find useful the [https://github.com/mariospr/webkit2gtk-ARM resources hosted in this git repository] which basically provide a [https://cmake.org/cmake/help/v3.6/manual/cmake-toolchains.7.html#cross-compiling-for-linux CMake Toolchain File] to build WebKit2GTK+, together with instructions on how to setup a local chroot environment to use it, so that both the environment and the build are reproducible. |
| 67 | |
| 68 | Wrapping up the instructions in there a bit, you'd basically have to follow 3 steps (or 2, after the initial setup): |
| 69 | 1. Create the chroot and provision it, using the [https://github.com/mariospr/webkit2gtk-ARM/blob/master/bootstrap.sh bootstrap script] provided (only once) |
| 70 | 2. Configure the build as you please, pointing to the [https://github.com/mariospr/webkit2gtk-ARM/blob/master/armv7l-toolchain.cmake CMake Toolchain provided], which you placed somewhere in your disk |
| 71 | {{{ |
| 72 | $ mkdir /path/to/your/WebKit/BUILD && cd /path/to/your/WebKit/BUILD |
| 73 | $ cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/armv7l-toolchain.cmake \ |
| 74 | -DPORT=GTK \ |
| 75 | -DCMAKE_BUILD_TYPE=Release \ |
| 76 | -DCMAKE_INSTALL_SYSCONFDIR=/etc \ |
| 77 | -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ |
| 78 | -DCMAKE_INSTALL_PREFIX=/usr \ |
| 79 | -DCMAKE_INSTALL_LIBDIR=lib/arm-linux-gnueabihf \ |
| 80 | -DCMAKE_INSTALL_LIBEXECDIR=lib/arm-linux-gnueabihf \ |
| 81 | -DCMAKE_VERBOSE_MAKEFILE=ON \ |
| 82 | -DENABLE_PLUGIN_PROCESS_GTK2=OFF \ |
| 83 | -DENABLE_GEOLOCATION=OFF \ |
| 84 | -DENABLE_GLES2=ON \ |
| 85 | -DUSE_LD_GOLD=OFF \ |
| 86 | -DUSE_GSTREAMER_GL=ON \ |
| 87 | /path/to/your/WebKit |
| 88 | }}} |
| 89 | 3. Build it: |
| 90 | {{{ |
| 91 | $ make VERBOSE=1 -j12 # Or anything else, this is just what I use |
| 92 | }}} |
| 93 | |
| 94 | This has been tested with WebKit2GTK 2.12.x and 2.14.x releases as well as with trunk. If you find any issue/comment, please comment on the [https://github.com/mariospr/webkit2gtk-ARM github repo], or open a pull request. |
| 95 | |