All Boards OpenEmbedded

Document created by jesseg Employee on Aug 15, 2012Last modified by Jodi Paul on May 16, 2013
Version 4Show Document
  • View in full screen mode

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.

Installing OpenEmbedded

 

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 necessary software

 

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 

Configuring OpenEmbedded

 

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 (you should not execute this as root):

$ bitbake bootstrap-image 

 

 

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

 

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/

Extracting the rootfs

 

If you got a successful compilation then extract it in your /tftboot directory:

$ cd /tftpboot 
$ mkdir oe 
$ cd oe 
$ sudo tar xvf /home/alan/oe/stuff/tmp/deploy/glibc/images/mx27ads/Angstrom-bootstrap-image-glibc-ipk-2009.X-test-20090618-mx27ads.rootfs.tar

Now just export your /tftpboot/oe directory on NFS as usual (editing /etc/exports).

 

 

Please remove init:/linuxrc from your kernel command line, otherwise init will break


Attachments

    Outcomes