Add own recipes to Angstrom

Originally posted by Edouard Lafargue on the Beagleboard list.

This describes what I did to create a ".ipk" for the icecast server which I needed on my beaglebone. Your mileage may vary...

# My local Bitbake recipes BBFILES += "${HOME}/Documents/Beaglebone/ed-local/*/*.bb"
 * Create a local directory outside of setup-scripts if possible where you will put your ".bb" recipes. I used ~/Documents/Beaglebone/ed-local/ on my system.
 * In that directory, create subdirs with the name of the package you want to create, and inside those, the BB recipe. Note on the example below how the version number is in the BB recipe, this filename format is used by the BB recipe to download the correct version. For instance:
 * ed-local/icecast
 * ed-local/icewcast/icecast_2.3.2.bb
 * Then, update setup-scripts/conf/local.conf to add your local repository as a package source: in my case, I had to add the following variable definition:
 * Now you can start writing bitbake recipes in your local repo. Below is what I had to do for icecast, which follows a typical "./configure;make:make install" installation process:

DESCRIPTION = "Icecast streaming media server" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "libvorbis libogg libtheora libxslt libxslt-native" PR = "r0" SRC_URI = "http://downloads.xiph.org/releases/icecast/${PN}-${PV}.tar.gz" SRC_URI[md5sum] = "ff516b3ccd2bcc31e68f460cd316093f" SRC_URI[sha256sum] = "4742b38fc55b6373895a7c0a35baed49a848fec99f5e8538e3f0157383d0b3f0" # Need to disable curl EXTRA_OECONF = " \         --without-curl \          --without-speex \          --with-ogg=${STAGING_LIBDIR} \          --with-vorbis=${STAGING_LIBDIR} \          --with-theora=${STAGING_LIBDIR} \         " inherit autotools pkgconfig

So what is important there, and what is not? You absolutely have to put the correct MD5SUM variables in your BB recipe, Angstrom insists on it. No worries though, just put wrong values to start with, and do a bitbake your_package_name -c fetch which will fail but will tell you the correct value of the MD5/SHA2 checksums, you will then be able to put the right values in your recipe. You also have to define at least one license file, along with its checksum, otherwise the build process will complain. You will also need to put the correct dependencies in the definitions, and any extra configure options as shown in the example. But it's not that hard, really, at least for most simple packages.

Now that your recipe is ready, bake it! bitbake icecast in this example. The resulting "IPK" will be located in build/tmp-angstrom_2010_x-eglibc/deploy/ipk/armv7a. Put it on your Beaglebone, and do a opgk install my_package.ipk, everything should work, hopefully!