The Linux Foundation sponsored this post.
Linux is a widely used operating system in embedded systems. It’s used in cellphones, TVs, set-top boxes, car consoles, smart home devices, and more. Just because it’s used a lot though, doesn’t mean it’s necessarily right for you. So in this first article in a series, I’ll outline when and why to use Linux as the right operating system for your embedded system.
1. Linux Is Royalty-Free
Linux appeals to a lot of people because it’s royalty-free. To be clear, there are other costs associated with using it. It’s not a drop-in, hands-off, operating system; it requires attention. Other proprietary operating systems are the same way, but the difference is that with those you pay the vendor to give it that attention.
This is like the ‘True Cost of Ownership’ for a car. Some folks look at the sticker price and think that’s the cost of the car. But the true cost includes gas, insurance, maintenance, and repairs. For an OS, the costs include the license fees per seat, cost to have drivers created, cost to have bugs fixed, and cost to have developers create your device-specific applications. Using a vendor will likely incur all those costs. Linux has all of these, except the license fees — which can save quite a bit of money.
2. Linux Is Open Source
Linux, by being open source, gives you control over your destiny with your product development. With proprietary operating systems, if there are important bugs that need to be fixed, you work with the vendor to fix them. However, the vendor’s priorities are often not completely aligned with your priorities. Your approaching deadline is likely not as important to the vendor and you have little control over when they fix your issues. On the other hand, with Linux, all that’s needed is to hire some kernel developers to fix the problem with the sense of urgency that is due.
In addition to having much more control over your own schedule, Linux — being open source — allows you to make use of other people’s work. A number of years ago, I worked for a company that created NAS devices. We had about fifteen developers, and our team produced a pretty impressive operating system with lots of great features. Yet over time, Linux caught up with us in certain features and then surpassed us in some areas. Our team, even just focused only on the features the company cared about, couldn’t keep up with the development by thousands of people in the open source community.
Joining the Linux open source community and utilizing what that community can create is a great benefit.
3. Linux Has It
Linux has support for all the programming languages, libraries, services and tools that pretty much anyone would want — even for embedded systems. If you want to use Python, php, C, C++, .Net, Ada, Perl, Go, or Java, Linux has it. If you need a web server, Linux has it. If you need to communicate to devices over USB or create a USB device, Linux has it. If you need a graphical toolkit, Linux has it.
With Linux, you are not limited to a certain set of tools and services. If it’s been thought of, it probably has support in Linux and you can use it.
4. Linux Supports Hardware
Chances are high that Linux already supports your hardware platform. If you’re developing for an SoC, SoM, or another common embedded platform, Linux has a very high likelihood of supporting it. Linux supports ARM, PowerPC, MIPS, of course, X86, and a lot more.
If you have custom hardware, of course, Linux won’t already support that; but you are free to develop Linux drivers that will support that hardware, and you’ll likely be able to create the drivers much more quickly than through an OS vendor.
5. Developers Know It
Since Linux has been available for many years now, a lot of developers are already familiar with it. If you use Linux for your embedded system, it will be easy to hire or contract developers that are already familiar with it. You won’t need to take the time needed for developers to work through a learning curve to get familiar with the system.
These developers will likely also have experience solving similar problems on their past projects. They’ll say things like, “Oh, when I worked for such and such company, we solved that problem this way.”
6. Linux Has Eyeballs
Linux is used by lots and lots of people, and the source code is looked at by lots of developers. A lot of the bugs have already been worked out. And when bugs are found, they tend to get fixed quickly, as in just a few days. This is especially true if you use more popular hardware platforms, where a lot more people are looking at and working in that codebase.
7. Linux Uses Standards
Linux conforms to many of the standards out there — POSIX, BSD, SVr4, FHS, and more. This means that you are not locked into Linux. If for some reason you feel another choice would serve you better, it will be a lot easier to migrate your applications since they will use standard interfaces.
Linux is useful for many embedded systems. However, Linux isn’t always the best choice for embedded systems that have really low-end hardware. A hardware platform that is underpowered to run multiple tasks with a scheduler efficiently probably won’t run Linux very well.
In conclusion, while Linux is not perfect for every embedded platform, it is a great choice for a variety of embedded systems — and is indeed already used in many embedded platforms.
In future articles, I will dig into the various components of a Linux system and highlight some of the choices that can be made with each of these components.
Feature image via Pixabay.