PRODUCT HOW-TO: A New Approach to Embedded Linux Development - Embedded.com

PRODUCT HOW-TO: A New Approach to Embedded Linux Development

The commercial embedded Linux market was created ten years ago when Jim Ready founded MontaVista Software. At the time, skeptics said Linux would never work for embedded development, it lacked key features required for embedded systems, and the performance wasn't comparable to existing real time operating systems (RTOS).

Well, ten years later Linux has not only proven itself up to the task, but an entire industry has been created around embedded Linux. Multiple vendors have entered the commercial Linux business, and the semiconductor vendors have shifted their strategies and become innovators and contributors to the open source Linux community. All of their new products are showcased running reference Linux implementations.

Linux is now the preferred operating system for development of new embedded systems, outpacing all other operating system choices. But the approach to delivering embedded Linux hasn't evolved much since the beginning. Let's take a look at the challenges embedded developers face, and how MontaVista Linux 6 (Figure 1 below ) takes a new approach to embedded Linux development.

Figure 1. MontaVista Linux 6

What's wrong with the old way?
In the early days, commercial Linux vendors simply took the existing RTOS model and applied it to Linux. RTOS vendors generated “board support packages” (BSPs) that adapt a predefined product, with a fixed set of features, as little as possible to execute on new hardware platforms.

This model was sensible in the era of proprietary software platforms because the vendor was the only true innovator in the software supply chain. Most commercial Linux vendors continue with this model today.

They offer one, or a few, binary Linux distributions with a defined set of features that support a range of hardware platforms. They may tailor these distributions to specific market segments but the distribution model doesn't change.

This model creates a set of challenges for the developer. Let's take a look at each of these.

Most developers begin prototyping, or early development, using the reference implementation from the semiconductor vendor. While these reference implementations are typically well integrated with the hardware, and allow the developer to fully exploit the power and functionality of the hardware, they lack many non-hardware specific features. This means the developer is forced to customize the distribution to add required features to deliver a complete commercial product.

Another key differentiator is the difference in quality. The hardware vendors provide Linux for one reason, to rapidly enable development on their hardware. They don't do the testing, bug fixing, or integration required of a commercial product. Nor do they provide technical support for developers who are customizing their Linux distributions.

Commercial Linux distributions provide the desired quality and support. But, since the commercial Linux distribution is generic in nature, containing a predetermined set of features, it's highly unlikely it will exploit the full functionality of the processor or system on a chip (SOC).

This means the developer has to compromise on functionality, or customize the distribution to add the required functionality himself. Customizing commercial Linux distributions is often a difficult task since they are binary distributions, not source driven.

The bottom line: The developer winds up having to compromise, either on functionality or quality. If they do move from the semiconductor Linux distribution to a commercial distribution, often some of the same work is repeated over again.

A new Approach to Embedded Linux Development
With our latest release, MontaVista has taken a new approach to embedded Linux development. Rather than forcing developers to choose, we've worked to align the Linux supply chain.

Developers can begin their design efforts using the reference implementation from the semiconductor vendor, or even go the roll-your-own (RYO) route if they prefer. At the proper time in the development cycle, they can move to MontaVista Linux 6 without sacrificing functionality or quality.

Let's look at how this is accomplished. MontaVista Linux 6 is delivered as Market Specific Distributions (MSD) tailored to the hardware, a Software Development Kit (SDK) to build and customize the MSD, and the MontaVista Zone Content Server which provides access to all the source required to build the MSD and toolchain. Let's look at each of these in more detail.

Market Specific Distributions (MSD). Each Market Specific Distribution (MSD) is a specialized set of Linux technology including a Linux kernel, software libraries, and other applications that are collectively referred to as a “distribution”.

In the enterprise software world Linux distributions are typically intended for general purpose usage. Embedded software developers however, face unique market demands that drive the adoption of specialized hardware platforms. MontaVista Linux 6 MSDs are engineered to be feature compatible with the Linux technology produced by our semiconductor partners.

Developers electing to use MontaVista Linux 6 should be able to easily transition their applications and device drivers after starting development. Each MSD will use the either the same or a newer base kernel version in order to assure feature compatibility.

Modern System-on-chip (SOC) designs often involve a complex software stack that extends far above the Linux kernel. The new MSD approach pioneered by MontaVista ensures that developers have the right software they need to get the most out of the hardware they have selected.

In some cases this may mean testing with proprietary audio/video codecs or delivering unique virtualization technologies that exploit the hardware architecture. MontaVista's MSD design process delivers, or is compatible with, key supporting technologies that are typically excluded from a generic Linux.

Software Development Kit (SDK). The MVL6 Software Development Kit (SDK) brings together all of the essential tools for successful embedded Linux based product design that every engineer needs to work efficiently. These include:

