As we discovered last week, Linux pros don’t think Android is the new embedded Linux. Android does, however, have a lot of great uses in embedded projects and many features that even hard core embedded Linux developers can envy.
To dig a little deeper into some of the similarities and differences between Android and embedded Linux, we talked with John Cherry, Senior Engineering Manager of Linux Runtime Services at Mentor Graphics. While you might not need Android in a fixed function device such as your toaster (or maybe you do?), he said via email, “Android is no longer just a mobile communication and tablet operating system.”
Here he discusses the definition of embedded Linux in contrast with Android; the relative benefits of each; what each OS can learn from the other; and the possibility of using both OS flavors in the same project.
How do you define embedded Linux?
John Cherry: Traditionally, embedded Linux is defined as the software you would run on a fixed or limited function device to allow the device to take full advantage of the processing power and peripherals for the device. In a fixed function device, the embedded Linux focus is on efficiency in terms of memory footprint, power/performance, and ease in using the device for its intended purpose. Mentor Graphics is involved with the Linux Foundation Yocto Project as this characterizes a consistent way to build and optimize images for fixed or limited function devices.
If you look at the sheer volume of devices out there running Linux, the massive number of smart phones and tablets are going to skew the traditional definition of embedded Linux. Android, for instance, is a desktop-like mobile Linux operating system and platform which allows users to define their own usage patterns and allows vendors to dynamically update and upgrade the platform.
Some folks categorize Android phones and similar devices into consumer “portal” devices, which are primarily designed to provide a view of data stored elsewhere. As the capabilities of the hardware changes, the definition of embedded Linux is bound to change as well, but to create a pure definition of embedded Linux would be going down an unproductive rathole.
As an example of blurred definitions, a TV used to be a good, traditional, fixed function embedded Linux device. Now, a TV can be as dynamic, as user defined, and as upgradable as a computer desktop environment.
What is Android in contrast to embedded Linux?
John Cherry: Contrary to what many people think, Android runs the same kind of Linux kernel that embedded Linux runs. The focus of Android lies in the vertical integration of the Linux kernel and the Android user space components. In many ways, Android is just one flavor of embedded Linux. Every embedded Linux deployment is different and is tailored to the CPU architecture, SOC support, peripherals, and purpose of the device.
Android is attractive to many vendors in embedded Linux space because while each deployment is different, there are common components and standardized APIs all the way up the stack. Essentially, this comes down to a more consistent application development environment. The downside of this consistency/standardization is that the Android core images have very large footprints and large vulnerability profiles.
Does Mentor use Android and embedded Linux? Ever use them both in the same project?
John Cherry: Android is no longer just a mobile communication and tablet operating system. At Mentor Graphics, we have used Android in many stand-alone environments to provide a consistent user interface and application development environment for things like media servers, medical devices, and infotainment systems. And yes, we have one project that has used Android running in a GENIVI compliant embedded Linux container, so users can exploit the advantages of Android along with the traditional use of embedded Linux.
Is Android the new embedded Linux? ie are you using Android as an OS more in “traditional” embedded Linux applications?
John Cherry: Android is NOT the new embedded Linux, but they are becoming more difficult to distinguish. Most fixed function devices still need the ability to be customized and optimized in ways that Android cannot be customized and optimized.
However, we have seen increasing requests for Android to be used in fixed function devices, and our response is usually, “Really? You need Android for your toaster?” Whether it is a perceived value or not, customers like to know they are developing applications in a consistent environment, and they would really like to have the option, somewhere down the road, to take advantage of the Android application ecosystem.
What does Android have that embedded Linux doesn’t and vice versa?
John Cherry: Android provides a large amount of functionality quickly and has fewer issues with licenses than embedded Linux. Android has a consistent development environment (until you start linking to native code). Android gives customers the option (or illusion) that they can tap into the Android application ecosystem. Android has visibility to users that embedded Linux does not enjoy. Nobody knows what is running in your toaster. Another late breaking change is that some of the leading edge development to support new SoCs, graphics accelerators, etc. is happening in Android first and then pushed upstream to the Linux kernel and other projects.
Embedded Linux still offers vendors complete freedom in defining the stack that they can tailor to a device. If the vendor needs to make changes to a package, they only have to deal with one upstream entity, whereas it may be difficult to make changes that will be accepted into an Android stack. With Embedded Linux, you aren’t tied to any Google Android release roadmap and you don’t have the worries about being one of Google’s preferred vendors (or not). This flexibility and freedom allows developers to customize greatly and to meet the needs of many manufacturers more closely. Embedded Linux deployments can have a much smaller footprint than Android and native applications always run faster than interpreted or JIT-compiled Java code.
What can embedded Linux learn from Android as an embedded system?
John Cherry: Embedded Linux needs to learn the right things from Android. Embedded Linux doesn’t need to learn about bloated stacks, large footprints, poorly performing application runtime environments, and complicated stacks. Embedded Linux needs to learn the value of the application ecosystem. Embedded Linux could use consistent UIs, consistent logging, and obviously a consistent application development environment. Even toasters may start to run visible applications and users will interact with them.
Android provides a much more solid platform base for developers to start with, even if it is less flexible. By extension, embedded Linux would benefit from more solidity “out of the box”. This is one of the reasons that the Yocto Project and the LTSI kernel initiatives are so important. They help the embedded Linux developers to define a way to provide more robust starting points that allow companies to focus on innovating in their product development.
- Dent Introduces Industry’s First End-to-End Networking Stack Designed for the Modern Distributed Enterprise Edge and Powered by Linux - 12月 17, 2020
- Open Mainframe Project Welcomes New Project Tessia, HCL Technologies and Red Hat to its Ecosystem - 12月 17, 2020
- New Open Source Contributor Report from Linux Foundation and Harvard Identifies Motivations and Opportunities for Improving Software Security - 12月 8, 2020