LWN.net Logo

Advertisement

GStreamer, Embedded Linux, Android, VoD, Smooth Streaming, DRM, RTSP, HEVC, PulseAudio, OpenGL. Register now to attend.

Advertise here

ELCE: The state of embedded Linux

By Jake Edge
November 3, 2010

It is something of a tradition to have a "State of Embedded Linux" talk at each Embedded Linux Conference (ELC), and the recently concluded ELC Europe did not disappoint. In his keynote, MIPS architecture maintainer Ralf Baechle looked at the "pain points" for embedded developers, as well as what was being done to address them. He also looked to the future and made some predictions of what was coming for the embedded Linux landscape.

Baechle started working with MIPS Linux in 1993 or 1994, but was using Linux on x86 even earlier than that. He started off his talk by reporting on two embedded Linux summits that were recently held. One was at LinuxCon Japan and another was held in Cambridge, UK two days before his talk. There were a large number of companies represented at the summits, and "a lot of the big players". There were 16 attendees at the Tokyo summit and 12 at the one in Cambridge. The summits had "fairly good representation of the industry", he said, along with a bunch of architecture maintainers and users.

The summits were organized to talk about problems, Baechle said, as "the good stuff doesn't need to be talked about". The meetings were held "off the record" so that the discussions could be candid. The attendees identified a number of pain points for embedded Linux.

The first is the problem with "IP blocks", which are particular components that are licensed for use in system-on-chip (SoC) devices. A typical SoC "consists of a number of licensed IP blocks", and it is very hard for the kernel to determine which blocks are supported by included on a particular SoC. In addition, developers often don't know that a particular IP block is supported, so drivers and other support code get developed multiple times. There is a plan to maintain a list of these IP blocks in a wiki, along with their support status and device tree bindings, Baechle said.

Another problem area is "legal pain", mostly surrounding the GPL. That has caused developers to look at alternatives to glibc because it has moved they fear it moving to the LGPLv3. In addition, the GPLv3 has been interpreted by an unnamed company as being targeted at voiding its patents. Baechle doesn't agree with that interpretation, but GPLv3 certainly makes some companies uncomfortable. Android avoids all GPL code where it can, he said. Also, the BusyBox lawsuits have caused some consternation in the embedded world because of the demands for Makefiles and installation instructions. Not everyone interprets the GPL to require those things, but it is, as yet, unresolved.

There is also a fair amount of "kernel pain" in the embedded community, starting with the "huge version gap" among the kernels used in embedded Linux devices. Kernels from 2.6.11 up through recent kernels were mentioned as being used, and "not even 2.4 is really really dead", he said. But, Linux is finding its way into more and more products. There is a large company that has made it a policy to put Linux in any of its products that will need to be supported for more than 10 years.

Another part of the kernel pain is the large amount of out-of-tree code that embedded Linux developers are working with. Part of the problem comes from multiple groups within companies, each with its own fairly small set of patches. There is little communication between those groups, so that causes a "huge group of patches to build up" within the company. But the single largest patchset that is carried around by embedded Linux developers is the RT_PREEMPT patchset and the summit participants "really would like to see it go upstream", he said. There may be an effort among the participating companies to try to help make that happen.

But, there were not only pains discussed at the summits, there was also discussion of various things that had been added to the kernel recently, many of them with the support of the CE Linux Forum (CELF). SquashFS, which is a compressed read-only filesystem, was merged, as was LZO support for it. LZMA support for the filesystem made it as far as -next before that particular implementation was rejected by Linus Torvalds. There is hope for the YAFFS2 flash filesystem to be merged as it is now being cosponsored by CELF and Google.

A way to remove unused functions from kernel builds (i.e. -ffunction-sections support) for saving space is getting close to being merged as well, though it is currently held up by some PA-RISC linker problems. Using that can result in savings of around 7% of the kernel size, he said. While the merger of CELF and the Linux Foundation was not known until the Cambridge summit, Baechle expressed optimism that it would be good for the embedded Linux community.

Linaro presented itself at one of the summits. It considers itself a "community facing group", he said, that is working to reduce pain in the ARM world. It has 70 full-time engineers doing open source work. Right now, Linux can "at best produce one image per SoC family", which results in some projects needing as many as 50 images, all of which are slightly different variations. Linaro wants to reduce that pain so that companies can "differentiate themselves not by fixing random bugs, but by adding new features".

