Your partner for your innovative projects ...                                            

Actualités OSELIS

 

contact

 

French (Fr)English (United Kingdom)
E-mail Print PDF

Open embedded — Tsunami v1 documentation

 

Open embedded

Configuration of the Tsunami board

The OE reference tutorial is under http://docs.openembedded.org/usermanual/usermanual.html

Configuration:

mkdir ~/open_embedded
export OEBASE=/home/account/open_embedded
mkdir -p $OEBASE/build/conf

cd $OEBASE
wget http://download.berlios.de/bitbake/bitbake-1.8.18.tar.gz
tar -xvzf bitbake-1.8.18.tar.gz
mv bitbake-1.8.18 bitbake

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

export export PATH=$OEBASE/bitbake/bin:$PATH; export BBPATH=$OEBASE/build:$OEBASE/openembedded; export BB_ENV_EXTRAWHITE="OEBASE"

cp openembedded/conf/local.conf.sample build/conf/local.conf

The following packages need to be installed:

sudo apt-get install diffstat texi2html subversion chrpath python-ply python-progressbar

For ubuntu, remplace dash by bash:

sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh

The Tsunami board is not supported by default by OE, the present files have to copied in the oe_files folder:

cp -r oe_files/* ~/open_embedded/

This allows the integration of the practical kernel on the board, within OE. U-boot wasn’t modified because actually not used, the one from beagleboard is taken by default.

Warning

In the conf/machine/include/omap3.inc file, it is better to comment the line in relation with the choice of kernel, for instance:

#PREFERRED_PROVIDER_virtual/kernel = "linux-omap"

You can then choose preferences, and change your configuration paths in the build/conf/local.conf file.

Then you can launch the generation of the kernel and rootfs:

bitbake console-image

The first time, this can takes several hours.

Warning

Some recipes may fail while executing, due to everydays evolution of OE. The error can come from md5, a dead link, versions conflic, etc ... You can yourself solve the error or remove the recipe.

Use of rootfs

Once the generation is finished, rootfs has to be installed:

cd ~/open_embedded/tao3530/deploy/eglibc/images/tao3530
sudo mkdir /root/oe_tao3530
sudo tar xvf Angstrom-console-image-eglibc-ipk-v20110428-tao3530.rootfs.tar -C /root/oe_tao3530

Then, like previously, rootfs needs to be added in NFS:

sudo su
echo "/root/buildroot_a8/ *(rw,sync,no_root_squash)" >> /etc/exports
/etc/init.d/nfs-kernel-server restart
exit

And change u-boot arguments:

setenv linux_args setenv bootargs console=${console} nfsroot=${serverip}:/root/oe_tao3530 ip=${ipaddr}:${serverip}:192.168.1.254:255.255.255.0::eth0:off; tftpboot 84000000 uImage; run linux_args; bootm 84000000
[...]

.---O---.
|       |                  .-.           o o
|   |   |-----.-----.-----.| |   .----..-----.-----.
|       |     | __  |  ---'| '--.|  .-'|     |     |
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'
                -'  |
                '---'

The Angstrom Distribution tao3530 ttyS2

Angstrom v20110421 tao3530 ttyS2

tao3530 login: root
root@tao3530:~#

Adding applications on the FS

The FS contains a number of applications, defined by the ‘console-image’ recipe.

To add an application, for instance gdbserver, the recipe has to be built:

bitbake gdbserver

Then, in order to deploy the application without the need to build again rootfs, use opkg.

Under OE, the built applications are packaged using .ipk, all ipk are under the ~open_embedded/tao3530/deploy/eglibc/ipk folder. they are often divided in 3 directories:

  • one for all the targets
  • one for targets linked to a specific architecture (eg: armv7a)
  • one for the specific platform

Each directory contains a Packages file , parsed by opkg, with package information such as a description or dependances with other packages.

When building a new application, this file has to be updated using the following command:

bitbake package-index

In order for this file to be accessible from the target, an HTTP server has to be setup on the host:

sudo apt-get install apache2

Then a link to the 3 folders explained previously must be created:

mkdir /var/www/ipk_tao3530
cd /var/www/ipk_tao3530
ln -s ~/open_embedded/tao3530/deploy/eglibc/ipk/all all
ln -s ~/open_embedded/tao3530/deploy/eglibc/ipk/armv7a armv7a
ln -s ~/open_embedded/tao3530/deploy/eglibc/ipk/tao3530 tao3530

The configuration on the host side is done, now the taget side has to be completed. To do that, go under /etc/opkg folder of the target, meaning /root/oe_tao3530/etc/opkg, and remove all the files except arch.conf and opkg.conf.

Create the 3 following files with this content:

192.168.1.4 is the IP of your development station.

Then, update the index:

# opkg update

It is now possible to directly install gdbserver:

# opkg list | grep gdb
gdbserver - 7.2-r9.0.9 - gdb - GNU debugger
gdbserver-dbg - 7.2-r9.0.9 - gdb - GNU debugger
gdbserver-dev - 7.2-r9.0.9 - gdb - GNU debugger
[...]
# opkg install gdbserver

Debug your applications using gdb

If you like to debug your applications using gdb, you first need to start gdbserver on the target:

gdbserver 192.168.1.4:5432 hello

192.168.1.4 is the IP of your development station and 5432 a random port.

Then, start the debug on the host:

arm-angstrom-linux-gnueabi-gdb hello --command=gdb.sh

Content of the gdb.sh file:

set sysroot /home/account/open_embedded/tao3530/deploy/eglibc/sdk/toolchain/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi
target remote 192.168.1.50:5432

The sysroot path corresponds to a rootfs with libraries. This can also be /root/oe_tao3530.

If you don’t have the toolchain, it is possible to build it:

bitbake meta-toolchain

and install it by decompressing the following archive:

~/stage_tb/open_embedded/tao3530/deploy/eglibc/sdk

Qt

Tutorial explaining the procedure: http://docs.openembedded.org/usermanual/html/ch05s08.html

White papers

 Adding a module to the kernel : A module can be loaded and unloaded on demand, the benefit of a module is that it does'nt reside into the monolithic kernel image. Read more...


 ARM simulation with qemu and NFS : First step, the development PC station configuration. This phase consists to add and configure a "bridge". Read more...


 Getting started with OMAP3530 : Basic environment setup of Tsunami board, TechNexion PSP installation Read more...


Buildroot on OMAP3530 : In this toturial, the 2011.02 version of builroot was used. Read more...


Open embedded on OMAP3530 : Configuration of Tsunami board. The OE reference tutorial is under... Read more...


DVSDK on OMAP3530 : DVSDK is a development environment done by TI for its platforms, enabling an... Read more...