Building OpenEmbedded for iMX31

OpenEmbedded

OpenEmbedded is a build system developed initially by OpenZaurus team. They have started using BuildRoot build system, but during development BuildBoot didn’t fit developer needs.

In order to install OpenEmbedded you need to follow the steps below:
Create base directories to install

First all create the directory where you will install OpenEmbedded:

$ cd ~
$ mkdir oe
$ cd oe
$ mkdir stuff

Download the bitbake. Bitbake is (for simplification) tool to execute task and manage metadata files.

$ cd ~/oe/stuff
$ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake

If you can’t download bitbake using subversion (svn), then download from site:

$ cd ~/oe/stuff
$ wget http://download.berlios.de/bitbake/bitbake-1.8.12.tar.gz
$ tar zxvf bitbake-1.8.12.tar.gz
$ mv bitbake-1.8.12 bitbake

Bitbake is a set of python scripts, then you can to use Python JIT (Just-In-Time) Psyco compiler to speed it up:

$ sudo apt-get install python-psyco

Download openembedded:

$ git clone git://git.openembedded.net/openembedded

If you are behind firewall which blocks git port, then download though http:

$ git clone http://repo.or.cz/r/openembedded.git

Create local configuration:

$ cd ~/oe/stuff
$ mkdir -p build/conf
$ cp openembedded/conf/local.conf.sample build/conf/local.conf
$ vi build/conf/local.conf

Edit this configuration file and define the variable BBFILES, MACHINE, DISTRO, and TARGET_OS. See the example for i.MX31ADS board:

BBFILES := “${HOME}/oe/stuff/openembedded/recipes/*/*.bb”
MACHINE = “mx31ads”
DISTRO = “angstrom-2008.1”
TARGET_OS = “linux-gnueabi”

Also remove or comment the last line:

REMOVE_THIS_LINE:=”${@bb.fatal(‘Read the comments in your conf/local.conf’)}”

Setup the environment

Export environment variables necessary by bitbake:

$ export BBPATH=~/oe/stuff/build:~/oe/stuff/openembedded
$ export PATH=~/oe/stuff/bitbake/bin:$PATH

Change mmap_min_addr to 0:

$ sudo -s
# echo 0 > /proc/sys/vm/mmap_min_addr

If you don’t want do that every time then edit your /etc/sysctl.conf and add:

vm.mmap_min_addr = 0

If user distro uses dash instead bash as shell, then change it to bash:

# cd /bin
# rm sh
# ln -s bash sh

Building image

Test OpenEmbedded building a basic image:

$ bitbake bootstrap-image

Some packages may be needed to run bitbake. On Ubuntu they are: help2man, diffstat, texi2html, texinfo

The bootstrap-image is just a basic image only with kernel and shell, but you can choice other image like gpe-image, etc.

If you have problems because you’re using proxy, open the file /etc/wgtrc and add proxy information, ie:

http_proxy = http://your_proxy:port/
ftp_proxy = http://your_proxy:port/

Source http://imxdev.org

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: