|
|
Log in / Subscribe / Register

Consumer ARM boards and the bleeding edge

By Nathan Willis
March 4, 2015

SCALE 2015

There were several talks at SCALE 13x in Los Angeles that dealt with the practical side of embedded Linux development. One of the most well-received sessions was Stephen Arnold's look at the state of kernels and free-software graphics drivers on "open" consumer ARM devices. Arnold is a longtime Gentoo developer who also works with the Yocto project. He presented a rundown of the experiences other users can expect with ARM kernels and graphics on development boards and common single-board computers (SBCs), including the reliability of vendor-supplied drivers and the availability of Linux distributions.

Arnold's session was part of the "open hardware" track at SCALE, and one of the central questions addressed in his talk was how open many of the so-called "open hardware" ARM products really are. As most members of the community are aware, popular devices like the Raspberry Pi may be advertised as open, but the graphics chips on which they rely may have no free drivers at all. Those that do enjoy support from a free driver may have only partial functionality, or they may have an old, unmaintained driver that is difficult to port to a more recent kernel. If updating or rebuilding the vendor's kernel is impossible, after all, some of the key advantages of having an open device are all but lost.

ARM wrestling

Arnold led off with a quick tour through his personal embedded-hardware inventory, which he said he had amassed into "a collection of almost every ARM board ever." Hardware has changed so much over the years, he said, that today's boards exist in a blurry region between traditional embedded and desktop-class devices. Multi-core CPUs, more powerful GPUs, per-core floating-point units, and accelerated video processing are all becoming the norm.

Nevertheless, there are still significant differences to be found. Just within recent (ARMv7) generation products, he pointed out, boards like the Udoo and Cubox-i come with Vivante GPUs, Samsung Chromebooks and Sunxi "TV dongles" come with Mali GPUs, but the Acer Chromebook and Jetson TK1 board come with NVIDIA's Tegra K1—which is, essentially, a desktop-class graphics unit featuring up to 192 CUDA-capable cores.

Arnold also took a few minutes to explain some of the differences between the various instruction sets that users were likely to encounter on open-hardware ARM products and how that might affect writing software for them. The big divide, he said, is between devices that include the NEON instruction set and those that do not. Most ARMv7 boards include NEON, but a few (such as the Trim-Slice line of low-power boards) do not. As with ARMv6 devices (such as the original Raspberry Pi), the Trim-Slice boards use the older vector floating point (VFP) instruction set instead of NEON. The various video-driver projects often need to make use of NEON or VFP in order to provide responsive performance, so knowing which instruction set is supported is important.

The Five Blobs

Returning to the topic of graphics drivers themselves, Arnold looked at the five current GPU families for which ARM vendors are shipping binary-blob drivers: the iMX.6, the VideoCore IV, the Mali, the Tegra K1, and the OMAP SGX. There are projects working on open-source drivers for each GPU family, he said—in some cases, more than one. The Tegra family is the closest to having a complete solution, with both the OpenTegra/grate project and Nouveau support actively under development and producing working builds. Since the Tegra K1 is essentially a desktop GPU, this is perhaps not surprising.

The VideoCore IV (used in the Rapsberry Pi) has decent support with fbturbo, he said. That is what ships with the Raspbian distribution, but users may also want to look at the Weston for Raspberry Pi work that can take advantage of the GPU's hardware video scaler. The fbturbo driver also works with the OMAP, Vivante, and Mali GPUs, via the omapfb, lima, and etna_viv projects. Arnold noted that there is one other GPU family available, the Adreno, which has a free-software driver project, but he has not added the hardware to his collection yet, and thus has yet to test it himself.

If the user does stick with a vendor-supplied driver, though, there are still other factors to be considered—starting with what kernel the vendor ships. Typically, the kernels supplied by the vendor are a single release with a lot of patches applied—and the branch in question is likely to be old. Arnold said that the oldest kernel in his ARM collection is Linux 2.6.31.14, which shipped with a Fujitsu LifeBook and has never been updated. The newest kernel he has seen is 3.14. Usually, these kernels have had minimal back-porting done (if any), which means they may have security vulnerabilities, and attempting to forward-port the vendor's driver to a new kernel can take a long time.

