Poky

From OMAPpedia

Revision as of 21:58, 28 June 2011 by Jayabharath (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] Introduction

Poky is a embedded Linux distribution focused on mobile and handsets. Poky is built using OpenEmbedded. It is a complete software development environment for the creation of Linux devices. Poky aids the design, development, building, debugging, simulation and testing of a complete & modern software stack using Linux, the X windowing system and GNOME Mobile based application frameworks.

If you are inside Texas Instruments, you might be interested in Poky for TI Developpers, note that it is an intranet link restricted to people inside TI network.


[edit] System setup

References on OE, Bitbake, Poky etc can be found in Technical References page

[edit] Installation

[edit] Requirements

Install a Linux distribution in a PC. Ubuntu 9.10 is recommended. Install some necessary libraries by typing in the console:

$ sudo apt-get install build-essential python diffstat texinfo texi2html cvs subversion wget gawk help2man 
$ sudo apt-get install bitbake python2.4-dev python-dev git-core gnupg corkscrew quilt curl flex bison
$ sudo apt-get install xsltproc tofrodos python-psyco socket mercurial

Make a shared directory and change permissions to give read/write/execution permissions to appropriate users:

  $ sudo mkdir /usr/share/oe
  $ sudo chown -R $USER /usr/share/oe
  $ sudo chmod 775 /usr/share/oe
$ sudo dpkg-reconfigure dash
$ sudo apt-get install gcc-4.3 g++-4.3
$ sudo rm /usr/bin/gcc
$ sudo rm /usr/bin/g++
$ sudo ln -s /usr/bin/gcc-4.3 /usr/bin/gcc
$ sudo ln -s /usr/bin/g++-4.3 /usr/bin/g++

[edit] Configuring tools (subversion, wget, git)

Set proxy host and port in subversion editing /etc/subversion/servers file if you want to have system-wide config, or ~/.subversion/servers if you want to have user-specific configuration.

 $ sudo gedit /etc/subversion/servers (or ~/.subversion/servers) 
… #[group1] http-proxy-host = <proxy_name> http-proxy-port = <proxy_port> … [global] http-proxy-exceptions = *.xyz.com http-proxy-host = <proxy_name> http-proxy-port = <proxy_port> …

Set proxy host and port in wget editing /etc/wgetrc file if you want to have system-wide config, or ~/.wgetrc if you want to user-specific configuration.

   $ sudo gedit /etc/wgetrc (or ~/.wgetrc) 
http_proxy = http://<proxy_name>:<proxy_port> ftp_proxy = http://<proxy_name>:<proxy_port>

[edit] Configuring GIT Proxy

Configure git proxy creating the script:

   $ gedit ~/bin/git-proxy.sh 
#!/bin/sh exec corkscrew <proxy_name> <proxy_port> $*

Change permission to execute it

   $ chmod a+x ~/bin/git-proxy.sh

Configure git to use this script

   $ git config --global core.gitproxy ~/bin/git-proxy.sh

For multiple git proxies, see GIT Proxies

[edit] ARM Cross Compiler

CodeSourcery cross-compiling toolchain is needed. Depending on the TI release, it is either version 2008q3 or 2009q1. The toolchain can be downloaded from: CodeSourcery.

[edit] Downloading Poky

Export POKYSRC variable (place where you want Poky source)‏, change to that directory and download source

  $ export POKYSRC="place_where_you_want_poky_source"
  $ cd $POKYSRC
  $ svn co -r 5728 -q http://svn.o-hand.com/repos/poky/trunk poky 
Export POKY variable: $ export POKY=$POKYSRC/poky

[edit] Configuring Poky

Two files (local.conf and site.conf) inside $POKY need to be configured before starting to build Poky. There are TI sample files located in meta-texasinstruments/conf/misc that can be copied to the poky/build/conf directory. (In the site.conf if DL_DIR is commented out all the source tarballs used for the build will be accessed and stored in the poky/sources directory.) It is possible to build for a Zoom2 or a Zoom3 board, so select the appropriate board:

