Open Source--The Unauthorized White Papers Chapter 9, The Secret Battlefield, Embedded Systems

Open Source: The Unauthorized White Papers

Chapter 9

The Secret Battlefield: Embedded Systems

Although its progress in small devices is largely unnoticed, Linux is one of the best-suited technologies to take over a space few consumers are aware of. In this chapter you will learn about the strengths of Linux and other Open Source operating systems in this growing market, and why it may likely surround you before you are even aware of it.

Background and Advantages

Although a latecomer to the field, Linux has a bright future in embedded systems. From cell phones to household appliances, the number of places in which we find embedded systems in everyday life is growing. The automobile is probably the most widespread intensive user; from brakes to air bags to fuel/air mixture controls, a new model may contain 30 to 50 embedded systems.

Embedded software originated in the late 1960s as "stored program control" in telephone switches; it moved to other devices, but was always custom written for a particular piece of equipment. The coming of the microprocessor enabled programmers to write to a particular microprocessor that could be used in different devices, and to reuse code from device to device. Originally this code was machine or assembler language, but by the 1970s libraries of code appeared, and by the end of the decade there were packaged operating systems intended for embedded use; each operating system was tailored to a particular microprocessor. Eventually systems began to use C, the portable language that gave rise to UNIX, the portable OS.

Linux has several advantages for embedded systems: a small footprint, ease of use, portability to many processors and platforms, scalability, and its famous stability. A minimal embedded Linux consists of the core kernel and boot utility, along with memory and process management, timing services, and an initialization process. To this we might add hardware drivers, one or more applications, networking, a file system, storage space, and perhaps a simple user interface. Some RAM is needed to hold the kernel and applications; flash memory can be used for file storage, from which the application can load and unload files as needed, saving RAM space. Because Linux is an operating system, it can control all these functions and manage memory as well. Its ability to check and repair itself is useful in case of interruptions, such as a power failure in mid-upgrade.

Although the Linux kernel is small, as full-sized operating systems go, it is not tiny enough for the world of embedded systems. Its size and power suit it to the middle and high end of the embedded systems range; its flexibility and functionality make it large in terms of embedded systems, which are sharply focussed on a particular device. For these reasons, part of the skill in deploying Linux for embedded applications is trimming it down to appropriate size and functionality. Linux has the significant advantage of being able to draw on the entire code resources of the Linux Community for faster development and for driver support.

Linux strength in networking is important in modern embedded systems. Hotels, for instance, control electronic keying through console software at the front desk and embedded systems in the door locks; heating and air conditioning are activated or not depending on the remotely sensed presence of guests in their rooms. In any embedded system, networking may be used to manage the embedded software by installing upgrades or by adding or collecting data. The convergence of computers and telephones on digital data, and the growth of communication in embedded devices, particularly over the Internet, calls for an operating system that already implements the new IPv6 communications standard. This standard greatly expands the number of possible network addresses, making it possible to connect many billions more devices to the Internet (a manufacturing plant might need 10,000 addresses for the assembly line; the ESRF laboratory uses some 4,000).

Because current users of embedded Open Source systems are early adopters seeking a competitive advantage for their enterprises, we hear very little about what they are doing. Nor are we able to track the spread of Linux devices through license counts, because Linux is freely distributable. Only recently are tools for embedded Linux becoming available, along with the associated publicity for them and for embedded Linux.