One thing that may help reduce the proliferation of slightly different variations is the device tree work. Device trees describe the buses, devices, memory, interrupts, and so on for a particular SoC. That tree gets passed to the kernel at boot time, which will allow kernels to support more SoCs within a single image. It is currently being used by Power PC across all of its platforms and MIPS is using it as of 2.6.37-rc1. Baechle said that ARM maintainer Russell King is "not quite convinced" about device trees, but he believes that King eventually will be.

Virtualization is a hot topic in the embedded Linux world these days, but it is "not going to be for everybody". Systems that are too resource constrained will not be interested in virtualization, but others will be. He went through various virtualization technologies available for Linux including containers, Xen, KVM, and two proprietary solutions from Wind River and MontaVista. Each has its place, but containers for OS-level virtualization and KVM for full virtualization are likely to be the dominant players for embedded devices, at least partially because they are part of the mainline kernel.

Baechle sees virtualization as a game changer for larger embedded systems. For example, high availability systems can use a pair of guests that can fail over to each other. That will also allow in-service software upgrades.

Alternatives to glibc were next on the agenda. Embedded developers are looking for those alternatives because glibc is "the size of an aircraft carrier". It complies with all of the standards but that comes at a heavy price. uClibc is one alternative, but the problem is that it is "yet another API" that application developers need to support.

But Embedded GLIBC (EGLIBC) offers an alternative for embedded developers that doesn't require a separate API. It is a variant of glibc that is maintained by CodeSourcery and is "embedded friendly". Unlike glibc (whose maintainer "says 'embedded crap' frequently"), it can be configured without some features, which leads to a reduction in code size, while still allowing applications that don't use those features to run without modification. In many cases, the same application can run on the desktop or the embedded device and there aren't two different toolchains required. EGLIBC is another game changer, according to Baechle, though it is not for the smallest systems. But it simplifies development which leads to "instant ISV [independent software vendor] happiness".

In a look at the mobile distribution space, Baechle was clearly impressed with MeeGo. He thinks that it will be a "fairly hot commodity in the future" because it uses the typical Linux software stack. Android, on the other hand, "feels alien", though Google does a good job with its development tools. Because MeeGo is stewarded by the Linux Foundation, it is in more neutral hands than Intel's would be, he said.

The "working upstream" policy of MeeGo is very important, he said. That policy is increasing the pressure on other embedded Linux community members to get their code upstream. MeeGo has the most push from the industry and a tremendous amount of money behind it. He is optimistic about its future, saying that "MeeGo is going to change the game a little bit".

The embedded world is changing, Baechle said. "Embedded" used to be a synonym for "resource-constrained", with functionality that was reasonably easy to implement. But, modern devices are multi-functional that share a lot of technology with desktop and server systems. There are devices using the NUMA code to get good performance from multiple memory banks, for example. SMP was originally developed for servers, moved into the desktop world, and is now being used by embedded devices.

In wrapping up his talk, Baechle looked into his crystal ball and made a few predictions. Over the next year or so, he believes that three more architectures will get merged, as will YAFFS2, but that the RT_PREEMPT patchset won't be. The pressure to work upstream will continue to increase which will lead embedded companies to rethink how they handle source code and how they put together their development teams.

"Feature-wise, Linux has become rather mature [and] very stable", but "the complexity of the code has increased quite dramatically over the last few years", Baechle said. There has been progress made everywhere in the kernel, with no one feature that stands out. That is likely to continue over the next few years, and we will be seeing Linux in even more devices.


(Log in to post comments)

ELCE: The state of embedded Linux

