Poky Linux distribution provides SDK for quite long time. From time to time I hear persons which complain about lack of libX or libY in toolchain tarballs. But there is a solution for them — Poky SDK can be expanded with packages.


This is described in Poky Handbook already:

The meta-toolchain and meta-toolchain-sdk targets (see the images section) build tarballs which contain toolchains and libraries suitable for application development outside Poky. These unpack into the /usr/local/poky directory and contain a setup script, e.g. /usr/local/poky/eabi-glibc/arm/environment-setup which can be sourced to initialise a suitable environment. After sourcing this, the compiler, QEMU scripts, QEMU binary, a special version of pkgconfig and other useful utilities are added to the PATH. Variables to assist pkgconfig and autotools are also set so that, for example, configure can find pre-generated test results for tests which need target hardware to run.

Using the toolchain with autotool enabled packages is straightforward, just pass the appropriate host option to configure e.g. “./configure –host=arm-poky-linux-gnueabi”. For other projects it is usually a case of ensuring the cross tools are used e.g. CC=arm-poky-linux-gnueabi-gcc and LD=arm-poky-linux-gnueabi-ld.

Extending SDK

So you want to build GTK+ based application but “configure” tells you that you miss GTK+ headers? In normal systems you would install development packages. Same is with Poky SDK, but due to fact that there are no repositories for Poky a bit more work is needed.

You will need contents of “tmp/deploy/ipk/” from other developer or from local Poky build. I have them from local build and they are stored in “/home/hrw/devel/OH/poky/trunk/build/tmp/deploy/ipk” directory.

Next step is editing opkg configuration file (stored in /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/etc/opkg.conf) to add feeds locations. With my packages it looks like this:

arch all 1
arch any 6
arch noarch 11
arch arm 16
arch armv4 21
arch armv4t 26
arch armv5te 31
arch qemuarm 36
src oe-all file:/home/hrw/devel/OH/poky/trunk/build/tmp/deploy/ipk/all
src oe-armv5te file:/home/hrw/devel/OH/poky/trunk/build/tmp/deploy/ipk/armv5te

Now it is time to install those missing headers: opkg-target update will update list of available packages and opkg-target install gtk+-dev install required headers.

Building software

Hello world

First something really simple: helloworld.c. Run arm-poky-linux-gnueabi-gcc hello.c -o hello. Result will be ARM binary:

14:14 hrw@home:$ file hello hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), not stripped 

Autoconf based application

I took Tasks 0.13 as an example as it use some libraries not present in standard toolchain. After unpacking and starting ./configure --host=arm-poky-linux-gnueabi I got message that GTK+ headers are missing so I installed them with opkg-target install gtk+-dev (like it is described).

After next “configure” call there was message about missing “libecal” which is part of “eds-dbus” so opkg-target install eds-dbus-dev solved problem.

Finally “configure” does not give any errors and make call built application:

14:19 hrw@home:tasks-0.13$ file src/gtk/tasks
src/gtk/tasks: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), not stripped


As you see Poky SDK is not limited to default set of packages but can be extended with additional ones. OK, someone needs to build them first but imagine situation when company has 10 developers — one has Poky build tree which he use to generate packages which can be used by rest of team without spending precious time on building.

BTW — It is not limited to Poky SDK. Other OpenEmbedded based systems should be more or less capable of doing such things.

Using Poky SDK to build software

3 thoughts on “Using Poky SDK to build software

  • 17th July 2008 at 16:41

    Installing target things into the toolchain works great, but adding host-side packages (e.g. qmake2 or uicmoc4) runs into a nasty problem with the offline root setting:


    So for now people will have to include the host tool they want to the sdk recipe, or manually remove the double path. The whole things is a bit insidious and both Richard and I don’t have an idea where the path should get fixed.

  • 8th October 2008 at 11:39

    Sir i am developing gtk based one application in anjuta for poky.I developed one application also, it build well as i follow the poky handbook. but problem arises when iam going to deploy my application in qemu ,following are the o/p i am getting of message box ///////////////////////////////////////////////////////// Making install in src make[1]: Entering directory /home/sprashant/GTK/TESTING /src' make[2]: Entering directory/home/sprashant/GTK/TESTING /src’ test -z “/usr/local/bin” || /bin/mkdir -p “/home/sprashant/GTK/TESTING/usr/local/bin” /bin/sh ../libtool –mode=install /usr/bin/install -c ‘test1’ ‘/home/sprashant/GTK/TESTING/usr/local/bin/test1’ /usr/bin/install -c test1 /home/sprashant/GTK/TESTING/usr/local/bin/test1 test -z “/usr/local/share/test1/glade” || /bin/mkdir -p “/home/sprashant/GTK/TESTING/usr/local/share/test1/glade” /usr/bin/install -c -m 644 ‘test1.glade’ ‘/home/sprashant/GTK/TESTING/usr/local/share/test1/glade/test1.glade’ /home/sprashant/GTK/TESTING: /home/sprashant/GTK/TESTING: is a directory make[1]: *** [install-data-yes] Error 126 make: *** [install-recursive] Error 1 make[2]: Leaving directory /home/sprashant/GTK/TESTING /src' make[1]: Leaving directory/home/sprashant/GTK/TESTING /src’ Making install in po make[1]: Entering directory /home/sprashant/GTK/TESTING /po' /bin/sh /home/sprashant/GTK/TESTING /install-sh -d /home/sprashant/GTK/TESTING/usr/local/share/locale make[1]: Leaving directory/home/sprashant/GTK/TESTING /po’ Error during deployment ///////////////////////////////////////////// i think this is due to permission error but i am not quit sure about this. and if yes, this is the case then how do i solve this problem? i am on the ubuntu hardy need help.

    thank you prashant p sathe

  • Pingback:Marcin Juszkiewicz / 2008 Timeline

Comments are closed.