I have always wanted to get my hands on a BeagleBoneBlack (BBB), and it seems that I chose the right time to do so. It hasn't been long now since the new spin of the BeagleBoneBlack started shipping with Debian pre-installed onto the board's permanent eMMC storage. This was enabled through the upgrade in size, from 2GB to the current 4GB, of the on-board flash, which was done for a couple of reasons: first of all, 2GB isn't that much space. The Raspberry Pi recommends at least a 4GB SD card, by comparison. Also, the supply of the 2GB eMMC chips was starting to fade – 4GB being the lowest offering currently, so the move was done to maintain supply as well. Remember, though, that storage is not an issue – you can add a 64GB SD card if you wanted! It's mostly the access time that is the major difference.
Originally, as many BBB owners will know, the BBB used a distribution of Linux known as Angstrom Linux – so named because of its small size and fast booting. A perfect match, it would seem, for a small single-board computer. However, with a large number of the maker community using Raspberry Pi, and having the Raspbian spin of Debian available, many felt underwhelmed by the default settings and GUI of Angstrom after picking up a BBB.
As soon as the Rev C version of the BBB became available, sales went through the roof – as many will remember, during parts of 2014 it was almost impossible to buy one. This was largely due to the fact that it now had enough space for the pre-installed Debian, plus the increased processor speed and RAM. The huge, dual 46-pin headers helped, too – compared to other single-board computers this size, it's hard to believe that you can have this many pins brought out for user applications!
Upon opening the box, I was immediately impressed with the board. I must admit, I'm a bit of a TI fanboy, so that helped – but the black solder mask and the rounded corners made it look sleek and sexy. I eagerly fired it up, and was impressed with the boot time into Debian – one of the effects of having the OS in eMMC memory. Everything just worked out of the box – SSH was set up, plugging the USB into my laptop revealed a serial terminal, a built-in web server (which we'll talk about in a bit!) and an emulated USB flash drive! Clearly this was designed with development in mind. Having a serial terminal over USB is a great move – though there is a serial header on board, you don't even need to use it! This can make a big difference in the ease of troubleshooting and/or development. If SSH is not an option, plugging it into USB means you can work on the board with literally no other connections – no monitor, keyboard, DC input, Wi-Fi, Ethernet, nothing. Just a single USB cable. Now that is how it should be done! This is even more critical as there is only one USB host port, meaning to have more than just a keyboard plugged in you need a USB hub. For most developers this isn't an issue, but it's annoying to have this extra box hanging off of the board. I've found the best way to work with the BBB is to have it plugged into a laptop, with an Ethernet cable for internet access (if you have a cable nearby – otherwise, you can use the empty USB port for Wi-Fi!).
Now, the real question today is what the differences are between Angstrom Linux and Debian. For those familiar with Linux and its varieties, you'll know that Debian is one of the big names. With a huge user base and many excellent developers (not to mention being the distro that Ubuntu is based on!) Debian provides a smooth experience, with a wide choice of desktop environments to choose from and an enormous package repository. This is a plus for developers as your favourite IDE and compiler are likely available (in my case, Code::Blocks was, of course, immediately installable). However, the flair and large package assortment is also the weakness on a platform like the BBB. Remember that this is just a small ARM processor with 512MB of RAM. Though overall responsiveness is acceptable, there are times when the processor gets bogged down which make it feel completely sluggish and unusable. This is part of the reason I wanted to compare it to Angstrom. From what I'd heard, Angstrom was a much more bare-bones, stripped-down distro aimed at lightweight computing and development. It seems on paper like a much better choice for writing code and doing embedded development.
So it was off to the BeagleBone website to try and find the Angstrom flasher – I wanted to install Angstrom to the eMMC to have a fair comparison against Debian. As the BBB has now completely switched to Debian, the Angstrom images are listed under “Older Images”. I noticed there were both SD card and eMMC flasher versions. I downloaded the flasher version, and burned it to a freshly formatted SD card. Flashing the BBB (or even booting from the SD card) is supposed to be very simple – insert the SD card, remove power, hold down the BOOT button (S2, down by the SD card slot), and then power up the board while continuing to hold the BOOT button. If you're flashing Debian to the eMMC, you'll be rewarded by the LEDs flashing in a back-and-forth pattern. Once the process starts, it can take anywhere from 15 to 45 minutes to write the flash. However, be warned – when flashing Angstrom, there are no such LED indications to let you know you're on the right track. It actually boots into Angstrom while it flashes! This really confused me, and so I spent ages unplugging and replugging the power, holding down the BOOT button for as many different lengths of time as seemed reasonable, and formatting/re-burning the SD card five or six times. I even found two different versions of the eMMC burner, dated a few months apart in 2013. Eventually, I just left it running overnight at the command prompt, and when I tried to boot back into Debian the next morning, it booted into Angstrom without the SD card! So, clearly it had worked. You just need to be aware of how the burning process works!
The first thing I noticed after booting into Angstrom is that it uses a non-standard package manager. As a long-time Linux user, I feel comfortable using pacman, yum, apt-get, even the lower-level stuff like RPM and DPKG. However, Angstrom uses opkg, a manager I hadn't heard of but seems to accept similar commands to yum and apt-get – things like opkg install, opkg update and opkg upgrade worked flawlessly. I highly recommend running those last two (update and upgrade) out of the box, as it seems there are a large number of updates not included in the last release available on the BeagleBone website.
To do our comparison testing, I'm going to be using a piece of software called the Phoronix Test Suite. This is an open software benchmarking application which is cross-platform and freely available! It also has a companion site called openbenchmarking.org which contains tons of pre-written tests that you can execute directly from the command line. Today, we'll be using two tests, one to test the hardware, and one to test the system. To test the hardware, we run a series of compression tests, which will stress the processor and give us a baseline. We shouldn't see too much of a difference, but the OS does indeed schedule tasks and give priority, so this will also test the system a bit as well. For the system testing, we'll encode audio in a variety of formats – this will also stress the processor, but according to what I've read it seems to be more of a system stress test as it really pushes the OS to see how well it manages tasks. For whatever reason, some of the tests wouldn't run on Debian, and some wouldn't run on Angstrom – I've marked these with DNR. This is almost certainly just a compatibility problem, as these tests were designed for full-size systems, in most cases. I've included the results of the same tests done on a Raspberry Pi Model B+ overclocked to 900MHz. This isn't a wholly fair comparison, but should give readers familiar with the Pi a sort of baseline with which to compare.
As you can see, the results are slightly mixed. Angstrom performed much better on the compression tests, but falls short on FLAC and MP3 encoding. I can't say this is exactly what I expected, although without knowing more about how the kernel is compiled for each distribution, my only theory is that Debian generally has more focus on multimedia applications, which gives it the slight edge in audio encoding. Angstrom is much lighter, which probably explains the compression test results being so varied.
Now that the BeagleBoneBlack comes pre-installed with Debian, I imagine that the vast majority of users will stick with it. However, after using both, I've started to take a liking to Angstrom. On some tasks it feels much snappier and responsive, though Debian's wider software support is also a plus. Angstrom's smaller installation size, the original reason the BBB developers chose it in the first place, is another plus if size becomes an issue. The older BBB revisions, will, of course, have to stay with Angstrom on the eMMC as they cannot hold Debian. You can still boot and run Debian from an SD card, so that option is there as well, though of course the performance won't be as good. My recommendation, especially to newer users, would be to stick with Debian unless you have a good reason to switch.
However, the real shocker was how poorly the Raspberry Pi performed in some categories! While it performed better at encoding FLAC and MP3, it fell apart in the compression category, with the exception of 7-Zip compression. I was really surprised that the LZMA compression was almost 400 seconds longer than the BBB with Angstrom! However, as I mentioned earlier, these two boards are for very different purposes, which is actually revealed through these tests. The Raspberry Pi is optimized for multimedia and GUI interaction, whereas the BBB is optimized for embedded software and hardware development. This is shown by the huge GPIO headers on the BeagleBoneBlack – 80 pins in total to the RPi's 40 on the B+ and only 26 on the original models.
Whichever board you end up choosing, there are vast amounts of cool hardware add-ons and thousands of software libraries and tutorials available online. I highly recommend checking out both boards if you have the chance – you'll see that they fit their categories exceptionally well. The BeagleBoneBlack is the sort of device I would put into an autonomous robot. The Raspberry Pi could also be used, but the advantage of the huge GPIO and multiple hardware protocols is evident in such an application. The Raspberry Pi is the board of choice for projects like the Super Pi Boy – building a Pi into a Game Boy case, with an upgraded colour LCD and an SD card full of emulated games! The Pi's excellent multimedia support, coupled with the good support for touchscreens and LCDs, really shines through in such an application.
Thanks for reading, and stick around for more projects in the near future! Let me know below what projects you've used these boards for, and what your pros and cons for each would be.
All test results are measured in seconds!
BeagleBoneBlack with Debian
COMPRESSION | RESULT 1 | RESULT 2 | RESULT 3 | RESULT 4 | RESULT 5 | AVERAGE |
7-Zip Compress |
|
|
|
|
| DNR |
Parallel BZIP2 | 6.252073 | 7.181118 | 7.585148 | 7.744592 | 7.625200 | 7.36 |
GZIP Compress |
|
|
|
|
| DNR |
LZMA Compress | 1568.9417 | 1563.2622 | 1566.2461 |
|
| 1566.15 |
AUDIO ENC. | RESULT 1 | RESULT 2 | RESULT 3 | RESULT 4 | RESULT 5 | AVERAGE |
WAV->APE | 130.818 | 130.060 | 132.219 | 130.096 | 130.569 | 130.75 |
WAV->FLAC | 887.864 | 888.487 | 939.170 | 911.743 | 888.349 | 903.12 |
WAV->MP3 | 418.593 | 418.588 | 418.825 | 417.441 | 421.850 | 419.06 |
WAV->OGG |
|
|
|
|
| DNR |
BeagleBoneBlack with Angstrom
COMPRESSION | RESULT 1 | RESULT 2 | RESULT 3 | RESULT 4 | RESULT 5 | AVERAGE |
7-Zip Compress | 343 | 339 | 344 |
|
| 342 |
Parallel BZIP2 | 4.835072 | 7.050925 | 7.336689 | 7.256099 | 7.300720 | 6.86 |
GZIP Compress | 173.596 | 149.212 | 149.415 | 148.038 | 148.924 | 153.25 |
LZMA Compress | 1503.6176 | 1501.6726 | 1538.0704 |
|
| 1514.45 |
AUDIO ENC. | RESULT 1 | RESULT 2 | RESULT 3 | RESULT 4 | RESULT 5 | AVERAGE |
WAV->APE | 122.339 | 121.983 | 122.155 | 122.142 | 122.077 | 122.14 |
WAV->FLAC | 968.035 | 972.303 | 958.715 | 962.090 | 966.200 | 965.47 |
WAV->MP3 | 398.413 | 398.232 | 399.116 | 398.622 | 396.675 | 398.21 |
WAV->OGG | 460.283 | 462.513 | 460.829 | 460.270 | 461.487 | 461.08 |
Raspberry Pi Model B+ with Debian
Overclocked to 900MHz
COMPRESSION | RESULT 1 | RESULT 2 | RESULT 3 | RESULT 4 | RESULT 5 | AVERAGE |
7-Zip Compress | 230 | 234 | 235 |
|
| 233 |
Parallel BZIP2 |
|
|
|
|
| DNR |
GZIP Compress | 234.078 | 230.534 | 230.136 |
|
| 231.58 |
LZMA Compress | 1962.3624 | 1904.4445 | 1893.6165 |
|
| 1920.14 |
AUDIO ENC. | RESULT 1 | RESULT 2 | RESULT 3 | RESULT 4 | RESULT 5 | AVERAGE |
WAV->APE | 165.961 | 177.030 | 179.942 | 166.520 | 168.231 | 171.24 |
WAV->FLAC | 637.513 | 636.228 | 642.591 | 651.949 | 645.050 | 642.67 |
WAV->MP3 | 303.851 | 297.353 | 304.706 | 307.051 | 299.120 | 302.42 |
WAV->OGG |
|
|
|
|
| DNR |
Video Overview:
Flashing the BBB: