14 Jan 2013, 00:34

aphboard Up and Running

After hours and hours of work, I finally have something tangible to show for it! I’ve had to change my target device, though. I was spending way too much time trying to get the Chromium Embedded Framework (CEF3 in my case) to compile for the Pi (mainly for the ARM, not the Pi specifically) so I decided to change it up and just use an x86 machine for now. My goal is still to have a cross-platform dashboard but I thought this way it would be faster to get something working so I don’t have a blank screen sitting here unused.

I also managed to find a link to the original article that made me interested in setting up a dashbaord in the first place. It was on the Panic Blog in a post called The Panic Status Board. I think it’s a pretty neat idea and theirs is done really well, but I won’t have relevent data to put on mine like that in the beginning.

Before I get into the longer description, below you’ll see what I’ve arrived at for aphboard so far. You’ll see there are 3 different browser frames running: two on the top and one larger one at the bottom.

Starting with the Raspberry Pi

Originally my plan was to run the dashboard off one of my RPis, but I eventually found that wouldn’t be as fast of a process as I’d hoped. Since the RPi is a VERY low power machine, you wouldn’t want to compile anything of consequence on it (for various factors including the slow CPU, low RAM and lousy disk IO speeds). This means the best option is to set up a cross-compiler, which is essentially a compiler for one platform that can build code meant to run on another platform.

At first I wanted to get a toolchain set up to compile for the RPi’s ARM processor on OS X but in my reading it sounded to me like it would be a huge pain to set it all up. I looked into crosstool-ng, but there are a number of problems the site mentions on OS X right now that I didn’t want to deal with. After that, I thought I could try doing it in a Linux VM using the same tool but I ran into problems there as well. To cut a long (long, LONG) story short, nothing I was doing seemed to be working correctly. At one point I was able to get an ARM toolchain set up correctly but in order to compile CEF I needed a large number of dependencies (X, GTK+, others). I gave up after I hit 16 dependencies and hadn’t even gotten GTK+ built yet. At that point I started to think of different ways I could still accomplish my goal (a dashboard) without having to cross compile.

Low-Powered x86

It was at that point I remembered my EeeBox B202. I’d asked for it from my parents for a gift at one point in the past and used it as a “bills and business” machine for awhile. Eventually I just started doing all of that on my normal desktop and no longer used the EeeBox. It was a great candidate for my new dashboard device as it was x86-based and had enough RAM (1GB).

Once I decided to go with the new machine, it was so much easier to get CEF compiled. I ended up using a 64-bit VM and a 32-bit VM to compile CEF for each platform (I’d gotten pretty experienced with doing so by this point). Now I’m just going to keep those binaries around and work against those so I don’t have to deal with it all again until I either run into problems or want to upgrade to a newer version.

After I had my binary libraries to link against, my next goal was to get a basic browser being displayed. Since that will be quite a long post (mostly due to the code listings), I have that in a separate post: Chromium Embedded Framework 3 - Bare Bones.

As you saw with the photo at the top of the post, I managed to get everything working and displayed on my screen. I did find that it’s probably a good thing I’m running it on a bit of a beefier system than the RPi, though, now that it’s running. It ended up using almost the full 1GB of RAM to display the 3 browser frames in an X screen. No window manager, no frills, just the X server and the aphboard software. I’m sure I can get it down lower if I turn off some features in the browser, though. Right now I’m running everything I can, just to try and get it working.

comments powered by Disqus