Skip to content
icepeda edited this page Sep 13, 2010 · 35 revisions

About Poky

This is a forked repository. Have a look at mturquette’s meta-texasinstruments wiki for more information.

Poky is a open source platform build tool. It is a complete software development environment for the creation of Linux devices. It aids the design, development, building, debugging, simulation and testing of complete modern software stack using Linux, the X Window System and GNOME Mobile based application frameworks. It is based on [http://openembedded.org/ OpenEmbedded] but has been customised with a particular focus.

Poky was setup to:

  • Provide an open source Linux, Matchbox, GTK+, Pimlico, Clutter, and other GNOME Mobile technologies based full platform build and development tool.
  • Create a focused, stable, subset of OpenEmbedded that can be easily and reliably built and developed upon.
  • Fully support wide range of x86 and ARM hardware and device virtualisation.

Features

Full, fast, cross device filesystem creation with Linux Kernel 2.6.x, GCC, GNU C library, Busybox, networking and much more.
Highly configurable and extendable with full documentation, granular feature control, packaging, and wide machine coverage.
Complete GNOME Mobile platform with the X Window System, Matchbox, GTK+ 2.12, D-Bus, GStreamer and ‘Sato’ reference implementation.
Support for bleeding edge OpenGL user interfaces with the Clutter toolkit.
A supported, stable and proven base for real world products built on Linux and open source software.

Installation

Requirements

  • Install a Linux distribution in a PC (We use Ubuntu 8.04)
  • Install some necessary libraries typing in the console:
$ sudo apt-get install build-essential python diffstat texinfo texi2html cvs subversion wget gawk
help2man bitbake python2.4-dev python-dev git-core gnupg corkscrew quilt curl flex bison gitk
  • Make a share directory, change owner as root and change permissions (It will ask for your password)‏
$ sudo mkdir /usr/share/oe
$ sudo chown -R $USER /usr/share/oe
$ sudo chmod 775 /usr/share/oe

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 user-specific configuration.

NOTE: If you are working in Dallas, you should replace naucmwebproxy01.naucm.ext.ti.com with wwwgate.ti.com

$ sudo gedit /etc/subversion/servers (or ~/.subversion/servers)
…
#[group1]
http-proxy-host = naucmwebproxy01.naucm.ext.ti.com
http-proxy-port = 80
…
[global]
http-proxy-exceptions = *.ti.com
http-proxy-host = naucmwebproxy01.naucm.ext.ti.com
http-proxy-port = 80
…
  • 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://naucmwebproxy01.naucm.ext.ti.com:80
ftp_proxy = http://naucmwebproxy01.naucm.ext.ti.com:80
  • Configure git proxy creating the script:
$ gedit ~/bin/git-proxy.sh
#!/bin/sh
exec corkscrew naucmwebproxy01.naucm.ext.ti.com 80 $*

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

Download Poky

  • Export POKYSRC variable (place where you want Poky source)‏
$ export POKYSRC=”place_where_you_want_poky_source”

And move there:

$ cd $POKYSRC
  • Now we will download Poky’s source code
$ svn co -r 5728 -q http://svn.o-hand.com/repos/poky/trunk poky
  • Export POKY variable:
$ export  POKY=$POKYSRC/poky

Configuring Poky

Two files inside $POKY need to be configured before we start build Poky:

  • build/conf/local.conf
...
BBFILES = "\
${OEROOT}/meta/packages//.bb \
${OEROOT}/meta-texasinstruments/packages//.bb"
BBFILE_COLLECTIONS = “normal texasinstruments extras”
BBFILE_PATTERN_normal = “^${OEROOT}/meta/”
BBFILE_PATTERN_texasinstruments = “^${OEROOT}/meta-texasinstruments/”
BBFILE_PATTERN_extras = “^${OEROOT}/meta-extras/”
BBFILE_PRIORITY_normal = “5”
BBFILE_PRIORITY_extras = “5”
BBFILE_PRIORITY_texasinstruments = “10”
BBPATH = “${OEROOT}/meta-texasinstruments:${OEROOT}/meta:${OEROOT}/meta-extras”
…
PARALLEL_MAKE = “-j 4”
…
MACHINE ?= “omap-3430sdp”
…
DISTRO ?= “tilinux”
…
POKYMODE = “external-csl2008q3”
…
  • build/conf/site.conf
...
CVS_PROXY_HOST = “naucmwebproxy01.naucm.ext.ti.com”
CVS_PROXY_PORT = “80”
…
GIT_PROXY_HOST = “naucmwebproxy01.naucm.ext.ti.com”
GIT_PROXY_PORT = “80”
…
DL_DIR = “/usr/share/oe”
…

Create SSH Key

note: this step is not required if you use the ccfetch-installer.sh described below

To generate a new keypair you run the following command:

$ ssh-keygen -t rsa

Now that you have a pair of keyfiles generated, or pre-existing, you need to append the contents of the .pub file to the correct location on the remote server.
Assuming that you wish to login to the machine called DIRAC from your current host with the id_rsa and id_rsa.pub files you’ve just generated you should run the following command:

$ ssh-copy-id -i ~/.ssh/id_rsa.pub x0087450@DIRAC 

This will prompt you for the login password for the host, then copy the keyfile for you, creating the correct directory and fixing the permissions as necessary.

Download meta-texasinstruments

  • Move inside POKY
$ cd $POKY
  • Get meta-texasinstruments recipes (This will allow us to download and compile TI components in Poky)‏
$ git clone git://github.com/icepeda/meta-texasinstruments.git

Recommended: patch poky

  • since there are a handful of recommended bug fixes since rev5728 poky:
$ for patch in meta-texasinstruments/patches/*; do patch -p0 < $patch; done

Setup ccfetch

The ccfetch-installer.sh script simplifies setting up the various scripts needed for ccfetch. It does not, however, create the view that will be used on the clearcase server machine.

note: if you re-install, the installer will remember your previous choices, so you can pretty much just take the default choices.
joeuser@neuromancer:~/poky/L23.17$ ./meta-texasinstruments/scripts/ccfetch-installer.sh 
Installing v2.1.3 ccfetch scripts

But first, I have a couple questions:
  Enter local bin directory (must be in $PATH): [/home/joeuser/bin] 
  Enter remote hostname: [clearcase.server.ti.com] 
  Enter remote username: [a0123456] 
  Enter remote viewname: [omapsw_joeuser_poky_temp] 
  Enter remote home directory path: [/home/a0123456] 
  Enter remote bin directory (must be in $PATH on dirac.dal.design.ti.com): [/home/a0873619/bin] 
Ok, I've got:
  local bin directory   : /home/joeuser/bin
  remote hostname       : clearcase.server.ti.com
  remote username       : a0123456
  remote viewname       : omapsw_joeuser_poky_temp
  remote home directory : /home/a0123456
  remote bin directory  : /home/a0123456/bin
Is this correct?
  Y/N> y
Using existing identity id_rsa

Now I will copy your public key to clearcase.server.ti.com.  Enter password for a0123456@clearcase.server.ti.com if prompted:

And now finally, I have some files to install:
 * installing cfetchcc-get.sh
 * installing cfetchdirac.sh
 * generating cfetchcc.conf
 * installing sfetchcc-get.sh remotely
sfetchcc-get.sh                                                                                                         100% 2869     2.8KB/s   00:00    
 * installing sfetchcc-mktar.sh remotely
sfetchcc-mktar.sh                                                                                                       100% 1151     1.1KB/s   00:00    
 * generating sfetchcc.conf remotely
sfetchcc.conf                                                                                                           100% 1331     1.3KB/s   00:00    
Done!

You need to make sure that you provide all the correct inputs to this question, otherwise you will see errors.

Example:
user@FORT:~/L23.x/poky$ ./meta-texasinstruments/scripts/ccfetch-installer.sh 
Installing v2.1.3 ccfetch scripts

But first, I have a couple questions:
  Enter local bin directory (must be in $PATH): [/home/$USER/bin] 
  Enter remote hostname: [dirac.dal.design.ti.com] 
  Enter remote username: [$USER] a08xxxxx
  Enter remote viewname: [omapsw_a08xxxxx_poky_temp] 
  Enter remote home directory path: [/home/a08xxxxx] 
  Enter remote bin directory (must be in $PATH on dirac.dal.design.ti.com): [/home/a08xxxxx/bin] /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/bin:/clearcase/tools/scripts
Ok, I've got:
  local bin directory   : /home/akash/bin
  remote hostname       : dirac.dal.design.ti.com
  remote username       : a08xxxxx
  remote viewname       : omapsw_a08xxxxx_poky_temp
  remote home directory : /home/a08xxxxx
  remote bin directory  : /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/bin:/clearcase/tools/scripts
Is this correct?
  Y/N> Y
Found identity id_rsa.. should I use this?  (Only say 'Y'es if it has an empty passphrase)
  Y/N> Y
Using existing identity id_rsa

Now I will copy your public key to dirac.dal.design.ti.com.  Enter password for a08xxxxx@dirac.dal.design.ti.com
if prompted:
mkdir: cannot create directory `/usr/kerberos/bin:': Permission denied
which: no cleartool in (/usr/local/bin:/bin:/usr/bin)
  Hmm, I can't find your clearcase installation.  Enter path to cleartool: [] /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/bin:/clearcase/tools/scripts


And now finally, I have some files to install:
 * installing cfetchcc-get.sh
 * installing cfetchdirac.sh
 * generating cfetchcc.conf
 * installing sfetchcc-get.sh remotely
scp: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/bin:/clearcase/tools/scripts/sfetchcc-get.sh: No such file or directory
 * installing sfetchcc-mktar.sh remotely
scp: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/bin:/clearcase/tools/scripts/sfetchcc-mktar.sh: No such file or directory
 * generating sfetchcc.conf remotely
scp: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/bin:/clearcase/tools/scripts/sfetchcc.conf: No such file or directory
Done!

Compile Poky + TI Components

  • Set the toolchain that we are going to use
$ gedit meta-texasinstruments/conf/distro/include/poky-external-csl2008q3.inc
…
EXTERNAL_TOOLCHAIN = “/data/omapts/linux/arm-tc/arm-2008q3”
PATH =. “${EXTERNAL_TOOLCHAIN}/bin:”
…
  • Export http_proxy and ftp_proxy variables (you can export them in your .bashrc)
$ export http_proxy=naucmwebproxy01.naucm.ext.ti.com:80
$ export ftp_proxy=naucmwebproxy01.naucm.ext.ti.com:80
  • Initialize the build environment running the script
$ . poky-init-build-env
  • Build the coreutils
$ bitbake coreutils
  • Configure the communication with dirac running the script (ask for this script)
$ ~/bin/ccfetch-installer.sh
  • Finally compile Poky with TI components
$ bitbake omap-image-sato

Compile GFX

  • IMG’s DDK code is protected under an IDA, you have