Permalink
Browse files

Remove instructions and resources for the VM-based setup

It's like 12x slower than the chroot-based method, so there's really
no much point on keeping that around, just remove it.
  • Loading branch information...
mariospr committed Sep 30, 2016
1 parent 6989535 commit 94d035491c3edb0cb96c0300f3910915768edcf7
Showing with 2 additions and 105 deletions.
  1. +2 −82 README.md
  2. +0 −23 Vagrantfile
View
@@ -2,17 +2,7 @@
Resources to allow cross compiling WebKit2GTK+ for ARM.
Two methods:
* Using a local chroot (debootstrap + schroot): harder to setup, faster builds
* Using a Virtual Machine (using Vagrant): easier to setup, way slower builds
## Using a chroot (debootstrap + schroot)
This method is harder to setup than the one based on VMs, but build times are MUCH faster, so I'm describing it first.
As reference, I could cross compile WebKit2GTK+ 2.14.0 from scratch using a chroot in my desktop PC (12 Xeon cores at 3.54 GHz, 16GB DDR4 RAM, fast SSD) in less than 1 hour, while the VM-based method in the same machine (sharing only 8 cores and 12GB of RAM, though) I could only build ~15% in about 2h. So yes, the chroot method seems to be about 12x faster under those circumstances, which is why I'd recommend it instead of the easier method.
### Requirements
## Requirements
To do that, you have a different set of requirements:
@@ -23,7 +13,7 @@ To do that, you have a different set of requirements:
- Debian/Ubuntu: sudo apt-get install debootstrap chroot schroot
- Fedora: sudo dnf install debootstrap chroot schroot
### Instructions
## Instructions
(1) Now you have the requirements installed you can create the chroot:
```
@@ -90,73 +80,3 @@ setup.fstab=default/wily-amd64.fstab
$ make VERBOSE=1 -j12 # Or anything else, this is just what I use
```
## Using a Virtual Machine (using Vagrant)
The first method described simply creates a VM with all the needed tools to cross-compile WebKit2GTK+
for ARMv7, so it requires very few things, but still something is needed:
### Requirements
* A host machine with lots of CPUs and RAM (16GB recommended)
- Adjust Vagrantfile for the amount of resources you want to share (8 cores and 12GB by default)
* Vagrant >= 1.8.5 (tested with 1.8.5 on Debian Testing and Fedora 24)
* VirtualBox >=5.0 (tested with 5.0.16 on Debian Testing and 5.1.4 on Fedora 24)
* RootFS for the target device
- The RootFS needs to provide all the usual WebKit build dependencies
- You need to adjust the path in Vagrantfile and the CMake Toolchain file accordingly (e.g /schroot/eos-master-armhf)
* Checkout of WebKit2GTK+ source code
- Will be mounted under /home/vagrant/WebKitARM inside the VM
- You need to adjust the path in Vagrantfile accordingly
### Instructions
(1) To re-create the development environment, start by cloning the git repository:
```
$ git clone git@github.com:mariospr/webkit2gtk-ARM.git
$ cd webkit2gtk-ARM
```
(2) Now you edit `Vagrantfile` and provide the correct paths pointing to your WebKit checkout and the target RootFS
(3) Finally you initialize, provision and run the virtual machine:
```
$ vagrant up --provider=virtualbox # Will take some time the first time
$ vagrant ssh # Logs in into the Virtual Machine
```
(4) You'll be inside the VM with access to your WebKit checkout under `/home/vagrant/WebKitARM` and to the CMake Toolchain file under `/home/vagrant/armv7l-toolchain.cmake`, assuming that you have adjusted the paths in step 2.
(5) Create a BUILD directory in `/home/vagrant/WebKitARM`:
```
$ mkdir WebKitARM/BUILD && cd WebKitARM/BUILD
```
(6) Configure the build, passing any extra parameter you need. For instance:
```
$ cmake -DCMAKE_TOOLCHAIN_FILE=/home/vagrant/armv7l-toolchain.cmake \
-DPORT=GTK \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib/arm-linux-gnueabihf \
-DCMAKE_INSTALL_LIBEXECDIR=lib/arm-linux-gnueabihf \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_PLUGIN_PROCESS_GTK2=OFF \
-DENABLE_GEOLOCATION=OFF \
-DENABLE_GLES2=ON \
-DUSE_LD_GOLD=OFF \
-DUSE_GSTREAMER_GL=ON \
/home/vagrant/WebKitARM
```
(7) Build the thing:
```
$ make VERBOSE=1 -j12 # Or anything else, this is just what I use
```
(8) Once you finish, you'll have the BUILD objects under `BUILD/`, inside the checkout directory (both inside and outside the VM).
View
@@ -1,23 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/wily64"
config.vm.box_check_update = false
# Path to the WebKit checkout (adjust as needed)
config.vm.synced_folder "/home/mario/work/endless/github/WebKit-arm", "/home/vagrant/WebKitARM"
# Path to the target RootFS (adjust as needed)
config.vm.synced_folder "/schroot/eos-master-armhf", "/schroot/eos-master-armhf"
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.cpus = "8"
vb.memory = "12228"
end
# Bootstraping the machine: Install packages and copy the CMake Toolchain file
config.vm.provision "shell", path: "bootstrap.sh"
config.vm.provision "file", source: "armv7l-toolchain.cmake", destination: "armv7l-toolchain.cmake"
end

0 comments on commit 94d0354

Please sign in to comment.