Slashdot Mirror


How to Embed Linux

Doc Ruby writes "LinuxJournal has an intro to uCLinux by David McCullough, one of the project developers. Specific techniques are discussed for Linux programming on this version, that runs on devices without the MMU that the Linux VM usually requires. Developers can make Linux apps run on uCLinux devices, including PDAs like a Palm IIIx, routers, DVD players, and even a FPGA."

25 comments

  1. Comparison? by nova20 · · Score: 1

    Does anyone know of a similar article that pertains to embedding windows (or some other OS)? I'd like to see a comparison.

    -nova20

  2. Embed Linux? It's not an ideal choice. by Anonymous Coward · · Score: 4, Interesting

    Two words: Interrupt latency.

    Linux is a server/desktop OS. It's not a real-time OS. There are very different requirements for that job, and Linux would need a complete redesign to meet them. Read Ed Nisley's column in Dr. Dobb's; he's gone into detail about this stuff.

    If you try to please everybody, you'll please nobody. There is no need to put a server OS in a defibrillator.

    There are many other options far better suited to the problem domain. QNX, for example.

    1. Re:Embed Linux? It's not an ideal choice. by byolinux · · Score: 3, Funny

      Linux is a server/desktop OS. It's not a real-time OS.

      It's a kernel. But yeah, it's not a real time OS. Or a dog. Or a salad.

    2. Re:Embed Linux? It's not an ideal choice. by sk6307 · · Score: 2, Funny

      I think you will find that linux can be real time.

      For that matter, it can also be a dog, or a salad. :)

    3. Re:Embed Linux? It's not an ideal choice. by SmegTheLight · · Score: 3, Insightful

      There are many other options far better suited to the problem domain

      Which problem domain ?

      It seems you are assuming that every possible embedded situation requires real time scheduling from the OS.

      I use the Linux kernel for many embedded devices where I work, but I have not REQUIRED real time scheduling yet for any of them. DVD Player, Parking Machine, Firewall Appliance, Router, etc... None of those need real time scheduling.

      There is no need to put a server OS in a defibrillator

      But I don't make defibrillators.. :)

      --
      Time travel is possible. We are quickly heading for 1984.
    4. Re:Embed Linux? It's not an ideal choice. by Brandybuck · · Score: 1

      Embedded != Realtime

      While most realtime systems are embedded systems, many embedded systems are not realtime systems. Your PDA is an embedded device, but it is not a realtime device.

      --
      Don't blame me, I didn't vote for either of them!
    5. Re:Embed Linux? It's not an ideal choice. by ClosedSource · · Score: 1

      Embedded != portable

      I think what's happening is that the term embedded is being watered down.

      A basic PDA that acts as an electronic address book and has no connectivity would qualify under the traditional definition, while something like a Pocket PC would not. The essential character of a traditional embedded system is that it is a special purpose device, like a washing machine or a basic calculator.

      Under the new definition, a desktop PC could be considered "embedded" just as easily as most PDA's.

    6. Re:Embed Linux? It's not an ideal choice. by nusratt · · Score: 1

      "There are many other options far better suited to the problem domain. QNX, for example."

      Sure. I expect you'll be sending me a check to cover the license cost any day now.

      I'd love to get my hands on QNX, WindRiver, MontaVista, Lineo, LynuxWorks, MetroWerks, etc.
      But get real: for garage hackers like me, what else is there except OSS?

    7. Re:Embed Linux? It's not an ideal choice. by HeyLaughingBoy · · Score: 1
      I think what's happening is that the term embedded is being watered down.

      This bothered me for quite a while, then I realized it doesn't really matter. People with "real embedded" (which in my book means having knowledge of low-level control) experience will know what I mean when I use the term.

      The embedded system I work on in my day job runs on a 1.5GHz Pentium, has over 1MLOC, costs around $800,000, uses close to 2kW of power, and at around 900lbs, is definitely not portable. And I still see posts here from people who think that embedded means the system has to fit in 16k of ROM and sip from batteries!
    8. Re:Embed Linux? It's not an ideal choice. by Garabito · · Score: 1

      A real garage hacker writes his own OS ;)

      Really, except from devices requiring LAN connectivity, I don't see the point of using a whole OS, like Linux. For most simple applications, which embeded systems are targeted at, you just write the application code (in ASM, C or whatever) and that's just what the microcontroller runs. No need for a separate OS. The app becomes its own OS.

    9. Re:Embed Linux? It's not an ideal choice. by Voivod · · Score: 3, Informative

      Two words: Interrupt latency.

      Tried RTLinux? All the fun of Linux, with all the benefits of a hard real-time microkernel. I just finished about 3 weeks of development with it, and it performed as advertised. It was very cool to have a scope hooked up watching interrupt line latency and see no change in ISR performance as I ran a kernel compile and copied huge files around in the background while my hard real-time task continued marching along.
    10. Re:Embed Linux? It's not an ideal choice. by Brandybuck · · Score: 1

      Blame Microsoft. I still haven't figured out what makes Windows XP Embedded and embedded operating system, but that doesn't stop the PHBs at my company from mandating it for our formerly hard realtime embedded devices.

      --
      Don't blame me, I didn't vote for either of them!
    11. Re:Embed Linux? It's not an ideal choice. by ClosedSource · · Score: 1

      I'm not sure who started it, but Sun was talking about embedded Java long before MS was taking about embedded XP.

    12. Re:Embed Linux? It's not an ideal choice. by GlassHeart · · Score: 2
      A DVD player on sufficiently low-powered hardware would need real time scheduling. It has to read the audio and video streams from disc, decode, and playback according to a strict schedule (~30 fps on NTSC, etc).

      Any "need" for real time scheduling can be mitigated by using much faster hardware. However, we should not confuse the analysis of the hard real time requirements with overkill solutions.

      A firewall or router, on the other hand, is generally required to have a certain average performance. That is, even if a particular packet is delayed a little more than usual, nobody is likely to notice and be upset. Therefore, they generally don't have hard real time requirements, and even unmodified Linux boxes do well at these tasks.

  3. The best way (to embed Linux) by SpaceLifeForm · · Score: 4, Funny

    is to cram a distro up the back end of Darl McBride.

    --
    You are being MICROattacked, from various angles, in a SOFT manner.
  4. This may be a dumb question.. by irenetheno · · Score: 2, Interesting
    ..but is "uCLinux" pronounced "micro-C Linux?"

    I haven't seen this answered in any articles or FAQs.

    1. Re:This may be a dumb question.. by maximus21 · · Score: 1, Informative

      http://www.uclinux.org/index.html

      you see linux

    2. Re:This may be a dumb question.. by irenetheno · · Score: 1
      Ah.. The front page. Not the first time I've overlooked obvious sources for information.

      Thanks!

    3. Re:This may be a dumb question.. by lachlan76 · · Score: 1

      It's not really uCLinux, u is like the Greek symbol which means micro now, which /. is kind enough not to let me write, and C stands for computer, making it Micro-Computer Linux.

  5. It has one advantage by nurb432 · · Score: 1

    Its royalty/cost free, which helps if you have small production devices where you cant charge enough to recoup the cost of the OS..

    QNX, VXWorks, which are better technological choices, arent exactally free ....

    --
    ---- Booth was a patriot ----
    1. Re:It has one advantage by Anonymous Coward · · Score: 0

      If your small production devices are more cost sensitive than mass produced devices, I think there's something wrong with your business model. Custom products are almost always more expensive.

  6. So what? by Anonymous Coward · · Score: 0

    While most realtime systems are embedded systems, many embedded systems are not realtime systems.

    You're dodging the issue, of course. The devices you mention are rare, marginal, and technologically uninteresting.

    Netcraft confirms it: Linux is not well-suited to use in embedded systems. Maybe your primitive, crude applications can tolerate a toaster with leisurely 100-msec latencies, but that is not true of a serious cook.

    Please crawl back under the rock you came from, you filthy pederast.

  7. Nobody Cares by Anonymous Coward · · Score: 0

    From the underwhelming number of comments on this topic I conclude that the only thing Slashdoters care less about than embedded Linux is classic video games.

  8. Linux 2.6 by pt99par · · Score: 1

    I thought i read somewhere that 2.6 had a feature that made it run on mmu less cpus. Why not use the 2.6 kernel more then?

  9. uClinux Also on an iPod by BlindSpy · · Score: 2, Interesting

    Its been /.ed about on multiple occations, but the uClinux distro (if you can call it that?) is what we use on the

    We've got really great developers working on the project and even though there is no GUI way of putting linux on your iPod, its in the works. Its still simple to any /.er to do without a GUI and I suggest checking it out.

    We're still working on getting the 2.6 kernel working with the iPod. We've only sucessfully got 2.6 working once (I think) and it sounded great! 2.4 doesnt sound as good but it works flawlessly.

    Check out the forums if you have any questions or want to help out. We're always looking for new developers. We've also got #ipodlinux on irc.freenode.net

    --
    Whoever dies with the most toys wins.