Recently, i was assigned a project for doing a Number Plate Recognition system on NVidia Tegra 2 based Toradex Colibri T20 module. Though the project was put on the sideline just a few days after being assigned due to another high priority task coming my way, i was able to learn how to use OpenEmbedded to some extent. In fact, most of my learning happened in my own spare time. As i was already aware that i would be working on this project, i had started playing around with OE at home and started building the image.
For building images for our modules, my company Toradex uses the oe-core build system. At first, i had no idea how to use it, how to add packages to my image and so on. I was using Arch Linux at first. Now, Arch Linux being a rolling release distribution everything stays up to date. This created it’s own set of problems. Three days i just spend trying to get the initial build going as it was failing for some reason or other. For example, one of the problems i encountered was related to Perl documentation (some POD error) and later gcc4.7.2 just won’t compile and kept segfaulting. On looking up, it turns out it was an Arch Linux issue and to get around this, i would have to upgrade to gcc4.7.8. At that point of time, i had no idea how to resolve this issue. It would have probably been resolved by getting the bitbake recipe for gcc4.7.8 and setting the preferred version in a bitbake recipe to 4.7.8. I didn’t try this out, but, on reading the OE manual much later, i thought that it might have been the solution.
Though i was frustrated during this time, and i was also cursing Arch Linux a bit, these problems made me look at the bitbake recipes, at the source packages and the process of applying patches and trying to fix each issue which use to pop up started giving me an idea at what was going on. I started appreciating Arch Linux. But of course i couldn’t do this everyday. I installed Linux Mint XFCE version and started the procedure again.
This time the process was going smoothly and when the errors did come, i was able to resolve them quickly as i knew what i had to change in the bitbake recipe to get the build going. For example a checksum error halted the build. All that had to be done, was change the checksum in the bitbake recipe to the one that was being computed.
Anyways, this was my story of playing with OE and it’s now time to share the links which will help you in learning OpenEmbedded. First step, have a look at a few of the bitbake recipes and try to understand as much as you can. After that, refer the below links.
1. OpenEmbedded Manual: http://docs.openembedded.org/usermanual/usermanual.html
2. Layers FAQ: http://www.openembedded.org/wiki/Layers_FAQ
Read this without fail. I would have saved a lot of time had i understood the concept of layers. Wasted a day’s time trying to find out how to add OpenCV package to my image. If i had understood the above, a lot of time would have been saved.
3. Adding a Package: http://www.openembedded.org/wiki/I_want_an_image_with_package_XYZ_installed
4. Layer Index: http://layers.openembedded.org/layerindex/branch/master/layers/
The above link will be very useful for searching for already existing bitbake recipes required for adding packages
Has some information you might not find in the OE manual or the OE manual itself links here
6. Legacy Staging: http://www.openembedded.org/wiki/Legacy_staging
This will be helpful if you have to convert an OE-Classic recipe to OE-Core recipe
7. BEC Systems: http://bec-systems.com/site/
A company website having some more useful information on OpenEmbedded
8. IRC Chat: http://www.openembedded.org/wiki/IRC
Last but not the list, you can always use the IRC chat to approach people if you have some specific queries and you can’t find the answers anywhere else. Do thoroughly research the answer to your query using Google and read the documentation before approaching. There will be people more than willing to help you out.
9. Writing Bitbake recipes:
Well this is the last now for sure. I have put this in the last as most probably you won’t have to write a recipe. There are already recipes available for thousands of various software packages which you can use. You can search for them in the layer index link i gave earlier. You can then use those recipes. If they are not already included in the layers you have, you will figure out how to add them by following the documentation above.
Hope these incoherent musings of mine will be of use to you. The post turned out to be longer than i expected, but anyways, have a good time playing with OE and Linux. May the source be with you!