Is (Embedded) Linux Worth The Effort? 35
Embedded Geek writes "Embedded Systems magazine is running an interesting story about building an embedded system (specifically, a diagnostic tool for auto mechanics) using Linux. Despite the foreboding title and tagline ('If your embedded system doesn't need networking and storage, porting Linux to your hardware may not be worth the effort'), it offers a balanced look at how the engineer implemented his solution and observations on each step. Interestingly, his discussion is as much about embedded design philosophy versus Linux's philosophy, pointing out where each meets or diverges. A nice read."
Wrong Question (Score:5, Insightful)
But you don't need Linux just because you need TCP/IP networking. RTEMS has that, and so does eCos. Likewise, file systems. So, the real question is whether you want to run off-the-shelf programs that expect a full Posix environment. Furthermore, even if you do need a Unixy environment, NetBSD may be an equally good choice, or even a better one. (E.g. NetBSD works on lots of chips that have no mature Linux port.)
Asking the right questions is the only way to end up with the right answers.
Nope, right question..... (Score:4, Interesting)
Re:Nope, right question..... (Score:1)
Plus of course you don't actually need a lot of the functionality that is provided by Linux.
If your Kernel requirements specify a 200ms start-up time, 32k code space and 8k RAM your choices are rather limited.
You could add loads of external memory, but that pushes up the unit cost, increases EMC and means you can't use the bus for I/O.
Licensing costs and Support risks, per unit (Score:5, Informative)
Although not mentioned in the article, licensing costs per unit do play an important role in many companies' decision. I know of two companies here in NZ who were offered substantial discounts on the OEM licensing of WINCE on their devices only after considering Linux (for access to its TCP/IP stack, and other comms facilities). If you're planning on selling like 100 thousand to a million units, the difference between 10 bucks NZ per unit licensing fee and 3 bucks NZ per licensing fee makes a huge difference.
Of course, zero dollars per unit is even better, and access to RTOS source for zero dollars is even better, but it turns out that it's perceived by companies making these devices (who typically often have more EE's who happen to know how to program, than, say, linux kernel and device driver experts, or experts in some other RTOS) that it's better to take a small hit (3 bucks NZ per unit) on the proprietary embedded OS per unit than to have to develop the expertise in-house that they would need to in order to really take best advantage of an open source RTOS. It's when they're looking at having to take the big hit (10-15 bucks NZ per unit) that Open Source becomes more attractive, but that's precisely the point at which M$ is willing to lower their price per unit on WINCE.
Were that it weren't the case. What we really need is a big player who is willing to actively offer to these companies licenced support on an embedded linux at a lower cost than what M$ can do. By "actively" I mean having people on staff who will phone up the engineering managers of these companies and make a deal with them to supply kernel and device driver support, and to train their staff at a lower cost per unit than M$ will charge for WINCE. Then we'll start to see greater growth in the embedded linux market.
It's the steep learning curve for Open Source RTOS and the perception of lack of ongoing support that makes these companies willing to pay for proprietary embedded OS's, unfortunately.
Little complaint with article... (Score:5, Informative)
He seems to have forgotten block devices. Block devices can be mmap'd and manipulated as he would want (the device driver writer would have to permit such access). Also, chara devices can do very well for A/D if you use realtime signal delivery.
(RT)Linux, NetBSD, QNX: they all do this.
Modern unix-likes are more flexible than one might believe.
Re:Little complaint with article... (Score:3, Informative)
Re:Little complaint with article... (Score:1)
Sheesh. They do it all the time.
Linux is more than just networking (Score:4, Interesting)
In fact while compiling the kernel you can remove all networks support and just use the memory manager, filesystems, security and the binaries like perl and bash.
Most embedded items DO require networking though. Linux is also a very well-known development platform now. You can whip up a new microcontroller with new USB/PCMCIA/bluetooth etc chips and make it boot linux off flash. Most of the development can be handled by anyone who has done system development on Linux which could have been on a PDA/Game console/router/PC/midrange. You no longer need someone specializing in Arm7 with detailed experience in the 8139 realtek chip and intel 802.11 chips, just someone who can make drivers for the linux kernel.
Linux has been widely ported around the town and finding a lowcost CPU that can run Linux (and includes an MMU) is easy.. so theres less need for the ucLinux or other exotic forks. Plain Linux will work well and you in one swoop have drivers for almost any networking or multimedia chip made.
Re:Linux is more than just networking (Score:5, Insightful)
I truly fear (for the sake of the market, not my life [yet]) the companies that say "well, we'll take this processor, these support chips, then just slap linux on top of it and be done with it. After all, all the components we picked have drivers in the kernel." Without someone who truly understands all the pieces they're pulling together, we have the hardware analoge of much of the open source software built today - a mismash of tools in varying states of quality with some glue and new logic slapped on top. This leads to poor (well, I'll say "incompletely tested" ;-)) software, and would lead to a similar state in hardware.
I'm not at all suggesting that you should develop everything in house so someone understands it all, or that you need someone with a vast amount of knowledge covering all sorts of different chips etc to do embedded linux. But I do think if you're doing hardware integration using linux you should take every driver that touches the hardware you pick as your own. That means analysis, auditing, testing, etc. Many companies don't do this, and its a dangerous practice.
I think that there's truly a need for "trusted" platforms in the embedded market. That is, for a given SBC (single board computer) you can buy a BSP (board support package) that says here is a known tested and working configuration with a linux kernel on it. I think this is where the "exotic kernels" come in. Different projects have different needs, but most of them overlap with somebody else. So it makes sense to have a third party do the integration. This is the way it works with most commercial RTOS - how many companies buy the source to VxWorks, let alone patch and compile it themselves?
The government has finally figured out that (C)OTS (off the shelf) is the way to go, I wonder why so many companies still roll their own?
Re:Linux is more than just networking (Score:5, Insightful)
There are many stand alone devices that run just find on a 8k 8051. Linux is not always the best possible solution for a problem. It is a good solution for many. For really critical things that can kill people. I would want the SMALLEST possible RUNTIME I could get. The fewer "features" and the fewer lines of code the less chance of nasty bugs. I want my ABS to be run by a computer that ONLY does ABS. I do not want it to play MP3s and serve webpages as well
Re:Linux is more than just networking (Score:2)
That post was referring to higher embedded devices where engineers would contemplate Linux vs other 'Operating Systems'. Even for digital cameras, MP3 players and watches, networking can be a useful feature but not a requirement. Companies can use linux without the networking parts in tiny devices like watches and let more rookie
Re:Linux is more than just networking (Score:2)
Even some of the low end sort of 8 bit parts are now getting networking support. Sure you will not want to mount a samba share but you would might be surpised with what they can do. The Rabbit and new Zilog parts are very network friendly. I was thinking of makeing a network loggers with one of them and a small IDE drive. You could just plug in into a network and record the packets to the Hard drive.
who says TCP/IP isn't appropriate? (Score:2)
A network environment where every electrical component's connections are power and ground from wherever convenient and data via internal LAN will be cheaper, less complex, more reliable, and a lot easier for any of us to troubleshoot. Or to make remote troubleshooting via wireless Net connect to the manufacturer possible. Wouldn't you rather find out that your brakes will be failing shortly via e-mail from your car
Blurry lines (Score:2)
Re:Linux is more than just networking (Score:2)
Of course. That way I can plug it into my home LAN to easily transfer music to and from it, play remotely mounted music, and control the playlist and volume.
Ideally it would support wireless as well. I could play music off of someone else's nearby player.
Excuse me. (Score:2)
You've got to be joking. I've never seen a cheap part that has an MMU. Besides that would mean off-chip storage of some type which is not cheap. Real embedded systems use a SoC, this guy is doing something in the WinCE class which automotive guys don't consider cheap by a long shot.
depends... (Score:1, Funny)
Well if you don't need storage or networking.. (Score:4, Insightful)
I've built deployed embedded products from Linux, I've hacked the kernel to do it. It's a fabulous platform for a lot of that stuff. Do you want it in a cell phone? Probably not yet. It probably saved man years of time going with Linux to do the storage and networking rather than implement it outselves on some dime store RTOS and hundreds of thousands of dollars to not buy implementations from other parties. It's a kill embedded platform for the 21st century, "embedded" is changing in a lot of ways.
Re:Well if you don't need storage or networking.. (Score:2)
Sometimes I read stuff I just type and submit and think I'm retarded or blasted on drugs or something. Other times I look back and can't believe the intelligent oratory I supposedly typed up.
How about memory protection? (Score:2)
As for the comments about disadvantages of userland (latency, different interface to h
Available brainpower (Score:3, Insightful)
Great for anything with a port or dongle... (Score:2)
However, back when I was cutting my teeth on HC11 boards I would have killed for nice things like USB and 802.11 wireless. I spent weeks developing serial protocols to get Handyboards to yat with a PC. (Actually is was a Mac, so I also spent a good chuck of time writing a serial driver for TCL so my program COULD talk to the handyboard.)
I predict that with the emergence of Embedded Linux you are going to see
Re:Great for anything with a port or dongle... (Score:2)
And I've programmed it for 12 years. Hell I even managed to get it generate strapinski triangles and mandelbrot sets. (If you have a week or two for the sucker to render, that is.)
A calculator from hp had I before that. Think I cannot about the calculator without Yoda sounding like.
Still cool your little computer is.