Also see http://www.openembedded.org/wiki/How_to_create_a_bitbake_recipe_for_dummies

Also see http://www.openembedded.org/wiki/How_to_create_a_bitbake_recipe_for_dummies

+

+

== Notes ==

+

+

Had quite a lot of trouble creating a working recipe for rtl-sdr. I believe the problem was inconsistent naming, i.e. some places it's called rtl-sdr other places it is called librtlsdr and so on. At the end bitbake couldn't find files because they were not where expected. Evenmtually, I ended up calling the package librtlsdr everywhere and created a tar.gz package using the date as version number.

Revision as of 00:11, 2 February 2013

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

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:

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!

Notes

Had quite a lot of trouble creating a working recipe for rtl-sdr. I believe the problem was inconsistent naming, i.e. some places it's called rtl-sdr other places it is called librtlsdr and so on. At the end bitbake couldn't find files because they were not where expected. Evenmtually, I ended up calling the package librtlsdr everywhere and created a tar.gz package using the date as version number.