Slashdot Mirror


Which Embedded Linux Distribution?

Abhikhurana writes "I work for a company which designs a variety of video surveillance devices (such as MPEG4 video servers). Traditionally, these products have been based on proprietary OSs such as Nucleus and VxWorks. Now, we are redesigning a few of our products and I am trying to convince my company to go down the Linux route. Understandably, our management is quite skeptical about that and so I was asked by our CTO to recommend a few RTOSs which have mature networking stacks and which work well on ARM platform. I know that there are many embedded Linux based distributions out there. There are commercial ones such as Montavista, LynuxWorks, free ones such as uclinux, muLinux and some Linux like distros such as Ecos. What is the most stable and best community supported embedded Linux distribution out there?"

21 of 62 comments (clear)

  1. Coming Soon: Ubuntu by div_2n · · Score: 2, Insightful

    If their employment page is any indication, I'd say Ubuntu will be very soon.

    1. Re:Coming Soon: Ubuntu by dgatwood · · Score: 2, Informative

      Eh. Practically any Linux distro could do what this person is asking for without blinking at this point, assuming the CPU is fast enough to keep up. Video isn't really a hard-real-time environment. Where the embedded vendors shine is in supporting custom hardware, which I assume this company is using. That doesn't sound like it's up Ubuntu's alley. Mobile and embedded are not the same thing, though they do overlap.

      My advice: talk to several vendors, tell them what you're trying to do, and let them give you and your management a presentation about what they can offer. While my stock (not yet public) would love it if you pick MontaVista (and I can honestly say that IMHO, they do excellent work, BTW), what's most important is that you pick a company that you feel comfortable working with, and if that's the MV folks, great, but if it's somebody else, that's okay, too. I suspect that they'll tell you much the same thing.

      Tell 'em David sent ya.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  2. Openembedded by bug1 · · Score: 4, Informative

    It seems openembedded.org isnt as well known as it deserves.

    Openembedded has;
      - Been around for a number of years
      - Has a strong developer community
      - Is used be a few commercial projects, notably openmoko.
      - Can builds its own cross compiler

    It allows you to pretty easily define your own distro and build an image for it.

  3. Dont forget about the GPL by Constantine+XVI · · Score: 3, Informative

    Just a friendly reminder, but don't forget to tell your higher-ups that using a *modified* Linux in their product means they have to release the source. Don't forget that, or you may be in for a nasty suprise. I don't know how much of an embedded system NetBSD is, but if putting out the source is going too far for them, that could be an option. If they don't mind that, then by all means go ahead.

    (karma shields to 120%)

    --
    "I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
  4. Realtime Control with Linux Considered Harmful by TerranFury · · Score: 5, Interesting

    Whether Linux is appropriate depends largely on the type of project you're doing. You're probably aware that tons of routers and assorted network gear runs Linux. It might be the best choice if that's what you're doing. But if you're trying to do hard realtime control with Linux... well, if your experience is anything like mine was, it'll be painful.

    I did a project with a 266 MHz PII single-board computer once. I chose it because it had tons of on-board A/D and D/A, and when I ordered it I asked the company for their Linux drivers, etc, as well (which they advertised). They sent me a customized version of Redhat to be installed on the development machine, and a bunch of tools to set up a stripped down distro on the target as well, using the same libc libraries, etc.

    There were numerous errors in what they sent me, including stupid things like configuration files having DOS instead of UNIX line endings. How this got out the door I do not know. But, I could fix all those dumb oversights, so that wasn't the problem.

    The issue was that the distro they sent did not include any realtime extensions (a must for my application), so I endeavored to install RTAI on it. This was where I began to have real problems.

    The kernel they were using was old -- 2.2.some-low-number. Assuming this is what their drivers would work with, I found the vanilla source from kernel.org for a nearby 2.2 version, slightly higher, compiled it, no problems. I then tried it with their extra A/D and D/A drivers compiled in: no problems. Then, I tried it with the RTAI extensions (without their extra drivers: Test one thing at a time!) It compiled, but when I tried to run RTAI diagnostic programs the machine would unceremoniously reboot. No good.

    "Ok," I thought, "this is a pretty old version of RTAI. Let's try a newer version; maybe that's a little more mature." In order to do that, I needed to use either a 2.4 or a 2.6 kernel. So, I started by trying to build a 2.4 or a 2.6 kernel, again from kernel.org, first, without either RTAI or the extra drivers. First problem: gcc too old. Solution: Compiled on another machine (really, coLinux on my laptop, running Debian Sarge). But after putting the kernel images in the correct locations and reinstalling the boatloader with lilo as you'd expect, the machine would just reboot every time it'd start to execute the kernel. This happened for more permutations than I can remember of 2.4 and 2.6 kernel versions, and configuration options.

    Unable to get RTAI working on an old kernel, and unable to get a new kernel to run, (and desperately needing realtime), I ended up putting DOS on the thing and writing code in 16-bit real mode. This gave me essentially unfettered access to the hardware, with fast interrupts, so that, even though people tend not to consider DOS an 'RTOS' per-se, it stayed out of my way enough that I was able to access the hardware directly and run with guaranteeable latencies.

    DOS made lots of things harder -- networking and accessing extended memory in particular -- but solving each of those problems proved possible, since I was working with small enough atomic "pieces of the system" that they could be debugged. When I'd been trying to put together linux with RTAI with the given drivers, I was working with a big-monolithic-kernel... running-in-another-mini-kernel, and I could do little more than follow instructions, compile, and pray. If it'd worked, it'd've made my life much easier, but, when it didn't work, I was pretty much at a loss.

    If you're on a tight time budget and you've never used embedded Linux before, as much as I love Linux, I've got to say: If you're doing a realtime project, just pay the money for a "real" RTOS.

    ** If anyone else has had different experiences, I'd be curious to hear them. Though it's too late now, I'd also be curious if anyone has some after-the-fact ideas about why the 2.4 and 2.6 kernels wouldn't execute.

    1. Re:Realtime Control with Linux Considered Harmful by dugenou · · Score: 5, Informative
      Hard realtime works great on Linux, but choose your manufacturer carefully. All the following are free and open source.

      When it comes to hard RT extension (even in userland), I tend to prefer Xenomai over RTAI. Xenomai has better non-x86 support (ARM is there), nifty so-called skin support for legacy API's (VxWorks, uITRON, ..), and very good community.

      Talking about distro, ELDK is best what comes to mind. This is industrial grade software, free as in beer and speech, but with commercial support if needed. The toolchain is excellent. What goes into the flash image must be hand-picked because only you know the necessary stuff.

      If you are in D/A A/D business, then have a look at Comedi, it is also RT enabled by the comedi-rtdm project.

      All these tools/projects are used and backed by industry. I'm a simple user of these tools, and they make my day life happy.

      --
      Love salty crackers? catchy electronica? Try !
  5. GPL is not a problem ... by twitter · · Score: 2, Insightful

    ... except with people saying things like this:

    Just a friendly reminder, but don't forget to tell your higher-ups that using a *modified* Linux in their product means they have to release the source. Don't forget that, or you may be in for a nasty suprise.

    How friendly/nasty of you. First, you assume the company is anal about the working of their systems or sharing kernel fixes and drivers. Second, it does not matter anyway. They can put all of the stuff they can't or don't want to share into code they don't share. The GPL does not force you to break MPEG4 NDAs, it won't publicize code you don't mix in, or steal your wife. All it does is make sure you pass on the same rights for code that's not yours that others passed onto you. The GPL encourages people to share but it never forces an issue. To draw GPL ire, you have to close off someone else's code.

    --

    Friends don't help friends install M$ junk.

    1. Re:GPL is not a problem ... by Constantine+XVI · · Score: 3, Informative

      It is quite possible that this company doesn't want anyone to know about what they've done to the kernel to work better on their hardware or for their purpose. If I start modifying the kernel to be more efficient in handling a widget-smashing box, then put it into my super-fancy widget-smashing box without disclosing the fact or releasing the code, I am in a lot of legal trouble, because the GPL says that I have to release the modified versions of any GPL code I've used. I can still write the widget-smashing code and make it 100% closed, it's just the kernel I have to be careful about. It's not that I'm trying to steer them away from using Linux in their product, I'm just making sure they know what they're doing. Once again, I have no idea how anal these people might be, but if they are, this is stuff they should be aware of.

      --
      "I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
    2. Re:GPL is not a problem ... by Grishnakh · · Score: 2, Interesting

      Although I think the GPL3 will pretty much kill that (I think?).

      Huh? No, GPLv3 has the same terms for distribution as GPLv2. Its main change is the patent provision, which (I believe) requires you to unconditionally license your patents, which apply to GPL code that you distribute, to the people you distribute it to. So if MS adopted some GPL program, added some great feature which they had a patent on, and then distributed this new version, the GPLv3 would require that anyone they distribute this code to also have a free patent license, so that MS can't turn around and sue them for patent infringement on software they gave to them.

    3. Re:GPL is not a problem ... by codemachine · · Score: 3, Informative

      If I recall, there were 3 things that GPLv3 was originially going to accomplish, all of which had to do with ways people were perceived to be abusing GPLv2:

      - address patents and how they may affect distribution of code
      - close the TiVo problem of tying hardware to a software revision (where people can't truly modify their own GPL code on their own device)
      - close the ISP loophole where you aren't really "distributing" your code, so you don't have to share it

      We mostly hear about patents, and we heard a bit about the hardware issue when Linux objected to a GPLv3 revision. Not so much makes the news about the ISP loophole. I am not sure what the latest draft of the license does in this regard.

  6. Speaking of VxWorks by Anonymous Coward · · Score: 2, Informative

    If your company if comfortable with VxWorks, how about Wind River's offering...

    http://www.windriver.com/announces/rtlinux/

  7. Re:Don't forget... by bradkittenbrink · · Score: 2, Informative

    whatever, just make him a foe so he's automatically modded down for you.

  8. Re:Well by dhasenan · · Score: 2, Insightful

    On an embedded system, you probably don't need anything running but the kernel, udev, and your application. You don't need most of your libraries; it's going to be more efficient to statically link everything. You don't need bash. You don't need Python. You don't need a package manager. For this task (networked cameras), you need ifconfig, a dhcp client, maybe a stripped Apache, and your custom application. And you can probably incorporate ifconfig / dhcp functionality into a library (take them from BSD or something licensed under LGPL) and put them in your application, which could also handle init if space is tight. (Though you probably don't want this, in case your appliance has to be reset.)

    In short, while you can use Gentoo to build your target system, it won't effectively be Gentoo by the time you're finished. And it doesn't matter which distribution you choose at that point.

  9. Some ponderings to think about by wellingj · · Score: 2

    You might want to check out BuildRoot. It's what Gumstix uses for their distributions and it works pretty well.
    They have even has the rt patch from Ingo Molnar merged into their standard distribution. Sounds like a Gumstix might
    not be a bad way to go now that I think about it. And then you would have some pretty good community support. My $.02 ...

  10. NetBSD by allenw · · Score: 3, Interesting

    While I realize you specifically asked about Linux, it is probably worth pointing out that NetBSD has been used as an embedded OS on ARM for quite a while. See NetBSD's embedded page for more information.

  11. RTEMS rather than LINUX by Anonymous Coward · · Score: 2, Informative
    Linux is not the only open source solution for embedded devices: Other include RTEMS in particular is much closer in functionality to VxWorks so it is likely porting to it would not be a huge job. It is well supported, extremely stable and free from GLP licensing issues.
  12. Re:Well by Dahamma · · Score: 2, Interesting

    On an embedded system, you probably don't need anything running but the kernel, udev, and your application. You don't need most of your libraries; it's going to be more efficient to statically link everything. You don't need bash. You don't need Python. You don't need a package manager.

    You don't *technically* need anything else, but for development it can be IMMENSELY useful to have a shell and a base set of utils. Busybox will get you everything you need in a multicall binary under 1MB (dynamically linked to glibc).

    Things can be even smaller using uclibc instead of glibc, but unless you are building an EXTREMELY low end embedded device and can't spare an extra 1-2MB or so (or 1/2 that with a compressed filesystem like cramfs) it may not be worth the extra hassle trying to build a uclibc toolchain (and potentially deal with uclibc issues with other utils/libs you may use).

    Anyway, the nice thing about Busybox is that you port a single package and get huge range of utils. Overall I agree 100% with a previous poster who said the key to rolling your own OS is getting the toolchain working - once you have that, porting is relatively easy (I'm assuming we're talking about non-x86 embedded systems here... with x86 it becomes easier still, as the vast majority of open source development is done on that architecture).

  13. Roll your own by bensch128 · · Score: 3, Interesting

    Thats what we did:
    1) build a tool chain using http://kegel.com/crosstool/. Note: this uses glibc instead of newlib/uClibc but there are patches to make it work.
    2) Download and build the mainline kernel with needed modules compiled in
    3) Place onto device.
    4) Develop application
    5) ???
    6) Profit!

  14. The one you build... by wolf31o2 · · Score: 2, Insightful

    As I am sure you can guess, I'll answer with a simple answer, which likely means the most up front work but also the best capabilities. You'll want to build one yourself. This doesn't mean that you have to do all the work. As an example, I'll (obviously) use Gentoo. You install Gentoo and build your Gentoo-based distribution with exactly what you want in it. Since Gentoo is source-based to begin with, it should be easy to transition to your actual platform. Of course you won't want a C compiler and such on your actual platform, you do that on your development systems. This is really how most embedded Linux is done, with a development machine building the customized distribution for the actual release platform. I'll be honest and say that my experience with other embedded Linux is pretty much nil, but Gentoo will do what you want, and we have great community support. The nice thing about using Gentoo is it is basically the same thing as the normal distribution, and we support the platforms used for most embedded devices. Of course, you'll want to use what suits your needs best.

  15. Re:TiVO doesn't distribute source code by eldepeche · · Score: 5, Informative

    TiVo distributes Linux every time they sell a device, and they distribute source code. The TiVo hardware has some kind of device that checks for the original unmodified TiVo software, so that their Linux device cannot accept user-made changes. This does not violate GPL v2.

  16. Mod Parent Up by quo_vadis · · Score: 2, Informative

    I just spent last semester dealing with openembedded and a pxa270 based dev board. The documentation is not the greatest, but once you have everything figured out and working, OE's power and flexibility really shine through.

    --
    Legally obligatory sig : My opinions are my own... etc etc