Native SDK for BUG 1.x Devices

by kengilmer

Building native applications for BUG requires a toolchain configured for the specific hardware architecture, as well as all the development libraries your application may require.  Poky, the build system used for the BUG 1.x line of devices, provides these tools and libraries as part of the meta-toolchain package.  For convienence, this toolchain is provided as a download for x86-64 machines so that one doesn’t have to build all of it from scratch.  Here are quick instructions on how to use the toolchain.  I’m assuming you have a simple C program to test with.  Mine prints helloworld and exits.

# cd /
# wget
# wget
# tar xfj poky-eabi-glibc-x86_64-arm-toolchain-1.4.3.tar.bz2
# tar xfj poky-eabi-glibc-x86_64-arm-toolchain-1.4.3-extras.tar.bz2
# cd /usr/local/poky
# source eabi-glibc/arm/environment-setup
arm-poky-linux-gnueabi-gcc test.c -o test
# file test
test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.10, not stripped
# scp test [BUGIP]:
# ssh root@bug
root@BUG:~# ./test
Hello world!

As described in the Poky handbook, the toolchain-sdk package provides development libraries for packages that are by default shipped on the BUG 1.x device.  For those wishing to build the tools themselves, I had to make two minor changes to Poky to build meta-toolchain on Ubuntu 10.10 x86-64.  The patch for those changes is here.