Furthermore, the vendor kernels are often brittle: they may not use device trees, they may compile with lots of warnings (or even generate errors), or they may only compile with specific modules (or only when the kernel is built in monolithic form). Sometimes the kernel .config file is missing required configuration options, or the options included are clearly incorrect. A do-it-yourself kernel in most PC distributions is hard to mess up these days, he said, but if you change one thing in a vendor-supplied ARM kernel, you may find that USB stops working entirely, or that the firmware for the network or audio chips fails. Out of the current crop of ARM devices, he called the CuBox (with its iMX.6 GPU) and the Raspberry Pi the easiest to work with.

The other element to watch out for is the bootloader. Most vendors use their own fork of U-Boot; like the vendor-supplied kernel, it can be old and hard to work with. Some vendors that are "really on the ball" may have a newer U-Boot branch, since there has been considerable work upstream to consolidate the many U-Boot branches. If so, the user can take advantage of more recent bug fixes and optimizations.

Vendors tend to have only one supported bootloader configuration, he said, with the most common being booting from an SD card with two partitions (one for / and one for /boot). Manually changing this configuration is possible, but users who head down that path should be on the lookout for unusual boot options in UEnv.txt or boot.scr files. He also cautioned that he has seen different bootloader options even from the same vendor on two products that use the same system-on-chip (SoC), so an abundance of caution is warranted.

Status reports

Arnold then gave a rundown of the differences between the mainline kernel and the vendor kernels supplied for common ARM devices. Device trees are the main difference; whether or not a working device tree is available for a recent mainline kernel varies from device to device, and improving that situation is the subject of ongoing work by the community. He advised users looking to deploy a mainline kernel on their ARM device to check the Linux on ARM page at the EEwiki to see if there is a recent how-to guide. Robert Nelson from DigiKey maintains patches for a long list of vendor kernels and U-Boot forks at that wiki.

The Linux graphics stack itself is also in flux, Arnold said, with the migration from X to Wayland, the legacy driver model going away, and fluctuations in the OpenGL realm all complicating factors. He reported on his personal tests performed on his ARM hardware collection, calling out the Tegra 20/30 and Vivante hardware as working well with recent X.org releases. OMAP/PowerVR devices and Mali-based devices are also usable, although they depend on TI's open-source framebuffer code and fbturbo, respectively. He has recently given up entirely on the Efika MX product line, he added, which only works with "ancient kernels and closed-source drivers."

Even if the user decides to update from the vendor-supplied kernel and graphics drivers, it may be difficult to find a fully working Linux distribution for any particular ARM board. Arnold's final status report was a look at the distribution offerings for the various open-hardware ARM products in his collection. Typically, he said, the vendor will supply an Android OS option plus one other, traditional Linux distribution for each device. These distributions, of course, are typically limited to the vendor's legacy kernel and binary-blob drivers.

But some ARM products stand out from the crowd for their ability to support multiple distribution options. The Raspberry Pi offers the most, via its "New Out Of the Box Software" (NOOBS) system, which includes six distributions. The BeagleBone and BeagleBone Black officially support several flavors of Yocto and OpenEmbedded Linux, as well as Debian, Ubuntu, and Gentoo. Various Chromebooks support multiple mainstream distributions (Ubuntu, Debian, Gentoo, Arch, and Fedora being the most common). Udoo boards support an Ubuntu variant (udoobuntu), Android, OpenElec, and occasionally other distributions as well.

Pulling yourself up by your bootstraps

Ultimately, however, most users get interested in bootstrapping their own distribution at some point. For those people, Arnold said Yocto was the most reliable option. If there is a vendor board-support package (BSP), he said, Yocto can run on it. Yocto can also run on a modest desktop Linux machine, building a full image and handling build dependencies automatically. If there is not a BSP for your board, he said, you can probably create your own for Yocto.

Gentoo is the next option; Arnold maintains the Gentoo overlays for most of the ARM devices, and new stage3 builds are created every few weeks. For newcomers who may not be ready to migrate their desktop to Gentoo in order to do a native Gentoo build, there are other options, such as performing the build in a virtual machine. Last but not least, Debian and Ubuntu are always available: "if you can boot it, you can debootstrap it," he said.

In the brief question-and-answer period at the end of the session, Arnold agreed with one audience member that the pace of new ARM hardware devices was becoming problematic. There are new chipsets every year, but it typically takes the free-software community two or three years to fully implement software support. In the meantime, users are often left with just the vendor-supplied kernels, graphics drivers, and distributions to work with. So users can "run Linux" on their open-hardware ARM boards, but the situation is far from ideal.

Index entries for this article
ConferenceSouthern California Linux Expo/2015


to post comments