* The new MontaVista Integration Platform (MVIP)

* MontaVista's DevRocket Integrated Development Environment (IDE)

* Cross compilers and debuggers based on the GNU Compiler Collection (gcc) version 4.3.3, GNU binutils 2.19.51, and GNU gdb 6.8.50 targeting the MontaVista Linux runtime environment.

* Cross compilers and debuggers targeted non-Linux runtime environments with selected MSDs.

* On-target MontaVista Linux hosted compilers and debuggers for native compilation and debugging

* On-target key system libraries such as the GNU libc library version 2.8.

The MVL6 SDK ensures that developers have a high quality, pre-integrated set of development tools that can quickly be deployed to engineering workstations and generate repeatable results.

Developers often must plan for a decade or more of engineering and maintenance on a new product release. It is critical that the SDK used in their design have broad host support and have minimal dependencies upon the host that many impair compatibility with future host operating system versions. The MVL6 SDK has been designed so that it depends only upon host operating system components and APIs defined in the Linux Standard Base (LSB) 3.0 specification.

Standards Based and Built on Open Source
The build system is the beating heart of every embedded Linux based development project. Developers rely on this system daily and it is imperative that the build system be reliable and flexible so that it can address unforeseen requirements.

Build systems are also inherently difficult to change once they have been integrated into the developers daily workflow and supporting automation. For such a critical need you should only rely on tools with a publicly proven heritage of flexibly satisfying requirements similar to your own.

Using this criteria, MontaVista selected the open source BitBake utility as the core for the MontaVista Integration Platform. The BitBake utility falls under the umbrella OpenEmbedded (OE) project and has been a key enabling technology of the OE project since 2004.

The MontaVista Integration Platform (MVIP) is the center-piece of MontaVista's SDK that deliver MSDs to our customers and empowers developers to adapt MontaVista Linux to the needs of their design.

The MVIP enables source-driven customization of the entire MontaVista Linux based software stack and performs the following critical functions for developers:

* Automates cross-compilation of the target software stack for their design

* Creates binary packages that can be used for deployed system maintenance and upgrades

* Creates the root file system(s) for the design

* Creates one or more file system images formatted in various disk and flash compatible filesystems

* Manages customizations to the software stack so that the design can be easily reproduced and configuration managed

The BitBake powered MVIP benefits developers by ensuring that they do not have to invest in learning a proprietary, vendor specific technology that may not be flexible enough to accommodate current or future requirements.

Designing Linux based embedded systems could mean that 10+ million lines of source code must be managed. Simply dropping all of this code into CVS, ClearCase, or Subversion isn't going to suffice because all of this code will be updated periodically as the open source community and partners that contribute to your product development evolve.

Intermingling community, semiconductor partner, commercial Linux vendor, and local development team patches into one development stream inhibits progress and can result in confusion when components are upgraded independently.

MontaVista Linux 6 is a source driven product that empowers customers to review and customize all of the source code that contributes to their product design. The MVIP can catalog all of the original source code and patches that contribute to a customer design and prepare them for distribution. This “software bill of materials” can be used to help comply with applicable open source licenses.

The MVIP also uses collections to structure the contributions to your final software stack. MontaVista's own MSDs are fabricated out of one or more collections. Each collection can introduce new software packages, patches, or configuration changes to the software stack build.

Collections are stacked on top of each other and each collection can replace software packages from lower components. Collections ensure that locally generated software contributions are isolated from the evolving base of Linux software which together represents your final product design.

Since it's based on existing open source technology, the MVIP is compatible with the recipe format used by the OpenEmbedded community. Developers often must supplement the software packages available from MontaVista with additional packages from the open source community. The MVIP lets developers select from the 6000+ packages from OpenEmbedded and add them to their MVIP managed projects.

Another key challenge of commercial product development is managing entire product lines with multiple configurations and maintenance levels. Engineers must be able to quickly switch amongst individual offerings of the product line and make changes that are inherited from one offering to its derivatives.

Traditional scripted, configure/make, or IDE based build systems cannot easily manage and produce all of the software components used by an entire product line.

The MVIP's powerful task and collection powered system can use shared collections for common elements while extending or replacing software elements that are unique to one offering in the product line. The shared collections and inherited configuration settings reduce update and maintenance overhead while improving build performance.

Summary
Embedded Linux development has changed. There are now more choices in software, deeper complexity in hardware and device designs, and pressure to deliver products as quickly as possible. MontaVista's new approach is to make commercial embedded Linux an integral part of the overall Linux supply chain and embedded development process. Developers need to be able to leverage all the assets available to them, including commercial Linux and open source, to deliver the best products in the shortest amount of time. MontaVista Linux 6 delivers.

Dean Misenhimer is the Director of Marketing at MontaVista Software .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.