QtMoko2

Build

Table of Content

How to build

Introduction

  • you should build natively, i.e. on an armhf Debian Wheezy or Jessie based SBC
  • you should have approx. 10-20 GB storage on this SBC
  • cross-compilation failed and we have no instructions
  • ideally you should build in a sandbox, i.e. a chroot into a freshly debootstrapped subdirectory
  • we set up ccache and a swapfile (needed if your machine has <= 512 MB RAM)

debootstrap the chroot sandbox

First, we debootstrap a fresh wheezy or jessie for armhf into some working directory (e.g. /debian-wheezy-armhf-qtmoko-build)

apt-get update && apt-get upgrade
apt-get install debootstrap psmisc bzip2 parted dosfstools
debootstrap --arch armhf wheezy /debian-wheezy-armhf-qtmoko-build http://ftp.us.debian.org/debian

mkdir -p "/debian-wheezy-armhf-qtmoko-build/proc" "/debian-wheezy-armhf-qtmoko-build/sys"
mount -t proc proc "/debian-wheezy-armhf-qtmoko-build/proc"
mount -t sysfs sys "/debian-wheezy-armhf-qtmoko-build/sys"
chroot /debian-wheezy-armhf-qtmoko-build
   # adjust the system to your needs (networking, tools, etc.)
   exit
umount /debian-wheezy-armhf-qtmoko-build/sys
umount /debian-wheezy-armhf-qtmoko-build/proc

Build from scratch

mkdir -p "/debian-wheezy-armhf-qtmoko-build/proc" "/debian-wheezy-armhf-qtmoko-build/sys"
mount -t proc proc "/debian-wheezy-armhf-qtmoko-build/proc"
mount -t sysfs sys "/debian-wheezy-armhf-qtmoko-build/sys"
chroot /debian-wheezy-armhf-qtmoko-build
  apt-get update
  apt-get install git quilt debhelper build-essential ccache
  dd if=/dev/zero of=/swapfile bs=1024 count=1048576
  mkswap /swapfile
  chmod 0600 /swapfile
  swapon /swapfile
  export PATH=/usr/lib/ccache:\$PATH
  ccache -M 5GB  # default is 1GB but we may need more
  git clone git://git.goldelico.com/gta04-qtmoko.git qtmoko
  cd qtmoko
  git checkout wheezy
  git submodule init
  git submodule update
  MORE_PACKAGES+=" libmng-dev libxext-dev libasound2-dev libdbus-1-dev libssl-dev libbluetooth-dev libxtst-dev libpng12-dev libv4l-dev libspeexdsp-dev libglib2.0-dev libsqlite3-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev libvorbis-dev libgps-dev"
  MORE_PACKAGES+=" libtiff4-dev libjpeg8-dev libts-dev"   # wheezy
  # MORE_PACKAGES+=" libtiff5-dev libjpeg62-turbo-dev"      # jessie
  apt-get install $MORE_PACKAGES
  debian/rules get-orig-source
  dpkg-buildpackage -F
  swapoff /swapfile
  exit
umount /debian-wheezy-armhf-qtmoko-build/sys
umount /debian-wheezy-armhf-qtmoko-build/proc

Created: 2 months 12 days ago
by Nikolaus Schaller

Updated: 2 months 12 days ago
by Nikolaus Schaller

Old Revisions