Official support of a particular device

Posted Mar 5, 2015 11:05 UTC (Thu) by epa (subscriber, #39769) [Link] (1 responses)

It's true that there is lots of variety in ARM hardware, but in some ways it is less than in x86. You can say you have a Raspberry Pi Model B and everyone can see exactly what hardware that implies; the same is true for most of the other devices mentioned - except for a few cases where the manufacturer may have sneakily changed the hardware while keeping the same model number. But in the world of PCs it is less common to have a particular named "model" denoting a fixed hardware setup. Perhaps if you use a Mac, but even then the video card may differ.

What does this mean? It becomes possible for software to be tested on a particular hardware device and for everyone who uses that device to be confident it will work. So distributions could keep a list of supported ARM devices, and do so with much less effort than would be needed to make a supported list of PC models. So for example Fedora has a partial list of devices in its ARM page.

It's a shame that no one distribution is dominant enough that manufacturers can reasonably target it and say their device "works with Linux" meaning it is fully supported out of the box - in the same way we take it for granted that a PC will be supported by Microsoft Windows, at least as far as getting online and installing a few extra drivers.

Official support of a particular device

Posted Mar 6, 2015 12:17 UTC (Fri) by robclark (subscriber, #74945) [Link]

> So for example Fedora has a partial list of devices in its ARM page.

fwiw, fedora arm is actually what I wish board/SoC vendors would target... not because I like fedora (I do), but because if a board is supported it means it works w/ a multiplatform kernel (ie. one kernel build works on any device), with a standardized bootloader, etc.

Consumer ARM boards and the bleeding edge

Posted Mar 6, 2015 0:08 UTC (Fri) by abelloni (subscriber, #89904) [Link] (2 responses)

I just want to add that one does not run Yocto. The Yocto Project is an organization overseeing the development on several projects. The build system they maintain is Open Embedded and the reference distribution is named Poky.

The correct way of saying things would be: "This board runs Poky, which is a distribution generated using Open Embedded and maintained by the Yocto Project."

Consumer ARM boards and the bleeding edge

Posted Mar 7, 2015 23:39 UTC (Sat) by sarnold42 (guest, #101378) [Link]

First I appreciate the nice article, but I guess it's a bit too abbreviated and full of acronyms that some of the details were a little jumbled (or just overly abbreviated by me, as in this case ;)

Although the Yocto Project lineage is not laid out in detail here, that part is (hopefully) better in the slides? Most of the bullets are heavily shortened, so the first reference came out "Yocto/OE" and then later "clone the poky repo". All of our SCaLE slides are on github: https://github.com/VCTLabs/scale13x-presentations

Lastly, I mostly do the edgy testing work in my clone of another Gentoo developer's ARM overlay (a different Steve, who is actually working while I'm giving SCaLE talks). Beyond that is a dedicated team of embedded Gentoo developers maintaining packages and building the stages (ie, doing most of the work), the infra team, etc.

Consumer ARM boards and the bleeding edge

Posted Mar 8, 2015 10:24 UTC (Sun) by BlueLightning (subscriber, #38978) [Link]

Indeed. Just one minor correction to your correction though - OpenEmbedded is one word. ;)

Consumer ARM boards and the bleeding edge

Posted Mar 7, 2015 8:18 UTC (Sat) by speedster1 (guest, #8143) [Link]

Thanks for the SCALE coverage; great writeup as usual. I lucked out in that all three of the talks you covered were ones that I had missed, and I regretted missing this one in particular .

Consumer ARM boards and the bleeding edge

Posted Mar 9, 2015 11:40 UTC (Mon) by wookey (guest, #5501) [Link]

I'd just like to point out (as robclark is too polite it seems) that the Adreno family project (freedreno) is not just a 'project' - there is a very capable X/wayland driver so you really can run a fully free graphics stack on recent devices.

Consumer ARM boards and the bleeding edge

Posted Mar 11, 2015 1:08 UTC (Wed) by frowand (guest, #26209) [Link]

He advised users looking to deploy a mainline kernel on their ARM device to check the Linux on ARM page at the EEwiki to see if there is a recent how-to guide.
Another good reference site is elinux.org

Consumer ARM boards and the bleeding edge

Posted Mar 12, 2015 6:04 UTC (Thu) by Hanno (guest, #41730) [Link]

Last time I looked, Weston/Maynard was broken: https://github.com/raspberrypi/maynard/issues/30


Copyright © 2015, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds