What Are the Problems with Embedded Linux?

What Are the Problems with Embedded Linux?

What Are the Problems with Embedded Linux? Every Operating System Has Benefits and Drawbacks Linux is ubiquitous. It runs most internet servers, is inside Android* smartphones, and is used on millions of embedded systems that, in the past, ran Real-Time Operating Systems (RTOSes). Linux can (and should) be used were possible for embedded projects, but while it gives you extreme choice, it also presents the risk of extreme complexity. What, then, are the trade-offs between embedded Linux and an RTOS? In this article, we cover some key considerations when evaluating Linux for a new development: ■ Design your system architecture first ■ What is Linux? ■ Linux vs. RTOSes ■ Free software is about liberty—not price ■ How much does Embedded Linux cost? ■ Why pay for Embedded Linux? ■ Should you buy Embedded Linux or roll-your-own (RYO)? ■ To fork or not to fork? ■ Software patching ■ Open source licensing ■ Making an informed decision The important thing is not whether Linux or an RTOS is “the best,” but whether either operating system—or both together—makes the most technical and financial sense for your project. We hope this article helps you make an informed decision. Design Your System Architecture First It is important to design your system architecture first—before choosing either Linux or an RTOS—because both choices can limit architectural freedom. You may discover that aspects of your design require neither Linux nor an RTOS, making your design a strong candidate for a heterogeneous approach that includes one or more bare-metal environments (with possibly a Linux and/or RTOS environment as well). You can learn more about heterogeneous design options and how to choose an RTOS by visiting our Learning Center. Questions to Ask When considering the software architecture for a new project, system architects need to ask themselves: ■ Am I willing to bring in resources to support the operating system layer of the software stack? ■ Are my areas of competitive differentiation, value add and core competency outside the operating sys- tem layer? ■ Are there open source applications available that can help accelerate my time to market? ■ Is it important to future proof this system (upgrade fielded systems)? ■ Do I have to pick Linux or an RTOS? Is the right path to use both? * Android is based on the Linux kernel, but does not use GNU components www.lynx.com | What Are the Problems with Embedded Linux? These questions are important when considering the total cost of ownership (TCO) of a Linux-based project vs. an RTOS-based one. There is no right choice based on the technology, only an optimal TCO choice given the required functionality and your team’s engineering expertise. If you answered yes to one or more of the questions above, then Linux could well be a great choice for you. This article discusses some of the key con- siderations to help you verify that path. Lynx Knows Linux Lynx Software Technologies loves Linux, as do many of our customers. In 2000, we created our own com- mercial embedded Linux distribution—BlueCat Linux—and at one point renamed ourselves LynuxWorks. Today, both Buildroot Linux and our RTOS—LynxOS-178®—are part of LYNX MOSA.ic™, our flagship product. LYNX MOSA.ic™ lets you build embedded systems by mixing embedded Linux, bare-metal, and real-time operating system (RTOS) environments (including competitive RTOSes) in order to balance open source software (OSS) functionality with real-time determinism. Lynx’s decades of experience building embedded Linux and our RTOS puts us in a great position to offer impartial advice about both. What is Linux? The Linux kernel is the largest open source software project in the history of computing, is immensely versa- tile and scalable, and has support for practically every device driver and protocol you can imagine. The term Linux is widely used incorrectly to mean a complete operating system, which should more correctly be called GNU/Linux. Linux is just the operating system kernel. While the kernel is an important component, it is only one component of hundreds needed to build a functional computer system—called a Linux distribu- tion. GNU stands for “GNU’s Not UNIX” and is a separate project started in 1985 by Richard Stallman under the Free Software Foundation with the aim of restoring the co-operative spirit that prevailed in the early days (1970s) of computing. GNU set out to build a complete UNIX-like operating system unencumbered by the restrictive licensing terms wrapped around most software of the day. By 1991, GNU had completed every component except their kernel, the year that, fortuitously Linus Torvalds publicly released his Linux kernel. Embedded Linux vs. Real-Time Operating Systems Linux and RTOSes are, in many senses, polar opposites. Comparisons can be divisive, focusing on technical or philosophical differences that “prove” one is better than the other. That is not our aim here. While there are big technical differences, Linux’s complexity, philosophy, and licensing properties are often overlooked and will have a profound impact on your embedded project, engineers and company. Planning and forethought are nec- essary to optimize your embedded project to utilize the strengths of both Linux and RTOSes and avoid nasty surprises. Generalizations About RTOSes Many RTOS vendors will discuss the size benefits of RTOSes compared with Linux, but while size is one consider- ation, smaller is not necessarily better. Every operating system is built to be as small as possible with the features necessary to satisfy its purpose. Instead of focusing on size, you should compare how much of your system’s complete functionality your RTOS or Linux can provide. While there will always be exceptions, in general, an RTOS will have: ■ A tiny memory footprint, down to 200 KB ■ Fast boot time, as fast as 100ms ■ Deterministic behavior (predictability you can bet your life on) ■ Modest range of middleware (about 50 items; USB, FS, SSL, SSH, IPv4, IPv6, SNMP, WiFi, web server, fire- wall, sound, graphics, CAN, etc). www.lynx.com | What Are the Problems with Embedded Linux? The crucial point is that your RTOS vendor coded the RTOS themselves, usually via their in-house engineer- ing department. This work may have been done over many years (probably decades ago), but the price pays for engineers coding the RTOS. This includes adding features, fixing bugs, and supporting new hardware. This is a coding paradigm; if you need to extend the RTOS, plan on writing code. Generalizations About Embedded Linux Dozens of embedded Linux distributions are available; semiconductor vendors routinely bundle Linux with their reference design boards, and commercial embedded Linux is available from Wind River, Montavista, Mentor, and others. Distribution builder tools are also available to help you build and customize your own embedded Linux distribution, with Buildroot and Yocto being the most popular. In general, embedded Linux will: ■ Have a modest memory footprint (down to 5MB) ■ Have a modest boot time (down to 2s) ■ Not be deterministic (responsive enough for music and voice, but not safety critical applications) ■ Include a generous range of middleware, 400-odd items The key point is that embedded Linux is assembled, not coded. Your distribution is built by integrating a few hundred community projects from a selection of 430,000†. This can be done “by hand” to create an RYO Linux distribution, by a commercial embedded Linux vendor, or by an open source framework like Buildroot or Yocto. When purchasing a commercial embedded Linux, the price pays to assemble, integrate, test, and maintain it. If you need to extend it, you will likely be integrating components rather than coding them. “Free” Software is About Liberty—Not Price Linux is freely available to download, but this is not why it is called “free”. The term free software is carefully and deliberately defined by the Free Software Foundation to mean software that respects user and com- munity rights. It means that the users have the freedom to run, copy, distribute, study, change and improve the software. You should think of “free” as in “free speech,” not as in “free beer”. The Four Essential Freedoms “A program is free software if the program’s users have the four essential freedoms: ■ The freedom to run the program as you wish, for any purpose (freedom 0). ■ The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this. ■ The freedom to redistribute copies so you can help others (freedom 2). ■ The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.” How Much Does Embedded Linux Cost? Both Linux and a handful of RTOSes are available at no cost, but that’s where the similarity ends. RTOSes have a reputation for being expensive—let’s say $100,000 per project—a cost that is well bounded and clear up front. Cost-wise, Linux can be deceptive. An embedded Linux system is more complex, more feature rich, and has more source lines of code (SLOC) than an RTOS-based system. Linux also has a vast community of projects of (generally but not always) high quality. Linux’s large codebase (both within your system, and available from the community) means that Linux’s complexity is almost unbounded. www.lynx.com | What Are the Problems with Embedded Linux? Without careful management, a Linux project can get out of control, for example hitting an unexpected problem that takes 6 months engineering time to resolve.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us