CrossCompile

Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2013-09-11 11:24:17
Size: 370
Editor: xnox
Comment:
Revision 8 as of 2014-04-02 22:27:22
Size: 1398
Editor: 209-6-88-107
Comment: added a note how to disable sbuild's build-log email feature
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe Touch/CrossCompile here. == Trusty click chroot ==
Line 3: Line 3:
TODO

== Trusty sbuild chroot ==

One time setup:
{{{#!sh
$ mk-sbuild --skip-proposed --target armhf trusty
}}}

Build the package:
{{{#!sh
$ sbuild -A -d trusty --host armhf package*.dsc
}}}

'''Note''' - you may want to use ''-n'' to disable sbuild's automatic build log email feature which is enabled by default, but usually not properly configured. See ''man sbuild'' for more information.

== Saucy chroot ==
Here is a quick how-to, cross-compiling with cmake to build a qml extension.

{{{#!sh
# Create chroot with cross-compiler
Line 5: Line 26:

# Install build-dependencies
Line 7: Line 30:

# Change into your sources
$ cd src/
$ mkdir armhf-build
$ cd armhf-build

# Prepare environment
$ export $(dpkg-architecture -aarmhf)
$ export CMAKE_TOOLCHAIN_FILE=/etc/dpkg-cross/cmake/CMakeCross.txt

# Build
$ cmake ../

# Fix up paths to moc
$ find . -name AutomocInfo.cmake | xargs sed -i 's;AM_QT_MOC_EXECUTABLE .*;AM_QT_MOC_EXECUTABLE "/usr/lib/'$DEB_BUILD_MULTIARCH'/qt5/bin/moc");'

$ make
$ find . -name '*.so'
}}}

Trusty click chroot

TODO

Trusty sbuild chroot

One time setup:

$ mk-sbuild --skip-proposed --target armhf trusty

Build the package:

$ sbuild -A -d trusty --host armhf package*.dsc

Note - you may want to use -n to disable sbuild's automatic build log email feature which is enabled by default, but usually not properly configured. See man sbuild for more information.

Saucy chroot

Here is a quick how-to, cross-compiling with cmake to build a qml extension.

# Create chroot with cross-compiler
$ mk-sbuild --target armhf --name cmake saucy
$ sudo schroot -c source:cmake-amd64-armhf -u root

# Install build-dependencies
$ apt-get install libqt5svg5-dev:armhf libqt5v8-5-dev:armhf libqt5xmlpatterns5-dev:armhf qt3d5-dev:armhf qtbase5-dev:armhf qtdeclarative5-dev:armhf qtscript5-dev:armhf qtsensors5-dev:armhf qttools5-dev:armhf
$ apt-get install cmake

# Change into your sources
$ cd src/
$ mkdir armhf-build
$ cd armhf-build

# Prepare environment
$ export $(dpkg-architecture -aarmhf)
$ export CMAKE_TOOLCHAIN_FILE=/etc/dpkg-cross/cmake/CMakeCross.txt

# Build
$ cmake ../

# Fix up paths to moc
$ find . -name AutomocInfo.cmake | xargs sed -i 's;AM_QT_MOC_EXECUTABLE .*;AM_QT_MOC_EXECUTABLE "/usr/lib/'$DEB_BUILD_MULTIARCH'/qt5/bin/moc");'

$ make
$ find . -name '*.so'

Touch/CrossCompile (last edited 2016-03-22 06:51:23 by localhost)