Posted Nov 4, 2010 1:12 UTC (Thu) by JoeBuck (subscriber, #2330) [Link]

"BusyBox lawsuits have caused some consternation in the embedded world because of the demands for Makefiles and installation instructions. Not everyone interprets the GPL to require those things, but it is, as yet, unresolved."

Then not everyone has read the GPL. It really isn't at all ambiguous, and it's hard to claim that it's unresolved (though some copyright holders might not be interested in enforcing the relevant provision of the license). From GPLv2:

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable.
The scripts used to control compilation and installation of the executable, if you're using a Make-based flow, are the makefiles, plus any scripts used to run those makefiles. The intent is clear: the person who receives the source should be able to easily rebuild the executable. That's why the BusyBox people have had no trouble forcing people to comply. If work needs to be done to separate out the build system for the proprietary parts from the GPL parts, sorry, that needs to be done up front. It's part of the price of being able to use all that great software for free.

ELCE: The state of embedded Linux

Posted Nov 4, 2010 2:04 UTC (Thu) by tbird20d (subscriber, #1901) [Link]

Although I do not have details, I believe the request was for more than just the Makefiles. I believe the request was for the instructions necessary to install the resulting binaries on the device. While the GPL v2 does say "scripts for ... installation", not everyone interprets that as installation to the device. In particular, one of the primary maintainers of busybox, Eric Anderson has told me he does not interpret the GPL v2 license to require that. It would be nice to get more legal details here, but the sued parties are being understandable tight-lipped.

I know some people in the community want to be Draconian about anti-Tivo-ization, but personally I just don't think the license requires it, and that this extra push for device installation access on a GPL v2-licensed component is doing more harm than good. I have heard that at least one company has backed off the use of Linux over it.

ELCE: The state of embedded Linux

Posted Nov 4, 2010 6:01 UTC (Thu) by madscientist (subscriber, #16861) [Link]

Personally I don't see the problem. If they "back off" using Linux, then that's THEIR loss, not ours. Who cares? This is not the 80's: FOSS is a dominant player virtually everywhere and need make no apologies to anyone.

The companies that do use Linux and the rest of the FOSS environment, and are willing to play by the rules, will have a huge advantage in time to market, etc.. That's what FOSS offers, but freedom AIN'T free-of-charge: you don't have to pay directly but you DO have to pay indirectly. If companies don't want to pay the indirect cost, fine: they can use something else and pay a different way, in up-front licensing, distribution, support, and development costs.

Of course there are always outliers but it's not hard to see how the result will trend over time, so why should we make it easier for them to make OUR lives more difficult--and less free?

ELCE: The state of embedded Linux

Posted Nov 4, 2010 11:22 UTC (Thu) by rwmj (subscriber, #5474) [Link]

They're always free to develop their own OS instead of reusing the hard work of others. Or go with a commercial OS and pay up $$ per device.

These developers are saving millions and yet won't release some simple Makefiles and instructions. The mind boggles.

ELCE: The state of embedded Linux

Posted Nov 4, 2010 21:46 UTC (Thu) by tbird20d (subscriber, #1901) [Link]

This is not about the OS, it's about busybox. The companies in question have released the source code, and Makefiles, and have complied with all license terms, according to their (and many others') understanding of the license.

Sure, you can tell CE companies to take their ball and go home, but I think it would be unfortunate for the industry and the community to fragment over this issue, when it appears to me that someone is just overreaching the license.

ELCE: The state of embedded Linux

Posted Nov 4, 2010 12:10 UTC (Thu) by etienne (subscriber, #25256) [Link]

> While the GPL v2 does say "scripts for ... installation"

Maybe it means that you can re-install an identical (bit to bit) library.
Does not forbid Tivo-ization, but at least you can check that you have the real source code - and can rebuild for instance to get debugging symbols.
That would forbid the user to encrypt the compiled library to hide bug fixes he has done, and distributing the sources without those bug fixes.

Busybox lawsuits: installation scripts and instructions

Posted Nov 4, 2010 20:59 UTC (Thu) by giraffedata (subscriber, #1954) [Link]

While the GPL v2 does say "scripts for ... installation", not everyone interprets that as installation to the device.

Plus, it sounds like they're demanding more than scripts for installation to the device. "Instructions" sounds like some document that doesn't already exist. When I read the GPL, it sounds all about releasing what you've got, not generating new stuff to help people to work with your code. You have to release the source code you use to generate the binary, but it doesn't have to be readable and you don't have to write up a tutorial on how to work with it. Or answer emails asking how it works.

Busybox lawsuits: installation scripts and instructions

Posted Nov 8, 2010 18:50 UTC (Mon) by johnflux (guest, #58833) [Link]

The worry might be if it's almost impossibly hard to install.

Busybox lawsuits: installation scripts and instructions

Posted Nov 9, 2010 4:01 UTC (Tue) by giraffedata (subscriber, #1954) [Link]

The worry might be if it's almost impossibly hard to install.

Yes, that's a well known weakness of GPL. It's possible in a number of ways to meet all its conditions and avail oneself of gratis code without actually giving anything back. GPL 3 attempts to severely reduce the ways to do that.

But the lawsuit won't be concerned with the license that the authors of Busybox intended to or would have liked to give. All that matters is the license they did give. If that license is effective even when the code is impossible to install, so be it.

ELCE: The state of embedded Linux

Posted Nov 9, 2010 6:45 UTC (Tue) by jmm82 (guest, #59425) [Link]

I have read the GPLv2 50 times and still find the document not obvious by nature. Isn't that on purpose?

ELCE: The state of embedded Linux

Posted Nov 4, 2010 21:26 UTC (Thu) by giraffedata (subscriber, #1954) [Link]

The first is the problem with "IP blocks", which are particular components that are licensed for use in system-on-chip (SoC) devices. A typical SoC "consists of a number of licensed IP blocks", and it is very hard for the kernel to determine which blocks are supported by a particular SoC.

I wish people wouldn't use "supported" this way. It's ambiguous -- there is always a more explicit, plain way to say what you mean. And its almost always inconsistent with the regular English definition of the word (to hold up; more abstractly, to assist). This article does it nine times.

So someone help me out: first, what is an IP block (what sort of component are we talking about)? And what does it mean for one to be supported by a particular system-on-a-chip (particular model of SoC, of course).

ELCE: The state of embedded Linux

Posted Nov 4, 2010 22:01 UTC (Thu) by tbird20d (subscriber, #1901) [Link]

An example of an IP block on an SOC would be an ethernet PHY - the silicon gates needed to provide ethernet functionality directly from the SOC chip, and not from an external chip. In this context, "included" may have been a better word than "supported". That is, an SOC will often include several collections of (mostly predefined) silicon gates to provide specific hardware functions from the SOC.

SOC manufacturers often license or purchase IP blocks to add to their chips from external parties. Often, a spec. sheet for an SOC will say that a chip has a particular functionality, but not describe the hardware in enough detail to easily write a driver or adapt an existing one. Because many of these IP blocks come from the same vendors, it can save a lot of work if a driver author knows the source of the IP block on the SOC, as the developer can then reuse an existing driver, if there is one, more easily.

ELCE: The state of embedded Linux

Posted Nov 4, 2010 22:22 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

the issue is that in most cases the only variation between the same block being used on different chips is the exact details of how they are wired (and therefor how they are addressed)

another way to think about this for people is to think about serial ports on PCs. there were some standard places where the first couple of ports were configured to be used, but you could install additional serial ports in your system on non-standard ports, but you would have to configure the OS to know where the ports were. At one point this involved editing the linux source code.

this is the state that these SoC setups are in today. they have a different subarchitecture definition for each chip, mostly differing only by this sort of details.

the devicetree plan pulls these addressing issues out of the kernel into a separate file that's passed to the kernel at boot time. This way you can know that a kernel that is tested with the devices at one address will work with the devices configured at a different address rather than having to test every permutation, just in case there is some difference between the different subarchitecture definitions. The problem with the subarchitecture definitions is that they don't only contain this sort of problem, they contain a lot of other config options, and that's what Linus blew up over a few months ago, he saw how there was no consistancy about the config options that had nothing to do with the hardware in the different subarchitecture defintions, and the differences were not justifiable with any need, they were just what the person who created that subarchitecture thought were reasonable defaults.

ELCE: The state of embedded Linux

Posted Nov 14, 2010 1:17 UTC (Sun) by Kamilion (guest, #42576) [Link]

In this case, an Intellectual Property Block, or the Verilog/VHDL gate description of a specific subsystem:

OpenRISC 1000
Ethernet MAC 10/100 Mbps
I2C controller core
SD/MMC communication controller
USB 1.1 Host and Function IP core
SPI controller core
VGA/LCD Controller
UART 16550 core

Most of them have a common 'bus-type' inside the chip; a lot of these open ones are Wishbone based.

See http://opencores.org/ for a list of many more IP Cores. There are thousands more proprietary cores one can license from a company, for example, ARM. Some charge more than others. Some won't allow you to synthesize designs; some will license it separately.

Most of them can be added to the bitstream of a FPGA, a Field Programmable Gate Array (Basically a big block of logic gates that can be programmed to 'be anything') and later, burned into silicon as an ASIC design, after the synthesized FPGA design proves itself in field testing.

ELCE: The state of embedded Linux

Posted Nov 9, 2010 0:04 UTC (Tue) by adisaacs (subscriber, #53996) [Link]

> Linux is finding its way into more and more products.
> There is a large company that has made it a policy to
> put Linux in any of its products that will need to be
> supported for more than 10 years.

Confusing wording here, maybe a missing "not"? "Made a policy to NOT put linux in products needing 10 year support"?

ELCE: The state of embedded Linux

Posted Nov 9, 2010 1:04 UTC (Tue) by jake (editor, #205) [Link]

> Confusing wording here

Sorry that it's confusing, but there isn't a missing 'not'. The company evidently wants Linux in any product that it needs to support for more than 10 years.

jake

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds