|
|
Subscribe / Log in / New account

Linux in consumer electronics

By Jake Edge
October 10, 2007

Linux is embedded in a huge number of different devices, but the high-profile gadgets – the Nokia N800 and OpenMoko phone for example – get all the attention. Those gadgets use Linux as a selling point and a differentiator, trying to appeal to developers and power users who can customize the devices to do exactly what they want. Meanwhile, the vast majority of embedded Linux devices are running it quietly. For those systems, Linux provides a stable platform, with support for a large number of architectures and devices, that just works.

Consumer electronics makers are turning to Linux in a big way. Sony provides an eye-opening list of their devices that run Linux, which covers a wide spectrum of the products that Sony makes; things like digital cameras, video cameras, televisions, audio gear, and professional video equipment. Other companies also have Linux web pages, none quite like the one that Sony provides, and the Consumer Electronics Linux Forum (CELF) has started gathering links to those sites on their embedded Linux wiki.

Linux provides a number of advantages for embedded developers, the most obvious is its price. Commercial embedded operating systems typically charge royalties on a per-device basis, which can be a significant factor, especially for low-end devices. For high-end devices, especially professional grade equipment, the cost of the OS is much less of an issue, but the Linux feature set and hardware support still make it an attractive choice.

One of the advantages that Linux provides is virtual memory – commercial embedded operating systems often rely on a flat memory layout. Virtual memory has a number of useful benefits: process isolation, shared code segments, as well as the ability to overcommit memory. Tim Bird, Sony kernel hacker and architecture group chair for CELF, puts it this way:

[...] one of the important reasons for using Linux is its support for virtual memory. There is one product where the amount of RAM allocated for an application is 10MB, but the application couldn't fit in this. By using Linux, and over-committing memory, the OS, libs and the application and its data were able to fit into the RAM budget. Obviously, Linux itself and the support programs and libs (primarily busybox and glibc) must be as trim as possible in order to make this work. So Sony is always concerned about kernel and program size.

Another area of importance to the embedded world is the variety of hardware supported by Linux. Not only is there support for many of the CPU architectures used in embedded devices, but there are drivers for all kinds of peripherals that might be used in the design. If a driver does not exist for the specific peripheral device being used, there is probably a driver for something similar that can be used as a template for a new driver. Alternatively, the Linux Driver Project – which we covered last week – is willing to write the driver given some information about how the device operates.

Support for multiple network protocols, different bus architectures, and various peripheral connections (USB, Firewire, etc.) are also very important, depending on the intent of the device. Because the Linux community is large, and growing, it can support many more options than the commercial embedded OS vendors can. In addition, as the development staff at a consumer electronics company come up to speed on Linux, it will make sense to use it in more devices. This will lead to more supported devices, CPUs, bus architectures, network protocols, and so on.

The added features of Linux do come with a cost, which Bird refers to, of larger kernels and libraries. The linux-tiny project is an effort to reduce the size of the kernel, so-called kernel bloat, for embedded and small systems, which has been pretty well received by kernel hackers. It is a testament to the Linux developers that it already runs on everything from mainframes to mobile phones; it is a rare OS indeed that will make the effort to scale over that wide a range, with the inherent tensions between the needs of the various constituencies.

It probably isn't possible to get a shell prompt on your television or video camera, as these devices aren't meant to be user serviceable, at least at the OS level. User modifications or updates to the code may well be difficult or impossible as well. For devices that are not connected to the internet, which is presumably the case for the majority of them, this is probably a non-issue. Presumably the device manufacturers have ways of upgrading if bugs or security flaws are discovered, but those would be handled by service centers or the like. Those who are opposed to the "Tivo-ization" of the kernel will be less than pleased, but most kernel hackers seem willing to have it used that way, so long as the code is made available.

We will be seeing Linux in more places as time goes on as it is proving a robust solution for all kinds of applications. Perhaps you stare at Linux all day, hacking on code, working on graphics, or running a word processor, it is quite possible that you may also be staring at Linux at night, inside the television in your living room.



to post comments

Linux in consumer electronics