Many early adopters of Linux are found in scientific research laboratories; an example is the European Synchrotron Radiation Facility (ESRF) in Grenoble, France (http://www.esrf.fr/), home of a gigantic X-ray beam device. The laboratory now runs all its operations on Linux; at the embedded end, the main use of Linux is to control the stepper motors that direct the beams and to control the target samples that the beam bombards. There are 40 beamlines, each operating around the clock seven days a week. Each beamline has over 100 stepper motors. Some of them move independently, and some are moved in coordination with each other.

ESRF chose Linux because it incorporates standards such as POSIX, CORBA, Java, HTTP, and TCP/IP. This enables the embedded Linux software to work with all the other software at the institution, including the Beowulf (Linux) supercomputing installation. Because the controller project is based on a 10-year schedule, the scientists wanted to be sure that they had the source code so that their work would be vendor-independent. They began by cutting down a SuSE Linux distribution to 24MB; they then used a Debian file management system. Finally, they wrote their own device drivers for the equipment, and turned these over to the Community, anticipating both that the drivers would be useful to others and that others would in turn contribute maintenance code and additional drivers.

Some Embedded Systems and Tools

Embeddable Linux appeared early in its hobbyist phase. The Embeddable Linux Kernel Subset (ELKS) took the Linux designed for a 386 Intel chip and pared it down to run on the 8086 because at that time the 386 chip was too expensive for embedded uses.

 

Cross-Reference

Links to other embedded Linux projects can be found at http://emlinux.com/Specialized_linux_projects.html and http://linux-embedded.com/software.php3.

To name just a few, RTLinux, (http://www.rtlinux.org/) is an extension to handle interrupts, so that Linux can be attached to data acquisition and control devices. It is also available in a version for multiple processors (SMP). Linux on a Floppy (LOAF, http://loaf.ecks.org/) is a cut-down Linux that fits on a floppy along with ftp and Lynx browser software. Its main purpose is to enable the user to walk up to any networked computer and turn it into a temporary Linux box; it could also be modified for special purposes. A special-purpose Linux ready for use is the Linux Router Project (LRP, http://www.linuxrouter.org/); it also fits on a floppy, and can be used to build and maintain embedded systems, but particularly routers, access servers, thin servers and clients, and network appliances. Its limited functionality increases its security when used for Internet connections.

 

Cross-Reference

For more information on Community projects, see EmbedLinux.NET (http://www.embedlinux.net/) and LinuxDevices.com (http://www.linuxdevices.com).

Besides these Open Source projects, there are commercial Open Source and proprietary resources for embedded development. Caldera Systemsí sister corporation, Lineo (http://www.lineo.com/), provides the Embedix system (based on the Caldera distribution), along with a browser, Embrowser (Calderaís DR WebSpyder). The firm recently bought Zentropix (http://www.zentropix.com/) to add its development tools to the Lineo product line. The rapidly growing start-up MontaVista Software (http://mvista.com/) makes a strong selling point of offering its Hard Hat Linux as royalty-free Open Source software. Lynx Real-Time Systems (http://www.lynx.com/) is now supplying BlueCat, its embedded adaptation of the Red Hat distribution, to interoperate with its own proprietary Lynx embedded OS.

Note

Open Source embedded systems can offer "real fast," but not "real-time." Despite the use of the term "real-time" in connection with Linux, there is no Linux or BSD system that is a true real-time system. The Open Source systems use timed interrupts that can be assigned different priority levels. BlueCat, for instance, is not real-time, but Lynx is. BlueCat provides the upsell opportunity for Lynx.

Besides selling embedded software, firms can offer the hardware as well: 3iLinux (http://www.3ilinux.com/), part of 3iNET, offers a 386-based Internet appliance with a Linux system already on it, ready for the customerís software. This way customers can invent their appliances and supply the software for them; 3iLinux acts as manufacturer to mount these on their Universal Internet Box (UIB) hardware and software platform. A small 2x16 LCD screen, power supply, two fax modems, and pushbuttons are included in the small device, which has already been cleared by the FCC and EC. All the 3iLinux code is Open Source.

Cygnus Solutions has traditionally been strong in the embedded sector; this capability is the major reason for its purchase by Red Hat Software. Cygnus has its own embedded operating system, eCos, and has large plans for embedded Linux (see "Standards" later in this chapter), which include an SDK and configuration technology.

Linux may be getting the publicity, but BSD also offers embeddable technology with similar advantages. Free versions include picoBSD, from the FreeBSD project (http://www.FreeBSD.org/~picobsd/); among free real-time systems there is RTEMS (http://www.rtems.army.mil/), which includes FreeBSD material, and you can develop for it using FreeBSD. RTMX/OS from RTMX (http://www.rtmx.com/) has proprietary real-time extensions based on OpenBSD, and is POSIX compliant. BSDI offers the proprietary e/BSD (http://www.BSDI.COM/products/eBSD/); it has per-copy licensing fees and a fee for a separate development license.

Business models

Whether any of these companies put out Open Source tools for free, or proprietary tools for money (see Table 11-1), they all face the same economic question of how to make enough money to cover development, distribution, and support of their products, besides making a profit. Lineo and BSDI enforce a per-copy royalty, a model frequently difficult to administer and collect. For companies with a truly open model (that is, the software can be downloaded from the Web and modified and freely distributed), charging for a nice copy of the product (bound manuals, CD, and so forth) will probably not generate much income.

Table 9-1

Commercial and Proprietary Embedded Systems (Linux and Others)

Product

System

Acquire for Free?

Modifications Allowed?

Free Distribution of Modifications?

Embedix (Lineo)

Linux

System free; tools and browser not free

Yes

Royalties for proprietary material

Hard Hat (Monta Vista)

Linux

Yes

Yes

Yes

BlueCat (Lynx)

Linux

No

Yes

Yes?

eCos (Red Hat)

Other

Yes

Yes

Yes

picoBSD (FreeBSD)

BSD

Yes

Yes

Yes

e/BSD (BSDI)

BSD

No

Yes

Royalties

Support, on the other hand, is the natural place to look for revenue. Not only does this represent an attractive exchange of value for the customer, no vendor who is embedding software in a product will want to go without upline support from the tool or operating system supplier. This support may be priced per developer, further stratified by level of support, and collected on an annual basis. An alternative model would be to price on the basis of a percentage of revenue from the customerís shipping product. Some of the many ways of slicing the pie are covered in the Guide to OEM Software Licensing at (http://www.stromian.com/guide.htm).

An interesting issue has surfaced in the auto industry. Over the years Detroit automakers have off-loaded many of their costs onto suppliers, letting them carry the inventories, for example, and integrating their information systems into the automakersí own. In recent years the automakers scrutinized suppliersí costs for the parts supplied. Now that the automakers know how much each screw costs, there is a problem with the suppliersí substituting software for hardware as more embedded systems are built into cars: the automakers donít want to pay for the software. Suppliers are trying to persuade the automakers to accept value pricing based on functionality, not materials costs.

Licensing issues

The embedded market began in fragmentation, with many different pieces of software on many different devices. A trend towards Linux will tend to pull the market together, making more application software available across more devices. Not all of the software needs to be Open Source, but the Linux kernel is covered under the GNU General Public License (GPL), which requires that source code for it be made available to any user who has the binary code.

The average user who has the binary code embedded in a device may not care, let alone know, what the software is or that the source code is available. Nevertheless, anyone who must support the device may have a strong interest in the source code, particularly if modifications to the deviceís code are still possible in the form of maintenance routines, such as flash upgrades.

There are subtleties to GPL licensing that have not been settled, but they have not slowed down the market. They tend to revolve around the GNU LGPL, a license covering the linking of libraries. Briefly told (details on the LGPL are provided in Chapter 7, "The GNU GPL and the Open Source Definition"), the question is whether the linking of libraries in an embedded device remains dynamic (allowed) or whether in the confines of a device they end up statically linked (not allowed). In real-time systems, for instance, all software ends up linked into a single executable.

Another difficulty is the potential conflict between the GNU GPL, the license that covers Linux and asserts the recipientís right to modify received code, and legal constraints. If the software in a device canít be altered after manufacture, few people would claim that limitation as a violation of the GPL, but in a device that could allow the software to be modified (in a PROM, for instance), there may be legal constraints against providing the means of altering the code. FDA-approved medical devices, for example, may not be altered without voiding that approval. In the case of devices not under FDA approval, some people believe that supplying the source code would be a tacit encouragement to modification, and that the manufacturer could be liable for damages resulting from such modifications. This is an unfortunate but understandable conflict between the desire to have peer review and improvement of code on which lives depend, such as medical devices and flight control systems, and safety policies that donít want to leave the devices and systems open to tampering of any sort.

Apart from the legal restrictions described previously, you may modify a Linux distribution received in an embedded device, provided there is a way to access it. Vendors who do not want to deal with problems arising from customer modifications might consider using a form of BSD system because the license allows binary-only distribution. In addition, a vendor can freely mix proprietary code with BSD code to build a device; BSD licensing is an important strength in the tight confines of the embedded world. Using BSD will also relieve a vendor of any worry about who in the downstream distribution should be receiving source code or a notice of its availability, as would be the case with Linux.

Standards

Because the embedded world has a large variety of devices and tends to have individually crafted software on each device, it is a highly fragmented world. The Linux world is haunted by the example of the fragmentation that robbed UNIX of much of its influence, and as they look at the many Linux hacks created for embedding, particularly at the low end, the embedded world seems to some people the most likely spot for that fragmentation to accelerate.

Standards are the logical answer to fragmentation, and some thirty companies have recently formed an Embedded Linux Advisory Board. Lineo, Inc., like its sister firm, Caldera Systems, Inc., is a strong supporter of standards bodies. Such bodies, however, tend to move slowly; the market, on the other hand, likes to follow successful implementations and award them the status of de facto standards. We have already spoken of the advantages of controlling a standard, and of Microsoft as a successful example.

We have also looked at de facto standards in the Open Source world, in terms such as forking and project control. Although anyone can begin a new fork of a project, the original project group and its leader, so long as they continue to invest resources in the project and show responsiveness to their public, are unlikely to be bypassed. Cygnus plans to continue to be a leader in the embedded market. Its acquisition by Red Hat led to the Open Sourcing of eCos under an arrangement like the Mozilla Public License, and called the Red Hat eCos Public License (http://sourceware.cygnus.com/ecos/license.html). This Open Sourcing serves to reinforce the central position of Cygnus in embedded systems, a position that the company intends to extend by promoting the EL/IX interface as a standard.

The Cygnus answer to fragmentation is the EL/IX embedded Linux application program interface (API) based on POSIX real-time standards. The object is to encourage embedded systems to implement this API, as eCos is doing. Then any tool that writes to the EL/IX API can expect portability across systems that implement it, whether they are Linux, eCos, or any other system that chooses it. This arrangement ensures that eCos, a highly specialized, deeply embedded (that is, not nearly so large as Linux) system will continue to evolve, along with Linux. An Open Source, freely downloadable and distributable eCos is more likely to become widely used, and a standard; Cygnus will flourish by providing packaging, support, and consulting.

Cygnusís deep knowledge of eCos and EL/IX will enable it to do a superlative job of incorporating EL/IX support into its own tool, which it also sells to Windows developers. By arranging the pieces properly, Cygnus (and Red Hat) tap into the much larger Windows market. Other Windows development toolmakers may also wish to implement the EL/IX API, especially to take advantage of free eCos. This is great leverage of its resources by a small firm; participation will only make the arrangement stronger and more profitable for everyone. This is the classic Open Source approach; you donít pay for the software, you pay for the support. If you canít afford paid support, you can use free versions of software and look on the Internet for community support.

Although the strategy is very young, it is already bearing fruit. Red Hat/Cygnus has invested the developer effort and made the Open Sourcing commitment on both eCos and EL/IX. A demonstration of the strategyís attractiveness is that the 100 persons attending the Linux Real Time Workshop (http://www.thinkingnerds.com/projects/rtl-ws/rtl-ws.html) in Vienna in February 2000 (an estimated 20 or 30 Americans attended) voted 99 to 1 to adopt EL/IX as the interface they would write to. They did not legislate anything, but their vote shows the attraction of the EL/IX standard, and the worldwide reach of Linux.

Red Hat intends to leverage its new strength in embedded systems even further. Michael Tiemannís persistent talk about "the post-PC world" points to a world of devices with Internet capability rapidly taking over functions now belonging mostly to PCs. This world of intercommunicating autos, appliances, telephones, computers, and other devices will come about much more quickly if there is an open standard of cross-platform development that ranges from high-end systems to embedded systems. Linux can play a large part in this system, and may be the eventual winner. Red Hat has two roles to play: it can provide the technology to put the software on all these systems, and it can provide hosting and services and storage in this Internet-based world. If eCos helps bring on this new world and flourishes, thatís fine; if all the improvements are gradually imported into the Linux kernel itself, thatís fine, too. All Red Hat needs to do is be careful not to point EL/IX too specifically at eCos, as Microsoft pointed its Java tools at ActiveX.

On its way to becoming all things to all people, Red Hat is bound to encounter Sun Microsystems, who began to dream the same dream some years back. The Sun implementation is to use Java, which began as an embedded language and which is also network-enabled. By putting a Java Virtual Machine (or Sunís Jini technology) on your device, you should be able to run Java code written to the proper Java standard. The adoption by developers of the EL/IX standard, providing it is not hijacked by any vendor, would bring Linux closer to this goal than Sun. In its NT version, eCos has the sort of visual interface favored by Microsoft-based developers, as mentioned previously. The strategy here is to milk the Windows market by allowing developers to use NT as a development platform (writing to the EL/IX API) and then to deploy the applications on a free system. Developers at eCos are working on implementing a GNOME-based interface to bring the same sort of graphical interface features to the Linux end of the market. GNOME, by the way, will enable developers to write handsome user interfaces on embedded applications as well.

Microsoft is entering the embedded market by offering a variety of products. Vendors have been slow to adopt Windows CE because it is too cumbersome for its main target, the palm-top market currently dominated by the PalmOS, and so Microsoft will soon enter the market for the larger hand-held computers with a PocketPC device running its own version of Windows. Microsoft also makes an embedded Windows NT product, but it is basically an NT that will run without a monitor, and is intended for ISPs and similar sites. In the anonymous space of device software, the Microsoft name is not a strong advantage. The newly announced Microsoft X-Box runs a cut-down version of Windows 2000; it would be interesting to consider Microsoftís position as an embedded device vendor if they were to adopt Linux. There are rumors that one faction within Microsoft wants to Open Source Windows CE. Even if Microsoft did not do so, merely dropping royalty fees on the distribution would be a boost to Microsoft embedded ambitions, and Microsoft could sell its development tools to a larger group of developers.

Over the long haul, however, the Linux and BSD advantages of having a separate operating system and graphics system mean that smaller, simpler interfaces are possible, and the fact that they will interoperate with much larger UNIX machines (or Beowulf clusters) gives a strong push into wider adoption.

Some implementations

Embedded software may originally have meant an application with no user interface, hidden deep within a device, but the addition of a button or two does constitute an interface. It is thus common nowadays to talk about "deep embedded" (more like the original embedded) and "high embedded," meaning with quite a lot of interface and functionality ó examples would be kiosks or handheld devices, such as the little hand-held computers running Windows CE or PalmOS.

Linux and BSD, because of their size, came late to the embedded market, but they shine in large devices with extended functionality. Internet appliances, for instance, are plug-in servers that require a minimum of configuration, such as the Interceptor firewall from Technologic, Inc. (http://www.tlogic.com/), which uses BSD/OS, or the Cobalt Qube Web server (http://www.cobalt.com/), which uses a BSD variant, or the similar Whistle InterJet (http://www.whistle.com/), which uses FreeBSD. A Linux system forms the basis of the secure server BRICKHouse from Systems Advisory Group Enterprises (http://3rdpig.com/). High-end systems could even have voice interfaces added with the SDKs available for Linux from IBM (http://www.ibm.com/) and Learnout & Hauspie (http://www.lhs.com/).

Note

Samsung has announced a Linux PDA and MP3 player for summer 2000 release (http://www.sem.samsung.co.kr/eng/product/digital/pda/).

Linux is also at the heart of the Philips TiVO personal video recorder, and WebPad, an information appliance platform from National Semiconductor (the WebPad also runs PSOS and Stinger embedded systems). Interestingly, Sun Microsystems gave a demonstration of its digital living room using a WebPad running Linux to substitute for a PC, remarking that the operating system was not "a big issue." Sonyís Playstation2 will use Linux; this box will compete against the forthcoming Microsoft entry into the video game console, the X-Box. A French product called Everybook will use Lineoís Embedix and Embrowser, while several companies are using NetBSD for their embedded projects.

Finally, Linus Torvaldsís employer, Transmeta Corporation (http://transmeta.com/), has launched what amounts to an embedded computer. The Crusoe chips from Transmeta will have built-in software to enable them to run a number of different operating systems and their applications on one chip.

Open Source Databases for Embedded Systems

The larger embedded systems for which Linux and BSD are so well suited frequently need a database to go with them; among available Open Source solutions are the following:

SleepyCat

http://sleepycat.com/

Specializing in embedded

MySQL

http://mysql.com/

Widespread

PostgreSQL

http://postgresql.org/

Object-Relational with commercial support available

db.Linux

http://www.openave.com/db.linux/

newly-released to Open Source

This Part of the book has shown you the technical range covered by Open Source, a spectrum running from tiny to huge implementations. The next Part, "Open Source Software AS Your Business," will show you a number of the current ways that businesses are making money by writing, supporting, or distributing Open Source software. New businesses are emerging all the time as they find needs and figure out how to fill them. The whole industry is just now getting off the ground, and there is probably room for you, too.

Next chapter: The Platform: Software and Hardware

Table of Contents

Copyright © 2000 by IDG Books Worldwide, Inc. Published under IDG Books Worldwide, Inc. Open Content License.