Slashdot Mirror


Embedded Gentoo?

An anonymous reader writes "Gentoo Linux may soon begin showing up in consumer gadgets, thanks to a new project creating an embedded version of Gentoo Linux. The year-old project has achieved preliminary releases on x86, MIPS, PPC, and ARM. The releases include native core system binaries, along with toolchains for native or cross-platform compiling. Native compiling, eh... considering it's Gentoo, how long would X take to compile on an iPAQ? :-)"

46 of 197 comments (clear)

  1. This post by Anonymous Coward · · Score: 2, Funny

    Was Compiled

    With Gentoo

    It Took

    A While

    To Write

    1. Re:This post by $n1per · · Score: 2, Informative

      Gentoo is actually fairly fast to install if you don't do the install from stage1(scratch) a stage3 install can be done in 5minutes.

    2. Re:This post by MindStalker · · Score: 2, Insightful

      Many people want Gentoo for the portage system and not nessesarly for the advantages of running the most super optimized kernel possible.

    3. Re:This post by Gherald · · Score: 5, Informative

      > Many people want Gentoo for the portage system and not nessesarly for the
      > advantages of running the most super optimized kernel possible.

      Bleh, for the upteenth time:

      1) Completing stage3 (whether by unpacking a stage3 tarball or bootstraping plus "emerge system" from previous stages) will net you the base system which is, well, basically complete with all the required system packages FOR WHICH THERE IS NOT CHOICE. Gentoo, is all about choice, so there's still a few things you need to add: your choce of a system logger, cron daemon, and your own customized kernel. There is a utility called "genkernel" which will set you up with a generic kernel, but in most cases this is Considered Harmful. So most users who start from stage3 should still end up with a fairly "super optimized kernel"

      and in response to some of the grandparent posters:

      2) Installing from a stage earlier than stage3 is ONLY advisable if:
      a) No reasonably optimized stage3 tarball is available for your particular subarchitecture (unlikely)
      --OR--
      b) The default CFLAGS="-O2" optimization is insufficient for your taste.

      3) Realize that even if the stage3 tarballs aren't exactly what you're looking for, they are most likely still close enough that it makes sense to use them to avoid a lengthy install. Bootstraps can fail pretty easily -- even "emerge system" has it's quirks. And in the long run, once your system is up and running, future "emerge -uD world" updates will gradually replace those horribly unoptimized pre-built stage3 packages you've had to endure... (ha!)

  2. Coral link by Anonymous Coward · · Score: 3, Informative

    Coral link here

  3. Hooray! by Anonymous Coward · · Score: 2, Funny

    Now my toaster can make breakfast quicker, using the -fbrownbread flag!

    That is, once it's done compiling...

    1. Re:Hooray! by grahamsz · · Score: 3, Funny

      Well my laptop emerging kde is a far more effective toaster than the funky chrome one in my kitchen.

  4. So why is Gentoo the right choice for this? by eln · · Score: 2, Interesting

    What makes Gentoo any better than any of the other distros at doing this? What unique advantage does it offer to this application? The one big difference with Gentoo, the whole thing about compiling everything from scratch, seems like it would be a pretty serious liability for this purpose. So, why Gentoo?

    1. Re:So why is Gentoo the right choice for this? by papercrane · · Score: 2, Interesting

      I wouldn't say it's more suited, but people fail to realize that gentoo *can* use precompiled packages as well.

      The reason I use Gentoo is not just because it compiles for my system, but because I like how it lays things out and its ease and flexibility of configuration.

      It should be fairly simple to set up a "host" system with a cross-compiler to make binary packages for the embedded devices to download.

    2. Re:So why is Gentoo the right choice for this? by PeterPumpkin · · Score: 2, Informative

      Perhaps this reasoning doesn't apply to embedded applications, but Gentoo would be a good choice for other architectures in general. How many program projects that you know of offer linux-ppc or linux-mips or linux-arm binaries? Gentoo supports these.

    3. Re:So why is Gentoo the right choice for this? by qshapadooy · · Score: 2, Informative

      Let's see, Debian - Ports

      • i386
      • m68k
      • sparc
      • alpha
      • powerpc
      • arm
      • mips
      • hppa
      • ia64
      • s390

      Yes, I think that will do for now.

    4. Re:So why is Gentoo the right choice for this? by GileadGreene · · Score: 4, Insightful
      How many program projects that you know of offer linux-ppc or linux-mips or linux-arm binaries?

      Well, Debian for one. In fact, Debian supports x86, Motorola 68k, SPARC, Alpha, PowerPC, ARM, MIPS, PA-RISC, IA-64, and S/390 architectures. Porting to the AMD64 and Hitachi SuperH is also underway. Note that the 68k, PowerPC, ARM, and SuperH are all popular for embedded applications.

    5. Re:So why is Gentoo the right choice for this? by wolf31o2 · · Score: 4, Informative

      Why Gentoo?

      Well, that is pretty easy. For one, we're not charging people for it, which puts us ahead of a ton of the competition right out of the gate. The second is that using portage to build your system, you are capable of building in exactly what you want.

      If you're not familiar with the embedded arena, then you should probably know that pretty much every embedded project is done from source. There simply is not enough overlap between individual projects to allow for a "precompiled" solution to really be effective.

      I really am not the best person to comment here, as the guys working on the embedded project are definitely the experts, but these are the few things that I have picked up just from reading around.

    6. Re:So why is Gentoo the right choice for this? by kiatoa · · Score: 3, Interesting

      Well, someone has probably already pointed this out but the openembedded.org build system is kinda similar to gentoo in a way. Personally I'd like to see a rubyx or gentoo marriage with openembedded so that developing for embedded devices (a cheap old ipaq H3650 in my case) and keeping the software up to date is made easier. Note that although it is technically feasible to compile on the ipaq cross compiling is orders of magnetude faster and thus worth the setup pain IMHO.

      Oh, and to qualify my comment: I'm a wannabe developer, I still haven't gotten an oe build for my iPAQ that I'm happy with.

      --
      90% of the wealth is in 2% of the pockets. Bummer to be in the majority.
    7. Re:So why is Gentoo the right choice for this? by SRain315 · · Score: 2, Insightful

      As of right now, Gentoo is the right choice because _they already did it._

      Location:Real Estate::Available:Technology

      --
      --- Corporations Are A Fad.
    8. Re:So why is Gentoo the right choice for this? by Mr.Ned · · Score: 2, Informative

      Two thoughts in reponse to your post:

      Debian provides more platforms than Gentoo.

      NetBSD runs on many, many more platforms than any Linux does.

    9. Re:So why is Gentoo the right choice for this? by 3Suns · · Score: 4, Interesting

      There's nothing about Gentoo that says you have to compile stuff from scratch. And with embedded devices, it's all going to come pre-loaded anyway. Apparently, Gentoo is very good for building specific, shrunken-down distributions, like the recently-released FlashLinux project. Gentoo lets them optimize the packages very easily, to shring down binaries, etc. This is a pretty big concern with embedded devices.

      I don't think anyone would really suggest compiling anything big on your PDA.

      --

      -3Suns

      ~~~~
      The Revolution will be Slashdotted
    10. Re:So why is Gentoo the right choice for this? by ViolentGreen · · Score: 2, Informative

      Well it's not just the compilation. It's the USE flags. I would assume that the standard version of XMMS (compiled with the Gnome and KDE support) will be a larger file size and use less memory than XMMS compiled without that support. That was my point. If there are precompiled packages specifically for your handheld, you may be better off going with those. If there aren't, I think compiling your own via gentoo would produce better results than just getting a standard version off of sourceforge.

      --
      Not everything is analogous to cars. Car analogies rarely work.
    11. Re:So why is Gentoo the right choice for this? by pchan- · · Score: 4, Informative

      as an embedded systems developer and a gentoo user, i'll tell you that my company certainly will not be putting a gentoo system into our devices. we might look at their kernel if it's good and light. our embedded linux is not much more than a kernel and busybox.

      BUT... if you hack up some device and install linux on it, it has huge advantages. you don't have to use some guy's Linux-4-XYZdevice distribution, which might be a mess, never maintained, and poorly supported. you don't have to go hunting for applications that will run on your arch, mess with build scripts to make it build right, and get the patches that will make things run on this processor and with your devices. if you installed linux on your device from 2 years ago that everyone forgot about, you can still have up to date software for it right now. and finally, you have a working ifrastructure of bug reporting and fixing, and a good way to communicate with people doing similar things as you (even if the devices they use are different).

    12. Re:So why is Gentoo the right choice for this? by Lumpy · · Score: 4, Informative

      why? because they are automating a HUGE amount of work in creating an embedded linux install.. MOST embedded linux systems have their os rolled by hand. you need to fight to get perl to compile with uclibc, good luck getting python cross compiling without rewriting the makefile system by hand, and many other items that embedded engineers fight with daily. Gentoo is making that task insanely simple.

      I have a 9cm by 11cm board that uses a cirrus logic ep9301 processor at 200mhz and draws 9 watts with usb, ethernet, 2 serial 1 rs485, parallel and a CF slot I have 16 meg of flash on board with 64 meg of ram. this thing is a powerhouse in the embedded world and linux is a perfect fit for it. I am designing a home automation system around the device so python or perl will make programming it after the fact much easier.

      I can not wait to dig into embedded gentoo.. espically cince it is based on uclibc... a mistake that all other embedded distros make is NOT basing on uclibc.

      --
      Do not look at laser with remaining good eye.
    13. Re:So why is Gentoo the right choice for this? by EntombedVirus · · Score: 2, Insightful

      I am afraid this is going to be a "me-too" post. I have found Gentoo very easy to maintain once I have it up and running. Granted, compiling does take long, but atleast my system does not get corrputed over time. I rememeber the RPM nightmares I had to endure before I found Gentoo. I also like the fact that I was able to learn much more about the inner workings of linux. Applications that are optimized for my machine, atleast in my case, is just a bonus and not the defining reason why I run Gentoo on my desktop.

    14. Re:So why is Gentoo the right choice for this? by ad0gg · · Score: 2, Informative

      When you work with WinCE, you get the source code from microsoft to customize to your product. I don't know of any precompiled solutions in the embedded OS market.

      --

      Have you ever been to a turkish prison?

    15. Re:So why is Gentoo the right choice for this? by zbyte64 · · Score: 2, Informative

      Many people make jokes about gentoo and the whole compiling issue. But I myself have used gentoo on servers and there is a significant amount of performance to be gained.

      One thing to consider, gentoo does have the capaibility to install from binary packages. I think this system here would simply compile once, and distribute the binary packages so others don't have to compile

      Gentoo also only installs what you want (typically anyways), and on an embedded device with limited resources, that is important. I can't tell you how many times other distros automatically installed some package i didn't want, or favored kde over gnome, or vise versa.

      I know im going to be called a ricer after this, but Im not. Me and my friends run a multiplayer web based game, and trust me, optimization flags do count. Granted i don't sit around for 5 hours testing every single flag. I typically set the march, -O3 or -O2, and the frame pointer one. I've seen the results first hand, Gentoo itself is not rice - but other people make it into rice.

    16. Re:So why is Gentoo the right choice for this? by LWATCDR · · Score: 2, Insightful

      My question is who does embeded development that does not roll there own kernel anyway?
      I mean really you are most likey to cross compile everything for your appliaction.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    17. Re:So why is Gentoo the right choice for this? by lxt518052 · · Score: 2, Informative
      Gentoo may not support as many platforms as Debian, but did you know Gentoo was the first distro to fully support AMD64?

      Debian claims to be the Universal Operating System. No wonder it supports so many platforms. And it has existed long before Gentoo came into being. Debian also has maturer community and larger user base. Some debian-based distros like Knoppix and Ubuntu are at least as successful as Gentoo. It is kinda like comparing the programming skill of a veteran programmer to a new kid that only programmed in Java, and blaming him for not mastering C++.

      Having said that, I believe Gentoo has the potential to match Debian to say the least. Features aside, Gentoo updates faster than Debian. 4 releases in a year is really something. While Woody was released on 19th of July, 2002, next Debian stable Sarge won't be available until next September. It's 3 years in between Debian's two stable releases. It is just a bit too slow to me.

      I know Debian's stable is _REALLY_ stable and no Gentoo release can match that. But stability isn't why one uses Gentoo. Others may have their own reasons, I use it because it's much easier to try out things on it.

      Just my 2 pence. :)

      --
      People who dislike China tend to mention Tiananmen Square a lot, but they always forget the Tank Man is also a Chinese.
    18. Re:So why is Gentoo the right choice for this? by pchan- · · Score: 2, Informative

      well, let's not underestimate the statement "it doesn't take much space". if you've ever had to remove print statements from your code to make it fit in the memory, you'll know that kilobyte of space weighs heavily upon the mind of the embedded programmer.

      busybox is a terrible user experience, i agree. but it is generally not there to be used by the user. it's mostly to run scripts, do shell executes, and because unix programs are not happy if there is no /bin/sh. generally, you're going to want to statically link your binaries, and generally you'll be using uclibc for smaller code. the problem is, once you start having too many binaries, the advantages of static linking start to disappear now you have a dozen binaries (sh, ls, rm, ...), that all have duplicate code statically linked, eating up your file cache ram and non-volatile storage. if you only have 2MB of ram, you're going to be thinking twice about your memory consumption at this point. with busybox, you can run a dozen binaries, and they all share the same single executable image in the memory, and you don't waste ram on a dozen versions of printf() or the time to load each one from a potentially slow storage medium.

      second, there are so many external dependencies, even with the most basic programs. "ls" depends on locale information in some libc helper library somewhere, terminal size, colors, .... i don't need support for fancy sorting order, i just need ls. busybox gives you very basic versions of all of these utilities (no tab completion in the shell, no color in ls, etc). this means speed and memory! besides, have you *seen* the code in some of these apps? good luck fixing bash2 if you find it broken on your system.

      finally, it's a management issue. you don't have to worry about your binaries, they're all in the same place. if you need to re-make everything because you changed something, it's only one application to worry about.

  5. disspelling gentoo myths by Chuck+Bucket · · Score: 4, Informative

    Using Gentoo ebedded makes total sense, since you can customize it during install to be as big or small as you want.

    as for the compiling joke, it's pretty old, and partially untrue if you use binaries during emerge (much like FreeBSD's pkg_add). Nonetheless, please read Dispelling the myths of Gentoo Linux, an honest review, and learn before you flame. After that, go on using whatever Linux distro you prefer.

    CB

  6. You wouldn't compile from scratch. by Principito · · Score: 5, Insightful

    Compiling from scratch would be insane. The easiest way to accomplish this would be to put cross compiling tools on a host machine and build your iPAQ or whatever in a chrooted environment. After which you would transfer your build.

    $0.02

    PS:
    Cross compiling tools are part of this project.

    --
    "Be kind, for everyone you meet is fighting a hard battle." -- Plato (427?-347? BC)
    1. Re:You wouldn't compile from scratch. by uglyduckling · · Score: 2, Funny

      I disagree quite strongly that The Gimp is/isn't a full Photoshop replacement. What kind of idiot are you? Are you a graphic designer? Where are the benchmarks - and I bet Microsoft paid for them. Come back when you've got a clue.

  7. Alright by Apreche · · Score: 3, Insightful

    ARM eh? I see some gentoo on my Nintendo DS real soon...

    Oh, and anyone who things that a source based distribution would be bad for embedded, the opposite is true. Since its embedded you probably wouldn't be managing packages on it, like if it was say, a portable DVD player. Gentoo is really technically a meta-distro. It would just make it easier to create linux systems for different devices without having to do full on LFS. The compiling would be done once by the developer, then imaged into the devices. But the build would be device specific, meaning it would be as good as it can be.

    --
    The GeekNights podcast is going strong. Listen!
  8. ricer PDA's by phoric · · Score: 2, Funny

    Nice, now we can tweak our PDA's until the LCD screen melts! :) Actually Gentoo is still my fav distro, not matter how much we Gentoo geeks get bashed.

  9. I've just got one requirement for embedded gentoo by Crimsane · · Score: 5, Funny

    Any gentoo-embedded specific ebuilds get renamed to wee-builds.

  10. Complete control by grahamsz · · Score: 2, Interesting

    You can control all the compiler flags, so you can build binaries that are optimized for size and memory footprint - rather then the desktop world where things are usually speed optimized (funroll-loops please :)

    You can also just built the parts of the application that are relevant to your product.

    Using any source that's not your own (whether you compile it or not) is a liability - fortunately law makes sure that corporations dont really have to worry about that.

  11. This could be really nice! by Halthar · · Score: 3, Interesting

    Depending on how they set up the cross compile environment this could be a very very good thing.

    Recently I have been doing lots of devel. work to be used on Gumstix. At present I already need to compile the full root filesystem and flash that to the Gumstix, so there isn't much change there, but provided that the emerge and USE system work well without adding bloat like the emerge system itself or Python to the system image, this would make an excellent tool as it would remove the headache of creating .mk files and ensuring that I have all the right patches for each package, or even worse porting the packages myself. This is all assuming they set the portage system up so that emerge can be used to send packages to the cross compiler and merged into the root filesystem being created.

  12. Gentoo can save your life by dolmen.fr · · Score: 2, Funny

    Next time you are blocked in a snow storm with your your Zaurus in your pocket, just launch emerge --update --deep --newuse world. Let's hope the battery will last enough...

  13. Flexibility (for the vendor) by temojen · · Score: 2, Informative

    It's very flexible for the vendor, and easy to up-date. I can't imagine wanting to include gcc, portage, etc on an embedded device, but it would give the vendor a good development environment, and an easy way to comply with GPL requirements (by having an rsync portage mirror available). It'd also give embedded device customizers a standardized development environment. A hardware vendor could sell hand-helds to customizers who add barcode scanners/rfid readers/whatever, and their own software, then sell them to businesses (whatever their niche is).

  14. compiling by SuperBanana · · Score: 4, Insightful
    how long would X take to compile on an iPAQ?

    Helloooooo distccd.

    I have a P2/300 Mobile, a Celeron 450, and a P3/600. Compiling stuff with distcc set up is a breeze and I fail to see the complaints about gentoo compile time...of course, they're all bare-bones console-only systems (firewall, mail/web, and fileserver), but you get the idea. Two of them only have 128MB of ram...

  15. This is actually a great idea by Anonymous Coward · · Score: 5, Interesting

    I am an embedded software engineer, so hopefully I know what I am talking about. I work with ARM chips, and every linux system that I have built has been compiled from scratch. Not because I want to, or because I am some kind of speed freak - but because in general there are not any up to date binary packages for ARM available. Or if there are you often find that they are not compiled quite right for your particular needs.
    Using a Gentoo like system to cross-compile apps with the options, etc that you need is an excellent idea. Some features that I would like to see in this project
    o Keep the code for a package unpacked, so that I can make code changes to that package, recompile it & the package management system will build my changes into the binary. Updating the package version could auto merge my changes.
    o Auto generation of root directories, in the file format you want (ie, nfs, cramfs, initrd, etc)
    o Able to maintain several different configurations at once, ie one Gentoo maintained set of packages for my iPaq, and one set of packages maintained for my custom device. And to completely rebuild them I could go "emerge -set-board iPaq; emerge -u world"

    1. Re:This is actually a great idea by kardar · · Score: 2, Interesting

      Well, I just recently tried to install Gentoo, but I couldn't even get out of the starting gate. The "bootstrap" process, while taking a while, might be acceptable - if it didn't fail here and there from time to time and require you to go in and change code, apply patches, or take wild guesses at why it's not working, etc... In my case, it appeared that "bootstrap" was, at least, upon first inspection, broken.

      So I installed Debian, but I wasn't happy with not having had a choice of filesystems, so I went back and guess what I used - the Gentoo install CD - to boot up, manually mount, and move around my partitions from one to the other and make filesystems that I wanted to try out (JFS). Worked just fine. Used the Gentoo handbook to help me (re)-install GRUB, using the Gentoo install CD, on my brand-new Debian JFS Linux machine.

      The Gentoo install process, the install CD, the forums, the handbooks, and much much else is really wonderful and puts a new spin on manipulating and customizing your system (in my case it was Debian).

      So I think this is quite possibly a really good idea, because it's exactly the flexibility (I don't mean make.conf or USE flags) of the way things are set up that would allow you to sort of get your hands or brains around other things (in my case a Debian install) using the Gentoo philosophy and processes.

      Even though Gentoo is though of as a distribution, I think that's it's really turning into something more than just a distribution - I don't particularly care to run Gentoo Linux on my machine, but I will continue to love the install disk if I need to mess around with my system, and the forums and handbooks, if I need questions answered that can make a lot of difference.

      I wish them all good luck, and thank them for their hard work.

  16. Compiling X on an iPaq by tgd · · Score: 3, Informative

    Actually, I suppose it could be ballparked.

    When I first started using Linux back in early '93, compiling was about all you could do. (Pre-slackware, Yggdrisil or something was the only distro, I think).

    I remember compiling X on my computer, a 486/66DX2 with eight meg of RAM. It took a few days to build. Considering my busted down four year old iPaq is like 166mhz, and has 64 meg of RAM, it'd certainly be doable, probably take a day or so, maybe less.

  17. Re:Gentoo zealouts out in full force today by SilveRo_kun · · Score: 2, Insightful

    Well, my take of this is that most people are already sick of hearing the same crappy and ridiculous jokes over and over again. You must be pretty pissed that all those useless comments aren't modded up to +5, huh?
    Heh, I'm sorry, but most people seem to have common sense, something you lack....

  18. Re:why are they using Linux anyway? by horeton · · Score: 2, Informative

    The point is we already took our src and gave it back to the community. We submitted our patches to uClibc, and gentoo-embedded continues the original development done on i386 soekris boards to other architectures. Gentoo-embedded involves other embedded developers contributing to a build enviroment that you can build any opensrc software in from scratch as long as their is an ebuild in portage. Only factors really are space and device architecture. It also stores all your bins in ipkg format I might add...
    Also for the foo's talking about compiling on the device. You could do that if you could nfsmount your chroot build enviroment and were an idiot, or you could just build your devices image in the build-root enviroment using you nice desktop then move the image to the device like a normal person.

  19. The original Gentoo Embedded became Zynot. by Anonymous Coward · · Score: 2, Informative

    The current Gentoo Embedded project was started after an earlier effort was forked into Zynot.

  20. Did any one read this by pavkb · · Score: 3, Insightful

    I would have read about 40-50 comments & all i see if people have serious misunderstanding of this project..

    Here is their project goal. From what i read, build in ur PC & move it to embeded device, gentoo style.

    2. Project Goals
    The intention of the project is to make Gentoo viable for embedded systems. This includes creating a system for cross compiling and building the image for an embedded system on a Gentoo workstation. The base install image should be minimal, with different libc options. Building on this base, the system can be customized for the particular system.

  21. penguin on iPAQ is a daily bread for me by Maljin+Jolt · · Score: 3, Interesting

    Native compiling, eh... considering it's Gentoo, how long would X take to compile on an iPAQ? :-)"

    Although I am using Familiar Linux on iPAQ (for years ;-) not Gentoo, native compiling is a great curiosity but simply works for many GNU projects. Great to make impressions on WinCE users, whose usability of the PDA is rather limited in sortiment of apps in comparision with full abilities of linux on the same hardware. I have already converted several coders from windows to linux just by demonstration of my iPAQ running at the same time a web server, python curses app in terminal, Quake1 in dynamic desktop icon and C compilation on background.

    Of course, for serious development or building whole system from the bottom I would rather suggest crosscompilation. iPAQ memory is too small to use templates in C++. And, by the time the build of X11 will be finished, certainly X22 will be the standard....

    --
    There you are, staring at me again.
  22. Just be glad... by ztwilight · · Score: 2, Interesting

    That they CAN compile on it... I've installed many "desktop" or "personal" distros which don't even come with GCC. Truly sad...

    --
    Who moved my sig?