ArmCrossCompiling

Introduction

Oxide supports cross compiling ARM builds with Ubuntu's multiarch toolchain. As some build dependencies for the target architecture may not be fully coinstallable with the corresponding native architecture packages, it is recommended that you set up a dedicated chroot for cross compiling so that you don't break your native build environment.

System requirements

TBC

Configuring you build environment

Creating a chroot

You will want to create a chroot to use as your build environment, so that you do not break your native build environment. There are quite a few guides already to help you set up a chroot with debootstrap and schroot. The chroot should match your native architecture.

Enable ARM as a foreign architecture

Once your chroot is configured, you need to enable armhf as a foreign architecture in dpkg, from inside your new chroot. To do this, please run

sudo dpkg --add-architecture armhf

Update your sources.list

The /etc/apt/sources.list in your chroot will need modifying to point to a valid source for armhf packages. An example sources.list might look like this:

deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu <codename> main universe
deb [arch=armhf] http://ports.ubuntu.com/ <codename> main universe

... where <codename> is the Ubuntu release (eg, vivid)

Additional steps for x86-64 users

If your host architecture is x86-64, you will also need to enable i386 as a foreign architecture in dpkg, from inside your chroot. To do this, please run:

sudo dpkg --add-architecture i386

Build prerequisites

The following packages are required to cross-compile Oxide with Ubuntu's multiarch toolchain:

  • cmake (native)
  • gettext (native)
  • qtchooser (native)
  • qtbase5-dev (armhf)
  • qtbase5-dev-tools (native)
  • qtdeclarative5-dev (armhf)
  • qtbase5-private-dev (armhf)
  • qtdeclarative5-private-dev (armhf)
  • qtpositioning5-dev (armhf)
  • qtfeedback5-dev (armhf)
  • qtsystems5-dev (armhf)
  • make (native)
  • ninja-build (native)
  • python (native)
  • g++ (native)
  • g++-arm-linux-gnueabihf (native)
  • pkg-config (native)
  • pkg-config-arm-linux-gnueabihf (native)
  • libglib2.0-dev (armhf)
  • libnss3-dev (armhf)
  • libpci-dev (armhf)
  • libgcrypt-dev (armhf)
  • libdbus-1-dev (armhf)
  • libudev-dev (armhf)
  • libpulse-dev (armhf)
  • libasound2-dev (armhf)
  • libx11-dev (armhf)
  • libxi-dev (armhf)
  • libcap-dev (armhf)
  • libfontconfig1-dev (armhf)
  • libfreetype6-dev (armhf)
  • libpango1.0-dev (armhf)
  • libxext-dev (armhf)
  • libxcomposite-dev (armhf)
  • libxrender-dev (armhf)
  • libxcursor-dev (armhf)
  • libxrandr-dev (armhf)
  • libxtst-dev (armhf)
  • libxdamage-dev (armhf)
  • libxfixes-dev (armhf)
  • libkrb5-dev (armhf)
  • libssl-dev (armhf)
  • libgdk-pixbuf2.0-dev (armhf)
  • libnotify-dev (armhf)
  • libffi-dev (armhf)
  • libandroid-properties-dev (armhf)
  • libhybris-dev (armhf)
  • python-psutil (native)
  • gperf (native)
  • bison (native)
  • git (native)

In addition, x86-64 users will need the following additional packages (for vivid):

  • libc6-dev-i386 (native)
  • lib32stdc++-4.9-dev (native)
  • linux-libc-dev (i386)

To install these, you can just run:

sudo apt-get install --no-install-recommends cmake gettext qtchooser qtbase5-dev:armhf qtbase5-dev-tools qtdeclarative5-dev:armhf qtbase5-private-dev:armhf qtdeclarative5-private-dev:armhf qtpositioning5-dev:armhf qtfeedback5-dev:armhf qtsystems5-dev:armhf make ninja-build python g++ g++-arm-linux-gnueabihf pkg-config pkg-config-arm-linux-gnueabihf libglib2.0-dev:armhf libnss3-dev:armhf libpci-dev:armhf libgcrypt-dev:armhf libdbus-1-dev:armhf libudev-dev:armhf libpulse-dev:armhf libasound2-dev:armhf libx11-dev:armhf libcap-dev:armhf libfontconfig1-dev:armhf libfreetype6-dev:armhf libpango1.0-dev:armhf libxext-dev:armhf libxcomposite-dev:armhf libxrender-dev:armhf libxcursor-dev:armhf libxrandr-dev:armhf libxtst-dev:armhf libxdamage-dev:armhf libxfixes-dev:armhf libkrb5-dev:armhf libssl-dev:armhf libgdk-pixbuf2.0-dev:armhf libnotify-dev:armhf libffi-dev:armhf libandroid-properties-dev:armhf libhybris-dev:armhf python-psutil gperf bison git

x86-64 users will want to run:

sudo apt-get install --no-install-recommends cmake gettext qtchooser qtbase5-dev:armhf qtbase5-dev-tools qtdeclarative5-dev:armhf qtbase5-private-dev:armhf qtdeclarative5-private-dev:armhf qtpositioning5-dev:armhf qtfeedback5-dev:armhf qtsystems5-dev:armhf make ninja-build python g++ g++-arm-linux-gnueabihf pkg-config pkg-config-arm-linux-gnueabihf libglib2.0-dev:armhf libnss3-dev:armhf libpci-dev:armhf libgcrypt-dev:armhf libdbus-1-dev:armhf libudev-dev:armhf libpulse-dev:armhf libasound2-dev:armhf libx11-dev:armhf libcap-dev:armhf libfontconfig1-dev:armhf libfreetype6-dev:armhf libpango1.0-dev:armhf libxext-dev:armhf libxcomposite-dev:armhf libxrender-dev:armhf libxcursor-dev:armhf libxrandr-dev:armhf libxtst-dev:armhf libxdamage-dev:armhf libxfixes-dev:armhf libkrb5-dev:armhf libssl-dev:armhf libgdk-pixbuf2.0-dev:armhf libnotify-dev:armhf libffi-dev:armhf libandroid-properties-dev:armhf libhybris-dev:armhf python-psutil gperf bison git libc6-dev-i386 lib32stdc++-4.9-dev linux-libc-dev:i386

Oxide/ArmCrossCompiling (last edited 2017-01-18 14:57:23 by santoshbit2007)