After a long time trying and retrying to get OpenEmbedded to build today it finally finished, for the first time in many months. It isn't yet building exactly the target that I want it to build, but at least it's building something.
I've had not a very fun relationship with OpenEmbedded in the last few months. What I want to do is to create a simple Linux distribution to run on my BeagleBoard that has something that I can quickly build on (like gcc) and a couple of camera drivers and image processing libraries, like OpenCV.
I started trying to build it on my mac. After a lot of tweaking I decided it wasn't worth the time, so I installed a virtual machine on my mac to run Ubuntu Linux and build it from there. Surprisingly it built, but I couldn't get OpenCV to be added to my distribution. More tweaking and suddenly I ran out of disk space on my virtual machine. I was also quite annoyed that the building OpenEmbedded was very time-consuming and using resources from my main machine. So I decided to move it to my Windows desktop.
The first thing I tried to do is to create a dual boot with Windows 7 and Ubuntu. After a lot of work, and losing all my data once, I was unable to do it. Once Windows 7 was installed, I was unable to get the dual boot to take over the booting logic.
So I went for a virtual machine solution again. Installed this time Fedora instead of Ubuntu. Set up all the OpenEmbedded again and... It didn't want to build. gcc build kept failing on something that seemed like an internal build bug, related to cross-compiling gcc on a 64-bit machine. I threw away Fedora and changed to Ubuntu, because it used to work. Trying again gave me the same results.
I then focused on other things I could do for the project, like creating sample running code for pretty much all the sensors that I had. Suddenly I started getting results and was very happy with it, until I ran out of sensors and had to get back to OpenEmbedded.
This time I deleted everything again, started with a fresh installation of 32-bit Fedora and... Still errors, but different ones. Digging more through what I was seeing, it seemed like it was a memory problem. So I increased the amount of memory on my virtual box to 1.5 GBs and... After 2 days of building, it finally finished one of the basic distributions!
Now it's time to build a more meaningful distribution!
PS: sorry for the lack of details on all the failures and successes here - I kept some notes about what I was seeing, but I just don't have the time right now to dig through my notes and enter them here. Maybe some other day when I understand things a little better I'll write down all the steps that I took to get it to work. In summary:
- Install all the packages suggested in the OpenEmbedded site including psyco. Use yum for pretty much everything.
setsebool -P mmap_low_allowed on
- Make sure you have enough memory. It seems like you need more than 1GB. 1.5 GBs seem enough for now.
- Make sure you have enough hard disk space. The OpenEmbedded build uses a lot of HD space! Think 50GB+ (right now I have 100GB set aside for the Linux virtual machine).
As I said, more details are forthcoming. I'll add them to the robotics page, as it's a better place for static information than a blog.