Build QT Demo for AT91SAM9N12-EK

Introduction

OpenEmbedded is a powerful building environment. OpenEmbedded has good support for porting Nokia QT to various platforms, for example AT91 platform. The support for our AT91 products has been added permitting to offer a root file system with a wide range of applications.

It will allow you to build the cross tool chain, a small root filesystem image of different types (jffs2, tar, ubi) and the Atmel 2.6.39 kernel image.

Included applications into the root filesystem

The root filesystem images contain the following applications among others:

  • Busybox
  • Audio
    • alsa-utils
    • alsamixer
    • madplay
    • mplayer
  • Compressors and decompressors
    • bzip2
  • Hardware handling
    • udev
  • Networking
    • bridge-utils
    • bluez
    • can-utils
    • dropbear
    • iperf
    • iproute2
    • iptables
    • portmap
    • ppp
    • wireless tools
    • wpa_supplicant
  • Shell and utilities
    • bash
    • file
    • mtd-utils
    • opkg
    • usb-utils

Pre-requires

Here are the reference pages for setting up an OpenEmbedded building environment.

Note however that most of time, on a development host, those packages are often already installed.

Building environment

A step-by-step comprehensive installation is explained in the OpenEmbedded Getting Started page. The following lines have to be considered as an add-on that is AT91 specific or that can facilitate your setup.

Have a look at the OE directory tree to figure out what your working environment tree will look like. In the following procedure, each time we speak about the base directory, we refer to the stuff directory.

Getting BitBake

Take it through the BitBake build tool website and take the latest archive tarball. follow the advice: simply install at the base of your OE directory tree and make a generic link:

$ wget http://download.berlios.de/bitbake/bitbake-1.12.0.tar.gz
$ tar xvzf bitbake-1.12.0.tar.gz
$ ln -s bitbake-1.12.0 bitbake

Getting OpenEmbedded

Once at the base of your OE directory tree, download a snapshot of the OpenEmbedded database using the GIT Souce Code Management tool.

$ git clone git://git.openembedded.org/openembedded openembedded

Warning, important Make sure to call the directory where you will clone the GIT source openembedded. This name will be used in the following procedure and in the site.conf configuration file.

Then create a local branch based on OpenEmbedded 2011.03-maintenance branch:

$ cd openembedded
$ git checkout -b 2011.03-mybranch origin/2011.03-maintenance
$ cd ..

AT91 OpenEmbedded overlay tree

In addition to the upstream recipes, we also have a set of our own recipes or modifications of the original ones. So, the following overlay tree will modify current OE original recipes.

Pointing hand note however that the goal of those recipes is to merge the most of it bits into the mainstream OE tree.

Description Sources Overlay directory tree archive
OpenEnbedded database Web interface:
http://cgit.openembedded.org/
Branch: 2011.03-maintenance
oe_at91sam.tgz

Then download and install the overlay tree archive, be sure to be at the base of your OE directory tree and:

$ wget ftp://ftp.linux4sam.org/pub/oe/linux4sam_9n12_m2/oe_at91sam.tar.bz
$ tar xvzf oe_at91sam.tar.bz
This archive contains the configuration files, recipes that will overload the original ones from the OpenEmbedded project. The oe_env.sh script will allow you to setup local configuration variables needed for your rootfs to build.

Setup local configuration

The local configuration is located in oe_at91sam/conf/local.conf . This configuration file will overload the openembedded/conf/local.conf one.

Pointing hand Read comments in it as it will bring you valuable information and allow you to adapt it to your own environment and building host (directory structure for example). Choose the proper machine type: we will use at91sam9n12ek for this setup:

MACHINE ?= "at91sam9n12ek"

Start building

Be sure to always be in your OE directory tree.

To start the building, source the oe_env.sh script:

$ source ./oe_env.sh
Then begin building the distribution with a little set of packages:
$ bitbake base-image
Pointing hand Even a minimal image will require a big amount of time because of the cross-toolchain building process.

The qtdemo images are built using the following recipes:

$ bitbake qt4e-at91sam9n12ek-image

Additional information

Connect to the Ångström building page where detailed information are provided.

-- EricXu - 15 Mar 2012