Posted Oct 11, 2007 1:57 UTC (Thu) by felixfix (subscriber, #242) [Link] (3 responses)

I'd guess the most important reason for choosing linux is source code, so they aren't beholden to capricious proprietary vendors. I worked on one firmware project where the vendor drove us crazy with their lack of support. Even worse would be if the vendor goes out of business or takes their product in an unwanted direction, or, worst nightmare of all, strikes up some exclusive deal with a competitor. I could easily imagine Microsoft doing that if you annoyed them with, say, public criticism.

Linux in consumer electronics

Posted Oct 11, 2007 6:12 UTC (Thu) by k8to (guest, #15413) [Link] (2 responses)

From my experience working at a proprietary OS vendor, the driving factors were:

1 - desire for source code access on its own terms
2 - the way projects come about, buying a package to build something doesn't work for projects that sort of accidentally emerge
3 - wanting complete control over their projects, whether or not they have the skills to make that a reality
4 - seeing linux as a way to cut costs from continuing to maintain their existing home-grown OS (this was the majority of the market not ten years ago)
5 - ability to fix bugs that crop up

A lot of these are similar/overlapping ideas but they're different sorts of decision making processes that get you there. Proprietary platforms really were never competitive in terms of market share to the make-it-ourselves mindset.

What the proprietary vendors had were superior centralization of management, a broader driver market, superior development tools, and .. *sometimes* focused technology for niche areas. Linux defeats the first two outright, and tools vendors can easily sell stuff for developing on Linux. It's only the niche technology stuff that would still have you using something else.

Well, that and targets that are "too small" to run linux. No one's rearing to run linux on a 16bit microcontroller.

At least, that's my perspective.

Linux in consumer electronics

Posted Oct 11, 2007 9:04 UTC (Thu) by alex (subscriber, #1355) [Link] (1 responses)

Linux has pretty good driver support. Certainly for any mid-sized project (for example embedded systems with mini-PCI buses) it makes choosing devices easy if they have a Linux driver. Sure Windriver would write a network driver or a SCSI driver for vxWorks but we would pay a lot for it and if we wanted to switch devices in a later design we would have to pay again.

Linux in consumer electronics

Posted Oct 11, 2007 18:35 UTC (Thu) by k8to (guest, #15413) [Link]

It seems my choice of phrasing was not clear enough, here it is with an addition:

What the proprietary vendors had -- in comparison to completely home-grown solutions -- were superior centralization of management, a broader driver market, superior development tools, and .. *sometimes* focused technology for niche areas.

Linux in consumer electronics

Posted Oct 11, 2007 10:56 UTC (Thu) by nix (subscriber, #2304) [Link] (4 responses)

Using glibc on an embedded platform with a 10Mb memory budget strikes me as... strange. This is explicitly not the environment it's targetted at: why not use uClibc, which *is* explicitly meant to play well on embedded systems?

Linux in consumer electronics

Posted Oct 11, 2007 16:01 UTC (Thu) by tbird20d (subscriber, #1901) [Link] (1 responses)

Using glibc in the most RAM-constrained devices is indeed odd. Sony started looking at glibc alternatives some years ago, and at least a few products have already shipped with something else. A few Sony products have shipped with uClibc, and some have shipped with our own minimized C library (which is even smaller than uClibc).

If you look at our Linux download site, and can't find the C library package, that's an indicator that we're using our own C library on that product. One example is the DSC-T100 still camera. For that product, you'll see that the list of open source user-space components is very small (only 5 packages).

newlib is another alternative

Posted Oct 11, 2007 17:25 UTC (Thu) by JoeBuck (subscriber, #2330) [Link]

newlib is a small C library developed by Cygnus Solutions (now part of Red Hat) for their embedded systems customers, back when they were in that business (many pieces are of BSD origin).

Linux in consumer electronics

Posted Oct 11, 2007 16:52 UTC (Thu) by daney (guest, #24551) [Link] (1 responses)

The last time I checked (for mipsel-linux) the sizes of glibc an uClibc as reported by 'size' were about 1200KB vs. 750KB which is considerable if you have a 10MB RAM budget. When you go to 20MB and consider paging and the afore mentioned over-commit, the size difference starts to become less important. Other things to consider are binary compatibility between versions and availability of a high performance thread library (NPTL).

If you are concerned about memory consumption you should also look at the pre-linker which reduces the number of dirty pages in shared libraries. Support for this may be better in glibc.

The different C libraries have different strengths, you have to decide on a case by case basis which is better for a given situation.

Linux in consumer electronics

Posted Oct 11, 2007 19:17 UTC (Thu) by oak (guest, #2786) [Link]

Big reason for using uClibc instead of glibc would be need for static binaries, static glibc binaries are huge and not even really static...

Linux in consumer electronics

Posted Oct 19, 2007 2:24 UTC (Fri) by clamiam (guest, #42029) [Link]

I knew about Tivo, but I was really surprised when setting up a Hitachi plasma TV for my
parents.  I was leafing through the manual when I came across the GPL!  It appears that this
model uses Linux as well as several bits of GNU software.

The article mentions that upgrades "would be handled by service centers", however this TV is
unique in its upgrade method.  You simply call Hitachi's support line (they're pretty nice, in
my experience) and request an upgrade card.  A few days later, you get a bubble-envelope with
an MMC card and a smaller, self-addressed, stamped bubble-envelope.  Just click the card into
the slot on the back of the set and hit the "upgrade" entry in the menu, and you're done.
Then put the MMC card into the smaller envelope and drop it in the mail.

The best part about this is the little notice they send along with the card.  It says
something to the effect of "PLEASE RETURN THE UPGRADE CARD AS SOON AS POSSIBLE.  Customers who
do not return the card in a reasonable amount of time will receive lower priority when
requesting future upgrades."


Copyright © 2007, 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