//in my build directory, reinstate the build environment
brian@sawfly:~/work/com.buglabs.build.oe$ source reinstate-build-env
### Shell environment set up for Poky builds. ###
/home/brian/work/com.buglabs.build.oe/build:/home/brian/work/com.buglabs.build.oe/bitbake/:/home/brian/work/com.buglabs.build.oe/meta-bug/:/home/brian/work/com.buglabs.build.oe/meta:/home/brian/work/com.buglabs.build.oe/meta-oe:/home/brian/work/com.buglabs.build.oe/meta-jalimo
// run bitbake -c devshell <package name>
// in this case I use gtk+ because it will automatically put me in the directory where I can find examples
// but in general I can do bitbake -c devshell bug-image-production and then cd into wherever my sources are
brian@sawfly:~/work/com.buglabs.build.oe$ bitbake -c devshell gtk+
NOTE: Psyco JIT Compiler (http://psyco.sf.net) not available. Install it to increase performance.
NOTE: Handling BitBake files: \ (1048/1048) [100 %]
NOTE: Parsing finished. 1024 cached, 0 parsed, 24 skipped, 0 masked.
NOTE: build 200903121646: started
OE Build Configuration:
BB_VERSION = "1.8.11"
METADATA_REVISION = "6039"
TARGET_ARCH = "arm"
TARGET_OS = "linux-gnueabi"
MACHINE = "bug"
DISTRO = "poky"
DISTRO_VERSION = "3.1"
TARGET_FPU = "soft"
NOTE: Resolving any missing task queue dependencies
NOTE: preferred version 2.5 of glibc not available (for item virtual/arm-poky-linux-gnueabi-libc-for-gcc)
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Running task 20 of 20 (ID: 2, /home/brian/work/com.buglabs.build.oe/meta/packages/gtk+/gtk+_2.12.7.bb, do_devshell)
NOTE: package gtk+-2.12.7: started
NOTE: package gtk+-2.12.7-r6: task do_devshell: started
// A new terminal window should open up and you'll be in the build directory of <package name>, in this case gtk
// go into the helloworld example directory
brian@sawfly:~/work/com.buglabs.build.oe/build/tmp/work/armv6-poky-linux-gnueabi/gtk+-2.12.7-r6/gtk+-2.12.7$ cd examples/helloworld
// the next line is basically what you would do on any linux box, except I use the arm compiler with $CC
brian@sawfly:~/work/com.buglabs.build.oe/build/tmp/work/armv6-poky-linux-gnueabi/gtk+-2.12.7-r6/gtk+-2.12.7/examples/helloworld$ $CC helloworld.c -o helloworld `pkg-config --cflags --libs gtk+-2.0`
// now move it to the bug and yer done!
brian@sawfly:~/work/com.buglabs.build.oe/build/tmp/work/armv6-poky-linux-gnueabi/gtk+-2.12.7-r6/gtk+-2.12.7/examples/helloworld$ scp helloworld root@bug:
root@bug's password:
helloworld 100% 9285 9.1KB/s 00:00