build/conf/local.conf 
... BBFILES = "\ ${OEROOT}/meta/packages/*/*.bb" BBFILE_COLLECTIONS = "normal extras" BBFILE_PATTERN_normal = "^${OEROOT}/meta/" BBFILE_PATTERN_extras = "^${OEROOT}/meta-extras/" BBFILE_PRIORITY_normal = "5" BBFILE_PRIORITY_extras = "5" BBPATH = "${OEROOT}/meta:${OEROOT}/meta-extras" ... PARALLEL_MAKE = "-j 4" ... MACHINE ?= "zoom2" MACHINE ?= "zoom3" ... DISTRO ?= "poky" ...


build/conf/site.conf 
...
CVS_PROXY_HOST = <proxy_name>
CVS_PROXY_PORT = <proxy_port>
...
GIT_PROXY_HOST = <proxy_name>
GIT_PROXY_PORT = <proxy_port>
...
#DL_DIR = "/usr/share/oe"
...

[edit] Recipe to build Zoom2

This is currently built from a private branch. This has a new zoom2.conf board configuration file that specifies board characteristics, and a new Linux kernel recipe linux-omap3-pm_git.bb which builds Kevin Hilman's PM branch (latest) for your board.

  git clone git://git.pokylinux.org/poky-contrib.git

This will create a poky-contrib directory and inside it the meta data for building poky will be found. Switch to the branch (origin/mturquette/zoom2) that has the Zoom2 recipe

   git branch -a (this will list all the branches available)
   git checkout -b zoom2 --track origin/mturquette/zoom2

The "git branch -a" command will list something like this:

 marcin/pinky
 origin/HEAD
 origin/marcin/elroy
 origin/marcin/pinky
 origin/marcin/trunk
 origin/mrchapp/beaglemm
 origin/mturquette/zoom2

Now you're in the Zoom2 branch.

[edit] Building Poky

Have the local.conf and site.conf files configured above copied into build/conf.

Initialize the build environment running the script

source poky-init-build-env

Build Poky

bitbake poky-image-sato

Poky filesystem will be available in /build/tmp/deploy/images folder


[edit] Troubleshooting

/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).

sudo sysctl -w vm.mmap_min_addr=0

[edit] Poky Debugging

To get poky build with debug symbols modify the local.conf as follows

DEBUG_BUILD = "1"

[edit] Debugging with GDB

You can run GDB directly on target but in case it crashes with the error "libthread_db.so.1 cannot be found" which makes thread aware debugging not to work from gdb, and seems to prevent remote debugging with gdbserver altogether. This file can be found in $POKY/build/tmp/staging/armv7a-none-linux-gnueabi/lib/libthread_db.so.1 and should be copied to the /lib directory of your target filesystem.

[edit] using gdbserver

Using gdbserver allows remote debugging from the PC. To use gdbserver:

on target:

  # gdbserver ip_addr_pc*:1234** program [args.....]

on PC:

  Go to the path arm-2008q3/bin/arm-none-linux-gnueabi-gdb path and run 
  (gdb) target remote ip_addr_board***:1234


'set solib-absolute-prefix' lets you to specify the path to the rootfs so GDB can find the library files.

[edit] Community Release

It is a software release to the OMAP Linux community. It is based on L23.i3.x release with much of the TI code coming from the open source code. In addition, it will have software binaries from TI for OMAP HW acceleration & connectivity integration. The intent of the community release is to enable OMAP community to leverage the power of the platform.



[edit] Subscribe to e-mail lists

First, and very important suggested step, subscribe to the Poky e-mail lists for the community:

For Community Poky List: send an e-mail to: poky+subscribe@openedhand.com You can leave in blank the subject and body message. Upon receiving a confirmation e-mail, reply to it.




Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox