Slashdot Mirror


Linux Kernel 2.4 Or 2.6 In Embedded System?

snikulin writes "My 6-year-old embedded software happily runs on kernel v2.4 on an XScale CPU. The software gets a bunch (tens of megabytes) of data from an FPGA over a PCI-X bus and pushes it out over GigE to data-processing equipment. The tool chain is based on the somewhat outdated gcc v2.95. Now, for certain technical reasons we want to jump from the ARM-based custom board to an Atom-based COM Express module. This implies that I'll need to re-create a Linux RAM disk from scratch along with the tool chain. The functionality of the software will be essentially the same. My question: is it worth it to jump to kernel 2.6, or better to stick with the old and proven 2.4? What will I gain and what will I lose if I stay at 2.4 (besides the modern gcc compiler and the other related dev tools)?"

178 comments

  1. testing? by robvangelder · · Score: 5, Informative

    if you're migrating, no doubt you're performing tests to ensure your product is still fit.
    once you have your test plan ready, determining fitness against either kernel should be straight-forward.

    1. Re:testing? by Anonymous Coward · · Score: 1

      Don't bother answering the question, just get that first post.

    2. Re:testing? by joaommp · · Score: 5, Insightful

      actually, why was this modded flamebait? despite the fact that it doesn't give a direct answer to the question (99.9% of posts don't even give any answer, direct or indirect to the questions), the post actually makes sense and is relevant. With a test plan there is the possibility to find incompatibilities that don't pop out at first sight and that may force the guy to stick to the older kernel and, thus, voiding the 'is it worth it'-question with an 'is it possible'-question.

    3. Re:testing? by DuckDodgers · · Score: 5, Insightful

      Your solution requires the post submitter to do all of the work to create his solution for both kernels, and then compare them.

      If someone asked whether to build a reasonably complex website in Python or PHP would you recommend that they build both and then performance test them? That's a lot of extra work.

      In both the original post submitter's case and the hypothetical one I suggested, it would be much easier to gather as much information you reasonably can about both solutions and then make an educated guess as to the best option. I'm not sure Slashdot is the best place for his information gathering, but I understand what he is doing.

    4. Re:testing? by Anonymous Coward · · Score: 2, Insightful

      His solution does not require the post submitter to do any work other than to draw up a test plan.

      Even before doing any coding at all, the test plan itself may reveal whether it's worth it / possible to migrate to 2.6.

    5. Re:testing? by Anonymous Coward · · Score: 0

      If someone asked whether to build a reasonably complex website in Python or PHP would you recommend that they build both and then performance test them?

      No, no, that's not the same thing at all. A better analogy would be: somebody already HAS built a reasonably complex website in PHP 5 and now wonders whether it'll be worth switching to PHP 6 (assume for a moment it's out and stable).

      Clearly then, saying "give your site a test-run under PHP 6 and see what you'd have to change and whether it's worth it" would be good advice. In fact, I'd go so far as to say that it's the ONLY good advice and that "take a look at PHP 5 and PHP 6 and then make a decision without ever touching your code or testing anything" is BAD advice.

      (Also, who the fuck uses python for websites?)

  2. Why Linux? by TheRaven64 · · Score: 5, Informative

    2.4 is horrible to work with. It's missing so many features you expect from a POSIXy system that you constantly have to find work-arounds. Having a 2.4 kernel on the cluster during my PhD was enormous pain - I'd write code on FreeBSD, copy it to the cluster, and find half the features were missing. 2.6 is a lot better from a feature-standpoint, but is much heavier and isn't really suited to embedded systems anymore. If you're building the image yourself, why not go with FreeBSD or OpenBSD and get the best of both worlds - FreeBSD if you lean more towards features, OpenBSD if you want a smaller footprint?

    --
    I am TheRaven on Soylent News
    1. Re:Why Linux? by JohnFluxx · · Score: 1

      For example?

    2. Re:Why Linux? by TheRaven64 · · Score: 5, Informative
      I'm assuming you're asking for examples of things that don't work correctly (or at all) in 2.4. If so, off the top of my head (it's been a couple of years since I used a 2.4 kernel):
      • Lots of newer POSIX IPC (SysV IPC works okay).
      • Asynchronous I/O (all of the aio_* family and lio_listio).
      • Several bits of POSIX threads.
      • Most of the realtime extensions, such as queued signal delivery.
      • Some mmap() flags (I think - not sure about this one).

      All of these work on FreeBSD 6 or 7 (aio is in a module that isn't loaded by default on 6, not sure about 7), and most of them work on Linux 2.6.

      --
      I am TheRaven on Soylent News
    3. Re:Why Linux? by Anonymous Coward · · Score: 3, Insightful

      Or just simply NetBSD, as it's cross-compilation toolchain will save you tons of headaches when you will have to compile and test your new ramdisk.

      IMHO, build.sh is just the way to go.

    4. Re:Why Linux? by DrDitto · · Score: 5, Insightful

      2.6 is a lot better from a feature-standpoint, but is much heavier and isn't really suited to embedded systems anymore.

      Lets see-- Android runs Linux 2.6.25. My Linksys NSLU2 is currently running OpenWRT with a Linux 2.6.26 kernel. Both are embedded devices with far less processing capability than an Atom-based device.

    5. Re:Why Linux? by miknix · · Score: 5, Interesting

      Exactly, I would not say it better.

      As a member of the gentoo embedded team I would recommend the use of crossdev to generate the toolchain.
      By emerging crossdev-wrappers and setting up some gentooish cross-compiler environment, it is possible to cross-compile (by simply emerging them) a lot of packages on portage.
      Emerge will take care of most things leaving the most ugly cross-compile errors for you.

      http://www.gentoo.org/proj/en/base/embedded/cross-development.xml

      Regarding the guide, don't use the xmerge script. Just emerge crossdev-wrappers instead.
      Feel free to join #gentoo-embedded on irc.freenode.net

      Happy xcompiling.

    6. Re:Why Linux? by Nutria · · Score: 1, Insightful

      All of these work on FreeBSD 6 or 7

      v6.0 was released 5 YEARS after Linux 2.4.1 was released, so OF COURSE it has more features. Linux 2.6.1 is contemporaneous with FBSD v5.2.

      --
      "I don't know, therefore Aliens" Wafflebox1
    7. Re:Why Linux? by beelsebob · · Score: 4, Informative

      Who cares which came first. The important thing is that that kernel is small, and has the features. Linux 2.4 does not have the features, Linux 2.6 does not have the small.

    8. Re:Why Linux? by molarmass192 · · Score: 4, Insightful

      I was thinking the same thing. Yes, 2.6 has a bigger codebase, but if you compile only the modules you need, instead of everything plus the kitchen sink, it's really no bigger in binary form (maybe +5%). In return, I find it to be noticeably more responsive given the same hardware.

      --

      Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws-Plato
    9. Re:Why Linux? by Anonymous Coward · · Score: 0

      On Minix, the poster would probably have port or write some drivers. Performance could be another possible issue when thinking about the user-mode driver code. Well, it would be an interesting experiment and a way to refactor the system even more portable. NetBSD, however, would probably be a safer (from the risk perspective) option.

    10. Re:Why Linux? by Anonymous Coward · · Score: 3, Informative

      I've trimmed-down linux systems before and it was more work than my current method: start with an OpenBSD base, which is usually small enough for most purposes. Installing only the 'base' and 'etc' components results in a pretty damn tiny footprint and yet a full-featured Unix OS (and a quite stable and secure one at that).

      Also, you end up with an actually supported OS that you can update every 6 months without a lot of patching and hacking around a custom forked/branched tree. I don't have time for that stuff.

      And besides, OpenBSD is a joy to work with. It's so easy to admin, the system is clear and straightforward, with good (and current) documentation and easy to follow code.

    11. Re:Why Linux? by RoundSparrow · · Score: 2

      OpenWRT dev trunk is rather stable, now supports 2.6.27 and 2.6.28 (change a few vars in the makefiles). The toolchain setup is automated and works well. I had no trouble setting up on modern Ubuntu 8.10 x64 host. A lot of embedded dev seems to be inflexible about hosting platform - the makefiles of OpenWRT work well.

      Runs well on 8MB of RAM with 4MB flash to boot from.

      Supports a variety of target platforms, even x86. Decent package manager, and always looking for additional options.

    12. Re:Why Linux? by miknix · · Score: 1

      Yeah.. I run Linux 2.6.22 on my HTC Wizard (TI OMAP 850 200Mhz). The only thing I feel a little overkill for it is GPE with all the GTK+ related stuff (pango, cairo ..).
      GNU libc is fine also, it doesn't need uclibc.

    13. Re:Why Linux? by hedwards · · Score: 1

      Point being? The OP isn't developing code 5 years ago. I'm not really sure why you weren't being modded flamebait. Doubtless they were busy mismodding things with which they disagree.

      But, seriously, that doesn't matter even the slightest bit, the question is whether or not to use a more up to date kernel for development. You also didn't bother to mention whether or not FBSD 5.2 was also missing those features making for a completely irrelevant and useless post.

      And I'll get modded down because lets be honest, the fanbois are going to hate this.

    14. Re:Why Linux? by hedwards · · Score: 1

      I was wondering who was going to point out that Atom really isn't a very good solution for projects that aren't stuck with ia32 as their development architecture. Arm of some sort is far better for these types of applications. Better power usage, and better optimizations for things that actually matter for mobile or otherwise embedded systems.

      As cool as it is, there isn't really a good reason for most people to in stall a full Linux system on an embedded system. Most of the time they just need a few relevant applications without the bloat.

    15. Re:Why Linux? by Anonymous Coward · · Score: 0

      an anecdotal justification at best.. "I like/am used to $OS_Y therefore it is better than $OS_Z"

    16. Re:Why Linux? by digitalunity · · Score: 1

      First, the posters device environment sounds like it has a fixed power source based on that it mediates data between an FPGA and data processing equipment. With that said, a few hundred milliamps of current isn't going to matter to anyone.

      Also, I don't think anyone mentioned anything about putting a full Linux system on an embedded system. It's likely nothing more than what is minimally required, i.e. kernel, ramdisk with some basic utilities and libraries(TFTP, dhcpcd, glibc) and the client apps.

      The scheduler and mmap improvements are enough to encourage 2.6 usage over 2.4. Unless there is a compelling compatibility reason to stay with 2.4, I'd say pick the newest 2.6 kernel you verified works and stick with that until you have another compelling reason to upgrade.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    17. Re:Why Linux? by Tubal-Cain · · Score: 0, Troll

      why not go with FreeBSD or OpenBSD

      Because *BSDs are dying. Duh.

    18. Re:Why Linux? by Anonymous Coward · · Score: 0

      I just love it when someone who obviously doesnt have any goddamn clue what they're talking about gets modded up 5 informative by hairless house-apes that are even dumber than he is.

    19. Re:Why Linux? by Anonymous Coward · · Score: 4, Informative

      Define small, I'm working towards a first release of a Linux 2.6 based project, the Kernel + bundled busybox based RFS is 2.1M. Just saying.

    20. Re:Why Linux? by sketerpot · · Score: 1

      Anecdotal "at best"? What, are you suggesting that it might not be an anecdote? Like, it might actually be an ocelot or something?

    21. Re:Why Linux? by mikiN · · Score: 1

      Also, as far as I remember, NetBSD (and perhaps some of the other BSDs) has a tool (I don't remember its name, but I think it is used in building the installation media) for building a custom libc containing just the bits that executables on the ramdisk actually require. This optimized libc is built from the same sources that the well tested 'main' libc is built from.
      Saves you a lot of uClibc hassle and validation troubles, not to mention ramdisk space.

      --
      The Hacker's Guide To The Kernel: Don't panic()!
    22. Re:Why Linux? by mikiN · · Score: 2, Informative

      OK, found out that the tool is called crunchgen, and that its main purpose is efficiently combining multiple binaries into one (although I've read it could be used for building efficient libs, too), so it is more like an alternative to BusyBox multi-app binaries.

      --
      The Hacker's Guide To The Kernel: Don't panic()!
    23. Re:Why Linux? by Lennie · · Score: 3, Informative

      And there is also CONFIG_EMBEDDED

      --
      New things are always on the horizon
    24. Re:Why Linux? by empaler · · Score: 1

      Jeez. Troll? Come ON. Offtopic, may be, but definitely not troll.

    25. Re:Why Linux? by davester666 · · Score: 1

      Giving the "functionality will be largely the same" part of the article, isn't pretty much all of this irrelevant?

      Unless there is some specific feature or benefit that his specific project can make use of, why do the extra work of updating to v2.6?

      If he's got to port both v2.4 and v2.6 to this new card, why do the extra work of then having to port his applications to v2.6 as well?

      As a developer, it's fun to try out new things, upgrade to the latest version of software, but for the business, it's not necessarily best to do this.

      And it's mostly questions only the developer can answer, like:
      -is there better support for the card in 2.6 than in 2.4
      -how much effort will it take to port the application to 2.6
      -are there features in 2.6 that will allow the application to be better/faster/use less memory
      -how much effort will be needed to use these features

      Nobody here on slashdot can really help the guy (short of posting a very detailed list of changes between 2.4 and 2.6), as it really requires intimate knowledge of the project to give any kind of reasonable and responsible answer.

      --
      Sleep your way to a whiter smile...date a dentist!
    26. Re:Why Linux? by CraigParticle · · Score: 3, Informative

      Or just simply NetBSD [....] IMHO, build.sh is just the way to go.

      Finally! I think it's amazing that we're discussing embedded systems, Linux, BSD... yet ignoring NetBSD, which is the flavor that most caters to embedded systems!

      build.sh is a great example of one of those unheralded "little things". If I'm on my Mac OS X laptop and want to build a NetBSD ARM kernel or distribution for my embedded single board computer, I don't have to go fussing around with finding and downloading cross-compiling toolchains and figuring out how to make them go, etc. I just add a single flag to the normal build script that's part of the OS source code:

      ./build.sh -m evbarm kernel=MYKERNELCONFIG

      And that's it. It will build the toolchain and then the kernel. It's so simple, it's brilliant.

      NetBSD tends to get ignored a lot, but IMHO undeservedly. It is on a par with Linux 2.6 and FreeBSD in terms of speed, is flexible and feature-rich, has a nice ports/packages system and doesn't suffer from a lot of "superfluous redesign" (Linux, I'm looking at you). It's a really nice clean system and it's easy to get the basics done. It deserves more attention than it gets.

      That said, the original question was "Linux 2.4 or 2.6?" If you can strip 2.6 down to fit within the confines of your embedded system, by all means go for it. This is especially true for new small x86 devices, where 2.6 is typically the baselined kernel anyway. On other architectures, it varies. On many ARM flavors, 2.6 is getting shaken out and 2.4 is still often the default. I suspect that the transition will complete this year.

    27. Re:Why Linux? by Adam+Hazzlebank · · Score: 1

      Compared to some of the more powerful ARMs (e.g. OMAP3) the Atom is still a lot more powerful. For stuff I was looking at (mostly integer) the Atom was almost 10 times faster. You get two execution threads with hyperthreading which also helps a lot.

    28. Re:Why Linux? by CraigParticle · · Score: 1

      OK, found out that the tool is called crunchgen, [....]

      Yes. I found this old-ish article handy for actually using it. But there are also articles that discuss how to reduce the libc size as well.

    29. Re:Why Linux? by mysidia · · Score: 1

      Giving the "functionality will be largely the same" part of the article, isn't pretty much all of this irrelevant?
      Unless there is some specific feature or benefit that his specific project can make use of, why do the extra work of updating to v2.6?

      Because of ongoing development of the Linux 2.6 kernels.

      The 2.4 series kernels are essentially ancient relics and for the most part unsupported, hardly anyone is using them; there is little chance any of the few remaining bugs will be found and rectified.

      By upgrading to the 2.6 series, you would be using kernels that are actually still receiving developer attention: most of the eyeballs are running and looking at the 2.6 series kernels.

      If there are bugs in Linux kernels, it is the 2.6 series they will be found in, whereas ones in the 2.4 series have few people even looking for defects, or running systems on which defects can rear their ugly head.

      (And yes, I have seen problems with the latest stable 2.4 kernel panicking.)

    30. Re:Why Linux? by davester666 · · Score: 2, Insightful

      I would say this more relevant to desktops and servers, rather than embedded systems (of course, it also depends on the embedded system). Embedded systems typically perform a much more limited range of operations than when used as a desktop or server.

      Again, it depends on the specifics of the hardware and the application running on top of the kernel to decide which kernel is more appropriate to use.

      --
      Sleep your way to a whiter smile...date a dentist!
    31. Re:Why Linux? by Anonymous Coward · · Score: 0

      Kernel 2.4 is WAY more secure than kernel 2.6. The primary and proximal reason for this is that there is no GUI enabled shredder in 2.6! Not having a good shredder means that there is no way to safely delete confidential data from a drive. All the so called rationalizations given for leaving out the shredder when the jump was made to the 2.6 kernel are really specious drivel at best and insidious propaganda at lesser levels. A recent issue of 'Maximum PC' addressed the shredding issue from a windows standpoint, in that the editor of the mag, a kind of semi microsoftie leaning toward linux, stated that a well known data recovery firm was unable to get a single byte off of a shredded disk that had had only one pass of zeros written to the disk, implying that folks are really wasting their time doing more passes at it. To preserve security, we at our company with several thousand linux terminals use kernel 2.4 and filesystem ext2 under KDE 3.1 and have no problems getting rid of old, obsolete, redundant, employment related or whatever data needing secure destruction, including classified information no longer needed for whatever job. We will never 'upgrade', as all so called 'upgrades' in the last six years are really spyware or spyware enablers as is all new software. Used to be that commercial software did not try incessantly to connect with the outside world, but we are seeing that increasingly to be the case with the universal lie that they are trying to 'enrichen our computing experience' by trampling on our rights, installing unwanted software or 'services', etc. On top of that the software market has narrowed to nothing but microsoft office and a few copycats. Because of this, our SuSE 9.0 systems will never be changed, and we have not purchased software in the last eight years, nor will we need to. Our servers are under constant attack from domains with the last letters '.cn' and the segment 'ad' or 'adware' somewhere in them but have never to our knowledge been penetrated. Seems as linux, especially older linux, is not a large target compared to windows type systems. We like it that way.

    32. Re:Why Linux? by fuzzyfuzzyfungus · · Score: 1

      True, and my NSLU2 sure isn't running 2.4 either. That said, the NSLU2 isn't really a tiny embedded device. 32 megs of RAM and a 266MHz processor is hardly cutting edge; but it is luxury by classic "embedded" standards.

    33. Re:Why Linux? by setagllib · · Score: 1

      I know you're trolling and probably high as a kite being flown by another kite, but just in case anyone takes you seriously, let it be known that file shredding is not a kernel's job, and using a non-journalled filesystem (or a journalled filesystem set to not journal data blocks) will allow file shredders to work just fine.

      However, a pass of zeroes is not enough as some magnetic domains will remain in their old state and allow partial data recovery.

      --
      Sam ty sig.
    34. Re:Why Linux? by Anonymous Coward · · Score: 0

      Come ON.

      That's what I kept asking my Embedded Linux System to do. I had to replace it with OpenBSD because it refused to comply.

    35. Re:Why Linux? by Nutria · · Score: 1

      You also didn't bother to mention whether or not FBSD 5.2 was also missing those features

      Because the message I replied to referred to the greatness of FBSD 6 or 7, not v5.2.

      --
      "I don't know, therefore Aliens" Wafflebox1
    36. Re:Why Linux? by sgt+scrub · · Score: 1

      I hate it when someone posts, verbatim, what I was thinking :p

      --
      Having to work for a living is the root of all evil.
    37. Re:Why Linux? by Anonymous Coward · · Score: 0

      why would you need to hack around and patch? all you need to do is use make menuconfig to disable all the heavy stuff

  3. If you are olready doing 90% of the work... by dotancohen · · Score: 4, Insightful

    ...then go with the newer kernel. 2.6 has _lots_ of improvements above 2.4. The security aspects may be of less interest in your application, but the performance probably won't be. I've always believed that it is better to regret having done something than to regret having not done it.

    --
    It is dangerous to be right when the government is wrong.
    1. Re:If you are olready doing 90% of the work... by ta+bu+shi+da+yu · · Score: 4, Insightful

      I always hate it when people talk about improved performance in general. I'm curious about what specific features of the 2.6 kernel you feel he would benefit from?

      --
      XML is like violence. If it doesn't solve the problem, use more.
    2. Re:If you are olready doing 90% of the work... by Anonymous Coward · · Score: 2, Funny

      the higher number.

    3. Re:If you are olready doing 90% of the work... by ThePhilips · · Score: 5, Informative

      No clue what gp meant.

      From all I heard (I was in embedded business only in 2.2/2.4 times) that 2.6 integrated some number of patches from embedded folks and generally can be customized to run on smaller number of resources. Also, the improved I/O (much lower latencies) and scheduler (interactivity; soft-real-time) would benefit in embedded too. 2.4 has number of problem related to memory management, when virtual memory subsystem can easily grab half of available RAM - only for supporting virtual memory. 2.6 solved the problem for most architectures.

      Generally, many embedded folks moved to 2.6 already - mainly due to support for more new OTS hardware. 2.4 has this support only through vendor patches (e.g. I used in past BlueCat and MontaVista patches).

      In my experience changing kernel on embedded system is quite easy task. Using development system within couple of days you can come up with suitable minimal .config (one needs development system since on target embedded systems might not have sufficient resources to run vanilla kernel). Generally it would either work or not. Normally it works.

      Also note that H/W vendors started being more active in 2.6 times. In 2.4 times best shot at Linux driver was some crude port from e.g. LynxOS or VxWorks. From all I know, 2.6 now supports more PowerPC system than did patch from MontaVista for 2.4 I used three years ago.

      Last, but not least, if you are looking at new modules, many hardware vendors supply Linux compatibility information. 2 years ago finding module with "Linux compatibility" chapter in documentation wasn't a problem at all.

      --
      All hope abandon ye who enter here.
    4. Re:If you are olready doing 90% of the work... by Enleth · · Score: 4, Insightful

      Much better power management, in many different aspects, which can be important if this particular embedded platform is meant to be battery-powered or used in an unfriendly thermal environment (yes, power efficiency is also a kind of performance metric, just per watt of consumed and emitted power, not per unit of time).

      There's more power management support in the drivers, lots of ACPI fixes and improvements, and, most importantly for a platform like Atom (or any x86-based platform in general, when heat and power are a problem), the tickless idle mode, which enables very real and measurable power saving and reduction of generated heat by letting the processor actually do nothing (technically, drop to C3 and further power states) when, well, doing nothing, instead of processing useless interrupts and idling at the normal working power level.

      --
      This is Slashdot. Common sense is futile. You will be modded down.
    5. Re:If you are olready doing 90% of the work... by dotancohen · · Score: 1

      I always hate it when people talk about improved performance in general. I'm curious about what specific features of the 2.6 kernel you feel he would benefit from?

      I have no idea. I was BSing through the teeth. I love these Linux articles where one could snag a +5 Informative by throwing some buzzwords in the right places. Hell, I even had a typo in the subject!

      --
      It is dangerous to be right when the government is wrong.
    6. Re:If you are olready doing 90% of the work... by Incadenza · · Score: 1

      I've always believed that it is better to regret having done something than to regret having not done it.

      You are not quoting the Butthole Surfers, are you? Intro to "Sweat Loaf", from Locust Abortion Technician? Unfortunately, the iTunes 30 seconds intro preview are not enough for this song, you will have to sample it elsewhere.

    7. Re:If you are olready doing 90% of the work... by dhfoo · · Score: 1

      Surely that's Butthole Surfers, not Orbital?

    8. Re:If you are olready doing 90% of the work... by marcello_dl · · Score: 1

      > I've always believed that it is better to regret having done something than to regret having not done it.

      Let's apply a bit of logic.
      "something" will end up being, good, or substantially neutral.
      If it ends up being good, regretting having done it makes no sense.

      If it ends up being bad, worse becomes better than good. "I regret having lost my wallet, i'd rather regret having it still in my pocket".
      Bullshit.

      If it ends up being neutral, doing it or not doing it is the same, so you essentially prefer regretting having wasted time.

      I don't advocate behaving like dr. spock, but this philosophy is being driven by fear of subsequent regret. It's worse than being driven by instinct, worse than being driven by reason.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    9. Re:If you are olready doing 90% of the work... by Anonymous Coward · · Score: 0

      I've always believed that it is better to regret having done something than to regret having not done it.

      Like sleep with the prostitute that eventually led to the divorce from my wonderful wife? I'd much rather regret not doing that than rather regret having done that.

    10. Re:If you are olready doing 90% of the work... by dotancohen · · Score: 1

      You are not quoting the Butthole Surfers, are you? Intro to "Sweat Loaf", from Locust Abortion Technician?

      I do have the album Independent Worm Saloon but I've never heard anything else out of them. I'll look at that, thanks!

      --
      It is dangerous to be right when the government is wrong.
    11. Re:If you are olready doing 90% of the work... by Anonymous Coward · · Score: 0

      Take that Slashdot!

    12. Re:If you are olready doing 90% of the work... by Anonymous Coward · · Score: 0

      Isn't IPv6 something that's in 2.6 and not 2.4? That would do it for me, right there.

    13. Re:If you are olready doing 90% of the work... by WindShadow · · Score: 1

      Based on my own experiences and those of which I've read since 2.6 came out, as features have been added performance has gone down. Only the release of cheap fast hardware has kept this from being obvious. Unless there's a good reason to go 2.6 it will probably help performance to keep it simple.

    14. Re:If you are olready doing 90% of the work... by BigBlockMopar · · Score: 1

      I've always believed that it is better to regret having done something than to regret having not done it.

      That's how I feel about circumcision. Two days of pain gives a lifetime of really liking silk boxer shorts.

      --
      Fire and Meat. Yummy.
  4. Move on by markus_baertschi · · Score: 4, Insightful

    I'd move on. Not for any particular feature, but to stay closer to the mainstream for the next years. The 2.4 kernel, not for any technical reason, becomes increasingly exotic as people move on to 2.6.

    You'll have to maintain your existing 2.4 skills for another decade when all others have moved.

    Markus

    1. Re:Move on by morgan_greywolf · · Score: 5, Insightful

      OTOH, the code is 6 years old, and from what I gather reading the post, it's stable and mature. OTOH, my guess is that if the article poster has written his code in a fairly portable way, it will compile without too much modification on GCC 3.x or 4.x and will run under the newer versions on glibc on a 2.6 kernel.

      On the gripping hand, keep in mind that for embedded applications that memory is usually at a premium and the memory footprint of 2.4 is significantly smaller than the 2.6 kernel. Keep in mind that lots of embedded applications are still using a 2.4 kernel and some embedded applications even continue to use MS-DOS or FreeDOS.

      I guess if I were making this decision, I'd try to compile and run my code on newer Linux distro in a sandbox to see how much work it would take to make it compile and run in the new environment. Then I'd see how much bigger a custom-built 2.6 kernel is than the existing 2.4 kernel, optimizing the kernel configuration for size and memory consumption, of course.

      That work should take no longer than a couple of days.

      If it doesn't work out, you can go back to your existing 2.4 configuration. *shrug*

      What do you have to lose?

    2. Re:Move on by wwwillem · · Score: 1

      keep in mind that for embedded applications that memory is usually at a premium and the memory footprint of 2.4 is significantly smaller than the 2.6 kernel

      True, but because poster mentions he wants to move from ARM to Atom, that also implies he is moving to a more modern SBC. Therefore I would guess that his amount of available memory is also at least quadrupling (for the same or lesser costs).

      --
      Browsers shouldn't have a back button!! It's all about going forward...
    3. Re:Move on by morgan_greywolf · · Score: 1

      True, but because poster mentions he wants to move from ARM to Atom, that also implies he is moving to a more modern SBC.

      Probably, but I wouldn't bet it would be necessarily quadrupling. All sorts of memory configurations are still available. For instance, is the device battery powered? If so, he might order one with less available memory to conserve battery life.

    4. Re:Move on by Anonymous Coward · · Score: 0

      1) what sort of alien overlord are you with just 4 hands
      2) even though Im over my head in this discussion, according to this and other posts suggesting CONFIG_EMBEDED the 2.6 kernel can use a pretty small footprint and perform significantly better than 2.4.

  5. New hardware new issues by Ruie · · Score: 3, Insightful

    My question: is it worth it to jump to kernel 2.6, or better to stick with the old and proven 2.4?

    Old and proven on a different hardware. Chances are your new hardware will have some issues (if only caused by you misunderstanding something) and then it would help to have the latest kernel that more people are using.

    Also, Atom is a newer processor, perhaps with PCI Express in the chipset - does 2.4 support that ?

    1. Re:New hardware new issues by TheSHAD0W · · Score: 1

      Yup. I'd recommend picking up an Atom-based netbook, installing 2.4 on it and seeing what you can get working.

    2. Re:New hardware new issues by wtarreau · · Score: 4, Informative

      Yes, 2.4.37 runs fine on an Asus EEE-Box (Atom, PCI-E, SATA, USB2, ...)

      Willy

    3. Re:New hardware new issues by MShook · · Score: 2, Insightful

      Straight from the 2.4 maintainer: can't be better than that!

    4. Re:New hardware new issues by scatterbrained · · Score: 1

      the OP just said an "Atom" COM express module.

      Atom comes in two variants, the 'netbook' and the 'embedded' (can't remember the marketing-speak for them right now)

      Given that he is coming from Xscale, I'd bet it's one of the embedded modules using the US15W chipset, which are quite different from the netbook ones.

      There are a few patches from moblin required to get the 2.6 kernel fully running on the US15W. AFAIK those patches haven't been backported. I would recommend starting from 2.6.

      --
      -- All that's left of me, is slight insanity, whats on the right, I don't know. -- Bob Mould
  6. 2.6 by JamesP · · Score: 5, Informative

    I had the same question asked for an embedded project 3 years ago. And it was very clear cut then

    2.6 you get (off the top of my head)

    -Modern drivers (including USB/Network/etc)
    -Various tick rates and tickless
    -More support
    -Several other improvements

    So really don't bother w/ 2.4

    --
    how long until /. fixes commenting on Chrome?
    1. Re:2.6 by Anonymous Coward · · Score: 0

      The only issue is size. 2.6 is "significantly" larger than 2.4

      Whether this is significant in this case depends on the embedded hardware. Most of the embedded platforms we deal with have advanced to the point where they have sufficient RAM/ROM for the larger kernel. Unless this is a high volume/tight price point product there should be enough resources for 2.6.

    2. Re:2.6 by JamesP · · Score: 3, Informative

      The only issue is size. 2.6 is "significantly" larger than 2.4

      Really a non-issue when bigger is cheaper and smaller RAM/ROM chips are being phased out. Just as an example, we developed a product using 32MB RAM but that was phased out (really, you couldn't buy the chips anymore) in favour of 64MB RAM

      How much is a 1GB usb drive today again??

      I guess you need something like 2MB flash for a 2.6 system (if you really squeeze things). With 16MB/32MB you can do pretty much anything.

      --
      how long until /. fixes commenting on Chrome?
    3. Re:2.6 by Anonymous Coward · · Score: 0

      I have a ADSL modem which ran 2.6.x, It has 2mb of flash and (I think) 1mb of ram.

      It was really squashed in, but it worked.

      I had some experience with building a linux environment for an old palm, it had 200mhz arm processor, 16mb of ram and no flash. It was very easy to get a full 2.6 kernel and a very complete build of busybox into just 1.1mb of storage, but actually running it needed about 4mb of ram.

  7. This article was written upon 2.6 release by rolfwind · · Score: 5, Informative

    http://www.linuxdevices.com/articles/AT7751365763.html

    Without knowing your exact parameters though, it's hard to debate any specific advantages.

    1. Re:This article was written upon 2.6 release by ThePhilips · · Score: 1

      Oh yeah. The article mentions the Just Say No: No Keyboard, No Monitor, No Wires. That was really bothersome in 2.4 times that kernel couldn't be used without video and keyboard.

      Framebuffer in 2.6 is really cool, compared to old 2.4 times when it was doing some weird things without possibility to change the hardcoded behavior. We had the fun with 2.4 when due to driver problems, embedded system was mixing up LCD screens: touch screen was actually showing Linux console. [N.B. reaction of manager who first witnessed the bug was surprising - he wasn't surprised at all. He was seeing Linux console and knew that system was running Linux so having instead of touch screen Linux console appeared to him absolutely OK]. IIRC we had to use trick with fbmem to avoid that happening on target system.

      --
      All hope abandon ye who enter here.
  8. iptables and more? by pipatron · · Score: 3, Insightful

    Well, I don't have that much experience with 2.4, and how much is 'backported' from 2.6, but IIRC you can use better IP filtering tools in 2.6. And are all drivers for various hardware written to work with 2.4 as well?

    It doesn't sound like you use linux hardly for anything else than for using the drivers for the NIC, so if your system works now, then there's probably no explicit reason to change. What I would worry about though, are your future needs. Even if you don't need to upgrade now, it might just be the perfect time to do it.

    --
    c++; /* this makes c bigger but returns the old value */
  9. Re:GCC 2.95? Seriously? by Brane2 · · Score: 3, Interesting

    2.95 is/was regarded as a "golden" version for its maturity and stability.

    I'm not certain that newest 4.3x is that much better on small embedded system without SSE and FPU units to be worth a swap...

  10. GCC 4 & linux 2.6 by basiles · · Score: 3, Informative

    I suggest both a GCC 4 compiler (probably gcc-4.2 or 4.3) and a Linux 2.6 kernel (perhaps at least 2.6.25) with a fairly recent (ie 2.6 or 2.7) GNU libc Indeed, all this perhaps uses a bit more RAM, but you'll have more RAM than before, and it bring a lot of important functionalities & improvements (including bug fixes). If you need a specialized HTTP server, consider GNU libmicrohttpd Regard & Happy New Year 2009

  11. What kind of chip you got there, a Dorito? by bobv-pillars-net · · Score: 1
    --
    The Web is like Usenet, but
    the elephants are untrained.
  12. Better stick with the old and proven 2.6 by Anonymous Coward · · Score: 1, Informative

    http://www.linuxdevices.com/articles/AT7751365763.html

  13. 2.4 is not developed by Anonymous Coward · · Score: 3, Insightful

    Since first 2.6 release, most of the developer force is gone from 2.4. Although officially they "support" 2.4, expect the support to be practically nonexistent when you bump into problems. No one should have even considered using 2.4 for the last couple years now. It is simply too risky.

    1. Re:2.4 is not developed by richlv · · Score: 1
      --
      Rich
    2. Re:2.4 is not developed by Anonymous Coward · · Score: 0

      I doubt that many developers even have such hardware anymore that would boot properly with 2.4 kernel... It is very hard and untempting to try to fix such bugs.

      I have held cciss (both hardware and the support for it in Linux) in high respect by the way. It's a bit shame if no one bothers to even take a look at that bug.

    3. Re:2.4 is not developed by TheLink · · Score: 1

      You appear to have missed an important point - the hardware boots properly on at least one older 2.4 kernel.

      The sort of people who intentionally stick with 2.4.x would really want their old hardware to continue working with 2.4.x.

      They're not trying to upgrade to 2.6 only to find that 2.6 doesn't support their old hardware (which reasonable people would accept).

      It's not confidence inspiring given it's already been about a month and there's no response from any developer. Not even a "WONTFIX".

      --
    4. Re:2.4 is not developed by richlv · · Score: 1

      oh, that's understandable. but see, i'm willing to test various kernels, revert/apply patches... if only somebody would have told me that could help any.
      i tried to find exact kernel version that broke cciss support, but, as you can see, i only managed to nail it down to several versions.

      of course, to make things harder, there were quite some updates to cciss code during that time :)

      --
      Rich
  14. Just say no to backporting (go with 2.6!!) by cfriedt · · Score: 3, Informative

    If you foresee needing to periodically update the firmware to along with a library or app, then I would say a definitive YES - use the 2.6 kernel (assuming your device is supported).

    It might also be the case that the board you would like to use is not supported in the 2.4 kernel if it's new enough - kernel developers usually don't want to waste time backporting their code if they can avoid it.

    Which introduces the most important issue - backporting is a PITA!! To make a long story short, if you need to track a library or app, such as an embedded JRE, or a hardware interface that requires a kernel module inserted, playing catchup and needing to backport at the same time is an awful game of one-step-forward two-steps-back. Avoid it at all costs. Backporting is not always guaranteed to work!

    The 2.4 kernel has a slightly faster boot time, while the 2.6 kernel has so many improvements that it's hard to shy away from. Do yourself a favour and go with a stable 2.6 kernel.

  15. Embedded in volume or just custom? by Kjella · · Score: 2, Informative

    If you're doing embedded systems in mass market volume, it's a matter of hardware requirements and cost per unit. Then potentially staying with the 2.4 kernel may be a good choice. If what you're making is a small volume custom setup, I'd go with whatever is getting the most use and the most testing now, which is definately the 2.6 kernel.

    --
    Live today, because you never know what tomorrow brings
    1. Re:Embedded in volume or just custom? by ThePhilips · · Score: 2, Informative

      What you are talking about???

      2.6 supports more hardware that 2.4 - especially embedded hardware. Several architectures in 2.6 (ARM, PPC) went through restructuring to allow easily add another board/module support.

      And more importantly - for "mass market" - with 2.6 you also get much much better support from hardware vendors. In 2.4 times market was only heating up. Now, in 2.6 times, the embedded Linux market is full swing. You would be hard pressed to find H/W vendor who doesn't support Linux now - but only few of them do support 2.4 now.

      If you're doing embedded systems in mass market volume, it's a matter of hardware requirements and cost per unit.

      If you are talking about memory consumption, then think again. In past years I haven't seen embedded system with less than 64MB RAM. When I asked "isn't it expensive? we can run on less RAM." I got a response that when buying in any kind of volumes, 32MB or less vs. 64MB make pretty much no difference. Cheap RAM is dirt cheap nowadays.

      Add here fact that 2.4 has numerous problems in its virtual memory implementation, meaning that on less RAM 2.6 would run better than 2.4. And do not forget that in 2.6 kernel is truly modular - you can't remove I believe only PCI bus support, rest is optional - you can further decrease kernel image size and its memory footprint.

      --
      All hope abandon ye who enter here.
    2. Re:Embedded in volume or just custom? by Anonymous Coward · · Score: 0

      A couple more that nobody mentioned:
      -eXecute-In-Place: if you have more memory-backed flash (or ROM) than RAM, you can force the kernel to execute binaries directly out of the flash memory rather than copying it to RAM first. The device has to be addressable by the memory bus (these are the "Memory Technology Devices" in the kernel drivers) (ie, not a flash card on an IDE controller or USB bus or whatever else), and the flash filesystem (obviously) can't be compressed.
      -initramfs and tmpfs: if you DO have more ram than flash and your embedded device doesn't need to edit/store data, this could allow you to eliminate the overhead of the block device layer entirely. The initramfs image is also merged in to the kernel, giving a single file to distribute without having to create a separate disk image.

    3. Re:Embedded in volume or just custom? by ThePhilips · · Score: 1

      eXecute-In-Place [...]
      initramfs and tmpfs [...]

      OMG, this was like eternity ago so I have forgotten. And the special layer to allow file systems to span multiple flashes (forgot the name).

      Though ggp was trying to make a different point and I have forgotten to spell out my counter-point clearly: with 2.6, where you have more drivers and support for more boards/modules, you are not dependent on single hardware vendor. In mass markets, this is actually huge problem because over time, price for components (CPUs, SoCs, etc) actually goes up. Price curve starts at some high point (initial release, initial price) then relatively quickly goes down (as order volume increases) and then after some time starts slowly going up (as producers switch production to new components). If you plan to market your product for longer than ~5 years, to maintain low price, you either need to buy all components in advance or plan migration to new components after couple of years.

      --
      All hope abandon ye who enter here.
    4. Re:Embedded in volume or just custom? by Anonymous Coward · · Score: 0

      If you use an ATOM-CPU, I'm pretty sure you will have a few MBs of RAM and flash, so the "cost per unit" point isn't valid. It would be for a platform with for example C167 12Mhz or something similar.

  16. Premption, responsiveness by Thomas+Charron · · Score: 2, Interesting

    The largest benny for an embedded system with 2.6 is timing, really. The kernel is now, for the most part, 'almost' totally preemptable, bring sort real time to the kernel. Additionally, using RTAI Fusion, you can get hard real time. RTAI extensions have phased out support for the 2.4 kernel.

    But one would have to ask, I suppose. If your just replacing a legacy component with the same thing, why change the code?

    --
    -- I'm the root of all that's evil, but you can call me cookie..
    1. Re:Premption, responsiveness by andreyvul · · Score: 1

      Almost?
      What about -rt patches?
      THe problem I see is that they are stuck at 2.6.26.*, you'll have to backport stuff from 2.6.27 and 2.6.28.

      --
      proud caffeine whore
    2. Re:Premption, responsiveness by NekoXP · · Score: 2, Insightful

      Linux kernel preemption is about as far from real-time as you can get. It's not even in the same ballpark.

      RTAI extensions do it right; it's real, real-time, although still not basically only in the parking lot outside the same ballpark. Which is as close as you need to be to HEAR the game anyway.

      I don't think the guy is particularly looking for real-time support here. Pulling data over PCI-X then pushing it over a Gigabit LAN doesn't seem like it needs more than driver support. The Atom will no doubt be faster at it than his previous hardware. I'd say move to 2.6 just so you can run 2.6 and enjoy further development by someone other than yourself. Some parts of 2.6 got relatively less efficient over time (I can't say I particularly see any benefits in real-world use from the "completely fair" schedulers, for example) but in the whole driver support and general stability should be fine.

      I'd stick with a kernel a few revisions back though. Don't jump in to 2.6.28. Try 2.6.25 or 2.6.26.

    3. Re:Premption, responsiveness by Thomas+Charron · · Score: 2, Informative

      The -rt patches do NOT a hard real time kernel make. Here's the difference. One says, 'I SHALL be called at EXACTLY this time', the other one says, 'make sure I'm called BY this time'.

      --
      -- I'm the root of all that's evil, but you can call me cookie..
    4. Re:Premption, responsiveness by Thomas+Charron · · Score: 1

      I'm thinking your right, he may not need it. That's why I was saying he may not need to really change much at all.

      Personally, I'd use whatever kernel the board support kit suggests. If there is no BSP, then whatever the version that the patches for the given ARM core is supporting. Aka, I wouldn't personally use anything not in the mainline kernel. However, this may not be possible, depending on the processor. Not all ARM processors are created equal, as each vendor can ad many things to the processor besides the ARM core itself.

      --
      -- I'm the root of all that's evil, but you can call me cookie..
    5. Re:Premption, responsiveness by NekoXP · · Score: 1

      If he's moving to Intel Atom the best place to be will be the kernel that had the support for the chip when it came out.

      Running 2.4.x kernels on Intel Atom - before decent ACPI support, before the power management support for these chips, before a hell of a lot of modern chipset support especially for Intel 945 and PCI Express hit some level of maturity - is bound to be an absolute nightmare.

    6. Re:Premption, responsiveness by Thomas+Charron · · Score: 1

      From the original post, the device he's communicating WITH is an Atom. The target processor to collect the data is an ARM.

      --
      -- I'm the root of all that's evil, but you can call me cookie..
    7. Re:Premption, responsiveness by NekoXP · · Score: 1

      From the original post, he has an XScale board running 2.4 and wants to drop the "ARM-based custom board" (which is what an XScale would be) to move to Atom, and thinks he will need to generate a new toolchain and ramdisk etc. to do it.

      If he was running ARM again why would he need to update anything? The toolchain and userland would be identical unless he's moving to a wildly different ARM core, and if that was the case, why is he worrying about Atom in the first place?

      I don't think he really made it clear, but with what he did say, I think he's talking about moving CPU architectures, but wants to know if he should stick with the kernel version he's already running. Since moving CPU architectures implies having a kernel that supports that architecture, whether he moves to ARM or Atom at either end means picking a kernel more modern than a 6 year old one with 6-year-old Xscale support..

    8. Re:Premption, responsiveness by Thomas+Charron · · Score: 1

      That's what I get for not going back and rereading, and instead relying on what I thought it said a day or two later. :-D

      You're totally right now that I've actually reread the original story. And after thinking about it, I'm going to assume that even soft real time wouldn't be a requirement for him based on the fact that the Atom doesn't have peripheral support that would infer you'd need it, such as SPI, Analog/Digital In/Out, etc.. (GPIO pins don't count!).

      --
      -- I'm the root of all that's evil, but you can call me cookie..
  17. Go 2.6 by digitalhermit · · Score: 4, Informative

    Lots of the improvements to 2.6 have probably been added to 2.4, but many come "native" to 2.6 so no outside patches are required. For example, kernel pre-emption, better scheduler, etc.. There are other intangibles too such as development time, testing, new toolchain, etc.., but you're already moving to a new processor and you'd have to do that anyway.

    Sometime last year I was rebuilding some antique MIPS-based Linux from a 2.4 to a 2.6. Almost everything in the userspace was effortless (though much of it was based on Busybox); the main issue was related to some in-line assembler that took a while to figure out what it was doing. Once I did, I googled it and realized someone else had already solved a year or so ago.

    So in short, no real benefit to sticking with 2.4 IMHO.

    1. Re:Go 2.6 by DaveV1.0 · · Score: 1

      Something that is an improvement in the server and/or desktop world may not be an improvement in the embedded world.

      --
      There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
    2. Re:Go 2.6 by Anonymous Coward · · Score: 1, Informative

      Granted, but I'd think that for an Atom-based system, a tickless kernel would be a significant improvement. Of the generic improvements, the new scheduler might make a difference.

      Other improvements that benefit embedded systems in general, but may or may not benefit the OP's use case, are: asynchronous IO, pre-emption and real-time support (although not yet fully integrated in the main tree), MMU-less operation (obviously not relevant here).

  18. Constraints by LS · · Score: 2, Interesting

    Others in this thread will adequately cover the feature differences between 2.4 and 2.6, though it sounds like 2.4 already covers your needs when it comes to functionality. This makes your question more of a management one than an engineering one.

    With these types of decisions you need to look at what your constraints and requirements are, whether they be time, developer resources, product lifetime, estimated lifetime of leveraged technology (kernel 2.4 in this case), cash, etc. It sounds like you'll be doing the development yourself, but otherwise I can't tell what the rest of cycle looks like, so you need to clarify these things before making a decision.

    Those are major considerations, but it gets more subtle when you consider things like how much time you'll save with future updates due to better development tools and support with a new kernel, etc., so you need to estimate also whether the time you spend up front will be saved down the line.

    LS

    --
    There is a fine line between being a cultivated citizen and being someone else's crop. - A. J. Patrick Liszkie
  19. What do you want? by RedWizzard · · Score: 4, Interesting

    So far all the positively moderated posts have advocated 2.6. Here's a slightly contrary view. You know 2.4. It seems to satisfy your needs. Why exactly are you considering change? Is there something 2.4 doesn't do that you want? I realise you might be asking in case there is some improvement that 2.6 may possibly provide that you've missed, but if the current setup does what you need then why would you even consider a change? My advice: stick with 2.4 unless 2.6 provides something additional that you definitely need.

    1. Re:What do you want? by Anonymous Coward · · Score: 0

      I'm with him --^.

                If I were doing this, I would try a quick 2.6 kernel + newer gcc, if you run into problems, go back to 2.4 + gcc 2.95. Your code works, the device does what you need, many of the new things you probably won't be using (I mean, ok, maybe it has support for more sata cards -- if you aren't even using sata who cares? An improved scheduler won't matter if you are running 1 process. Improved disk I/O -- well, if it's diskless it doesn't matter. And so on). If you can move to a more modern kernel + toolchain painfree, go ahead. If it's not painfree, don't, 2.4 is doing what you need. What everyone says about 2.6 adding all this stuff is true, but if you're not using it it's irrelevant.

                I've seen devices running a *2.2* kernel, and that was fine.

  20. I'd migrate, but... by SamuelRobinson · · Score: 2, Insightful

    There are some pretty compelling reasons to migrate, but looking at your specific application most of my favorite reasons don't apply. Since you're going to be changing your toolchain somewhat, the 2.6 migration isn't going to be that much more invasive. My reasons for wanting to change have mainly to do with filesystem improvements and USB improvements, which don't seem to have much traction for you. I'm assuming that you did your own hardware drivers for the PCI express data collection, so that shouldn't be a particularly big deal, except for having to redo for new hardware, which you have to do anyway.

    So, like I said, I'd migrate but if you need to continue work with the old device for some reason I could see an argument for a continued freeze. The biggest downside to this is the larger jump you end up doing in another few years when you need to migrate for real functional reasons to some later kernel. It's always seemed easiest to me to embrace the opportunity to migrate if it makes reasonable sense.

  21. scheduling by Anonymous Coward · · Score: 0

    scheduling algorithm and scheduling policies are so much better in 2.6 (especially since CFS appeared mainline in 2.6.23)

    seriously, don't even bother with 2.4

  22. Re:XFS by Anonymous Coward · · Score: 0

    Why the hell embedded system needs XFS or ext3?
    Why the hell embedded system needs FS at all?
    You don't do embedding very often, do you?

  23. Re:GCC 2.95? Seriously? by NoMoreFood · · Score: 3, Informative

    GCC 3.4 is quite outdated. 2.95 is just plain old. Why not code in Fortran while you're at it?

    My development group is also stuck with gcc 2.9x series because it's only compiler our toolchain maker (WindRiver) supports for VxWorks 5.X. I'm guessing he's in a similar situation. I can't complain though -- we've never had an issue with it.

  24. Re:GCC 2.95? Seriously? by Anonymous Coward · · Score: 2, Informative

    This system is based on an Intel Atom CPU, so it does have SSE and and FPU.

    For the main architectures (x86, x86-64, ARM, and maybe PowerPC), GCC has been getting significantly better with each release. For less well-supported architectures (like Hitachi's SH series, an uncommon embedded CPU, or really old architectures like 68k), there's usually an older version of GCC that works better than the current ones.

    Given that this is a new(ish) CPU, newer versions of GCC are going to support it much better than older ones.

    From a kernel point of view, it's likely to be easier to get everything running on an Atom board under Linux 2.6 than 2.4, simply because 2.6 has newer drivers.

    However, the application itself may not compile correctly with GCC 4, or may compile but have incorrect behaviour. Changing the C compiler is one of those things that's probably not worth the effort unless you have to, or you have a decent test suite and a good idea of how all the code works.

    Of course, given that this is C, not C++, there's no reason you couldn't run Linux 2.6, compile everything except the app itself with GCC 4, and then compile the app with GCC 2.95.

  25. New thread scheduler by Spy+der+Mann · · Score: 2, Informative

    If you want to minimize latency in your applications, chances are you'll like the new scheduler implemented in 2.6.23 and following. In general, 2.6 has better support for realtime (low-latency) applications: http://www.ibm.com/developerworks/linux/library/l-real-time-linux/index.html

  26. I misread the opening sentence of the article, as by ErkDemon · · Score: 4, Funny
    "My 6-year-old's embedded software happily runs on kernel v2.4 on an XScale CPU. ..."

    I thought, aaaah, he's built a robust linux PC for his kid. But isn't insisting that his kiddy's first PC has a bang-up-to-date GCC compiler a little extreme?

    Then I re-read it. Oops. Makes much more sense now. Not as cute, though.

  27. Times have changed... by Anonymous Coward · · Score: 1, Informative

    My company also has an XScale board which interacts with an FPGA for data collection. When the project first started it ran 2.4 (along with GCC 2.95) and generally sounds very similar to what you're doing.

    Things have come a long way in the embedded Linux world since that time. Besides the TONS of additional features present in the the 2.6 kernel, I'm fairly certain you'll find that the vast majority of device vendors are only going to be writing drivers for the 2.6 tree. If you're upgrading to a new board I doubt you have a choice. Be comforted though, 2.6 is great (even for embedded XScale processors).

    Your comment "This implies that I'll need to re-create a Linux RAM disk from scratch along with the tool chain" seems reminiscent of the old days where building cross compiling toolchains was a marathon. I highly recommend checking out Crosstool-Next Generation and OpenEmbedded if you're looking for the current state of the art in embedded Linux.

  28. Yes if you have time and patience by Anonymous Coward · · Score: 2, Interesting
    I constantly port the kernel and distributions for custom embedded designs for new and old hardware. It is really painful.

    To go to 2.6 you have to rewrite ALL your custom drivers and the board configuration files. Yes is nicer in 2.6 - but it still has to be done. Just like we did in 2.2, 2.4 and probably again for >= 2.8.

    It is a real pain that the kernel and apps change so rapidly. You regularly run into compatibility problems with:

    1. Host GCC supporting target tools
    2. Host Linux distribution supporting target tools
    3. Libraries for the target
    4. Dependencies - bloody dependencies

    I recommend:

    1. Get a new harddisk with a fresh distro for the build machine.
    2. Different login for every board type with its own CROSS_COMPILE exported in .bashrc. Stops accidental bad ROM builds.
    3. Use TFTP and NFS root - they are your friends.

    The port from 2.4 to 2.6 can take 2 days to 2 weeks. If you can afford 2 weeks go for 2.6.

  29. I'd split the difference by Waffle+Iron · · Score: 5, Funny

    ... and go with the 2.5 kernel.

    1. Re:I'd split the difference by Anonymous Coward · · Score: 0

      ... and go with the 2.5 kernel.

      And this was modded "interesting". Creepy.

  30. Go with 2.6 by e4m · · Score: 1

    If you plan to modernize your toolchain and overall build process, I'd strongly encourage you to get the latest 2.6 source. Otherwise it's a wasted effort IMO. Updating everything together will get you another 6 years. Only updating partially (2.4 kernel with new build tools) may not buy you that much time.

  31. If you have space and memory for it by Nelson · · Score: 1

    I'd go with 2.6. I doubt there are any features that will substantially change anything, it does get you a bit closer to "main street" though should you start adding new stuff.

  32. glibc and embedded by Anonymous Coward · · Score: 1, Insightful

    I have done a few embedded systems using the Linux and uClinux Kernel. A couple of things to note:

    Embedded tends to avoid glibc in favor of uClibc (www.uclibc.org). It is not full featured but it is a lot smaller.

    When selecting a version of GCC and kernel, look at who has already has a running system for your board. You probably don't want to go through the effort to get gcc-4.2.x cross compiling and building your system if somebody already has 4.1.x doing the job.

    I would take a look at buildroot http://buildroot.uclibc.org/ and see what options they have out of the box. As an engineer it is easy to want to pick the newest, most feature full version, least bugs version available and call it the "best". Remember though that one of the features is the cost and time to get it running. Your boss will not be impressed if you spend two weeks getting the newest kernel running on the board because it has fixes to sub-systems you don't use; when you could have used older kernel and had it running in an hour.

    Also, keep in mind with this board, Ram and Flash cost money. If you are building a large number, the smaller kernel and flash disk are better from the cost/unit. If you are building a small number, the cost to cut you image down in size probably is not worth it.

  33. Drivers by Anonymous Coward · · Score: 0

    In my experience your choice will be down to drivers, namely these two concerns:

    1. Since you are porting to new hw, you will have to deal not only with new arch, but also with getting all the peripherals to work, and you get better chance at that with newest kernels.

    2. If you keep some custom hardware or protocols implemented in kernel modules you'd need to port your drivers, which will take much longer for 2.6 than just arch switch.

    Overall I think your idea to switch to modern x86 is quite valid. Granted I don't know your requirements like cost, quantity, time, but I find it easiest to get a cheapish workable x86 platform, stick in standard kernel, a familiar distro, start coding your stuff in a scripting language and worry about the rest only when you know you have to :)

  34. I recommend: upgrade. by rew · · Score: 1

    2.6.x has a slightly larger footprint. But as you're moving to a modern platform probably with quite enough RAM, I'd say that's not a problem.

    I wouldn't do it for the features others are recommending: You have your embedded app, which already runs on 2.4, it will still run on 2.4.

    However, you might encounter problems with support for peripherals on 2.4, so just going for 2.6 will be less painful.

    I recommend staying with what you have, unless prodded, like now, and then doing a catchup to the most recent stuff.

  35. Re:XFS by ardor · · Score: 1

    MP3 players, set top boxes, cellphones, digital picture frames, etc. require a FS, for example.

    --
    This sig does not contain any SCO code.
  36. God speaks ForTran IV by Anonymous Coward · · Score: 3, Funny

    And the Hebrew translation of the bible does it injustice.

  37. 2.6. See our Space Station project by slashbart · · Score: 4, Informative

    Hi

    We moved our project from 2.4 to 2.6 during development, because the maximum interrupt latency of 2.6 is so much better. We needed to handle UDP packets within 20 ms. max and occasionally on 2.4 we would have a 60 or more. Going to 2.6 solved our problems immediately, even with early versions.

    See this Linux Journal article for more details on our project http://m.linuxjournal.com/article/7190

    Bart van Deenen

  38. linux2.4 is NOT proven on Atom by nchip · · Score: 4, Insightful

    or better to stick with the old and proven 2.4?

    Linux 2.4 might be "proven" on your old Xscale system, but I doubt anyone else has even _tried_ to use Linux 2.4 on something as new as Atom. Linux 2.4 will also lack support for any of the peripherals of your Atom com module.

    --
    signatures pending - ansa@kos.to - (dont mail there)
    1. Re:linux2.4 is NOT proven on Atom by wtarreau · · Score: 2, Informative

      Atom is just plain x86 with HT. Nothing fancy, nothing new. Drivers for rare hardware might cause problems though, but that's true with any kernel. I would have worried if the guy wanted to switch to an exotic architecture but that's definitely not the case here.

  39. If it ain't broke... by shadoelord · · Score: 1

    You know the old saying; if it ain't broke, don't fix it. Is this a personal project? Are you going to have any serious down town moving between the two kernel bases?

    I know I'm going to be unpopular for this one: Linux isn't a good operating system for all embedded needs. We're swapping out some of our main product lines from Linux (macrokernel) to smaller and more efficient microkernels.

    --
    this is my sig, there are many like it, but this one is mine.
  40. Stay with GCC 2.95 by Anonymous Coward · · Score: 0
    I have got two PCs here:
    one is a 5 year old one with kernel 2.2, GCC 2.95.3, and a Suse 7.1 distribution
    the other one is a brand new one with kernel 2.6, GCC 4, and Ubuntu 8.10
    otherwise the hardware is comparable.

    I'm tell you guys: the old PC is so fast, it's a completely different experience!

    I don't know which great new features there were put in the last 5 years, but everything has gotten so bloated and slow, oh my god!

    1. Re:Stay with GCC 2.95 by Lally+Singh · · Score: 2, Informative

      If you want people to stay with old code to run on their boxes, please leave GCC out of the mix.

      GCC's had two major improvements over the versions:

      1. Better language compliance. It matters *a*lot*. And frankly, you're not going to win an argument against that on a techie forum :-) This included a new hand-written C++ parser in g++ ~3.4 that closed out over 100 bugs at once. You don't ignore hand-written C++ parsers, they're complete bitches to do.

      2. Better optimizer.

      As for any library bloat, the basic C/C++ libraries are shared by nearly everyone on your system. You pay for them exactly once per running system (minus templates, but I don't know of anyone using template-heavy code on a normal Linux desktop installation).

      If you were running Solaris, I'd just tell you to dtrace the system and find out what's making it slow. But, no, *sigh*,

      --
      Care about electronic freedom? Consider donating to the EFF!
  41. Obvious by asciiRider · · Score: 1

    Ummmm...

    If it aint broke...don't fix it.

    Take your time - you're lucky - you have no real reason to rush. What you have works. Ask around (you're doing this now) - try it out. Run parallel for a while in test. Then make a nice easy switch when you have no more questions...

  42. Re:XFS by andreyvul · · Score: 1

    No FS?
    Then where the hell do you store the data?
    Even page offsets for files/directories for a NAND flash is a file system (very crude, but still, a FS).

    --
    proud caffeine whore
  43. Rule #1 for computing, embedded or otherwise by Gorshkov · · Score: 1

    If it ain't broke, don't fix it.

    1. Re:Rule #1 for computing, embedded or otherwise by Svartalf · · Score: 1

      They're already breaking it by going to a new cpu arch on the platform.

      --
      I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  44. 2.6 definitely for networking performance by AaronW · · Score: 1

    I recently upgraded a piece of equipment running a Freescale 8270 that does something similar from 2.4 to 2.6.17 and the networking performance improvement was very significant. If you need better performance and lower latency, 2.6 is definitely the way to go. The old 2.4 kernel had been significantly hacked up as it was to improve performance which resulted in higher latency. The networking interrupts killed the performance unmodified. We now plan to upgrade two other CPUs from 2.4 to 2.6 after seeing these results. A lot of hacks were made to the 2.4 kernel that were no longer required for the 2.6 kernel, though I did have to port a couple kernel modules and I modified the 8270 network driver to handle NAPI.

    --
    This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
  45. Re:GCC 2.95? Seriously? by AaronW · · Score: 2, Interesting

    I have had issues with the VxWorks GCC 2.95.3 on several occasions when the compiler generated incorrect code resulting in crashes and lockups. The C code was correct, but the resulting MIPS assembly was incorrect. Each time, making slight changes to the C code would fix it, i.e. replace a for loop with a while loop. I say good riddance to VxWorks. The memory management in VxWorks 5.4 was atrocious and had to replace malloc with DLMalloc plus add a method of tracking memory usage on running systems (marking each memory block with the task and caller PC) so we could find and fix memory leaks on systems out in the field. The networking was also pretty bad in it.

    --
    This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
  46. Linux 2.6.x is fine with some tweaking by sega01 · · Score: 1

    2.4.x might be a tad bit lighter, but 2.6.x can be very small with proper tweaking. 2.6.x should be noticably faster too. 2.6.27.x runs great on my 486 (16MB RAM), even with a stock kernel for my Arch Linux fork. Be sure to enable CONFIG_EMBEDED and take a look in kernel hacking :-). Cheers!

    1. Re:Linux 2.6.x is fine with some tweaking by Anonymous Coward · · Score: 0

      Thank you. I have to upgrade PPC boxes from 1997 that do data acquisition adn control jobs here. Most only have 16MB of RAM and run at 200MHz with Linux 2.2.12, they are fairly beefy for their time (128 bit memory with ECC since a wrong control command could stop us for months and cost millions of Euros to fix, so I have to be very careful).

      Changing the boards would be very expensive (VME boards with ECC memory are) and they have had stellar relialibility but I'm going to try 2.6.28 soon. They do some computations and use moderate network bandwidth (20Mb/s) with root on NFS but don't have USB nor anything with large kernel drivers.

      Of course the main application is locked in memory so once it has booted I can shutdown/reboot the disk server while the critical systems continue
      without skipping a beat.

  47. Re:XFS by Svartalf · · Score: 1

    Embedded systems encompass a LARGE range of systems. Some of those systems need a filesystem (such as an MP3 player or a NAS server...), some need them less, but it makes some tasks within the space easier.

    Not all embedded systems are PICs or similar. Your mobile phone is an embedded device, but I'd shudder to try to code that all with "traditional" embedded techniques and practices. Same goes for a whole host of things that are considered to be embedded.

    --
    I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  48. 2.6 by jonored · · Score: 1

    I'd swap over to 2.6 if you're swapping to a COM Express module - I'd worry about support for PCIe and devices based on it in 2.4, and the whole point of COM Express over other board designs is to get PCIe and other differential signaling. Also, 2.6 runs snappy on 64MB ram and a 300MHz PII - I don't remember seeing any COM Express modules with worse specs than that, and /certainly/ not an Atom-based one. Unless you're doing something very peculiar, the ~3MB of a 2.6 kernel on disk shouldn't hurt either; the small on-board disks for those modules I'm remembering being 512MB.

  49. Linux 2.6 is a likely candidate... by Svartalf · · Score: 2, Interesting

    As someone facing a similar situation at his day job, 2.4 is painful in some regards. In my case, 2.6 allows me to do a non-standard initramfs (the stock is minimal and then you can load other initrd or initramfs images from the kernel options...) so that I can tapdance around the three differing hackish bootloaders they did in 2.4. This allows me to do major cleanups in what they did for doing NFS rootfs on the IXP2800 blades and on the X86 ones with minimal pain.

    Most of the people commenting on 2.6 being too big are thinking of the whole size with everything loaded up. Minimal kernels with just your drivers loaded and only your drivers in the module build, you end up with only about 5-10% increase in footprint in memory and store space, with the ability to provide modern device support for things. In the case of what you mention, you're moving to an Atom based machine board. Given that you're moving to a modern board, the odds of things being "nicely" supported is lower with the 2.4 kernel.

    Since you're manipulating large volumes of data over GigE, you're going to want to switch, probably even with the old ARM stuff if you can manage it. 2.6 provides much more responsive networking performance (so long as you do your network code right and don't dink with the scheduler (heh...let's just say I corrected a not so good idea there recently...)).

    You may have to port a few custom drivers over to 2.6, but in the end, it'll work better since the driver architecture is better in 2.6.

    --
    I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  50. I'd suggest doing both, one at a time. by wtarreau · · Score: 2, Interesting

    Well, it's not wise to change both the hardware and the software at the same time. You think it will reduce your time to market but it might increase it instead due to the numerous changes that will have to happen in your toolchain before getting anything barely working again.

    From what I understand, you have a big experience in 2.4 and Xscale. 2.4 Also works on x86, so you'll not have to re-learn everything from scratch by just changing the architecture. All your toolchains, boot scripts, packaging scripts, etc... will still work as they did before. Then, only once you get familiar with your new architecture and the minor changes you might observe in the boot sequence, build process etc... it will be the right time to evaluate a migration to 2.6. Once you put your finger there, you'll quickly discover that you need to upgrade your gcc, glibc, replace modutils with module-init-tools, experiment with hotplug and sysfs, maybe switch to udev, etc... Step by step you'll notice a big number of changes, but you will be able to proceed one at a time, which is not possible if you change the soft at the same time as the hardware.

    Also there are other aspects to consider. 2.4 has been maintained for a very long time, and you're probably used to backport some mainline fixes to your own kernel from time to time. 2.6 is not maintained that long (avg 6 months), and changes so fast that you will not be able to backport fixes for many years. I'd strongly recommend to start with 2.6.27, because Adrian Bunk will maintain it for a long time, as he did with 2.6.16. Once 2.6.27 is not maintained anymore (in about 2 years) you'll have to decide whether you stick to 2.6.27 and try to backport fixes yourself or switch to 2.6.36 (just a guess).

    Also, 2.4 accepts almost no new hardware nowadays. If your new platform works well, that's fine, but how can you be sure that next year your GigE NIC will not change to something not supported anymore ?

    I would say that the only case where 2.4 would make sense for a long term starting from now is if you don't have the time to revalidate 2.6 or to wait for 2.6.27 to stabilize, and need to quickly release something which will sit at your customer's in a place where it cannot be upgraded. Something like "install and forget". But I don't feel like it's what you're looking for.

    So, to summarize :
          1) switch your architecture
          2) switch your kernel

    Whether an official release of your product exists between 1 and 2 is just a matter of your time constraints and customer demand.

    Last, to show you you're not alone, I'm too considering switching our products to 2.6, but next release will still be 2.4. Too many changes for a short-term release, and 2.6.27 not ready yet to reach years of uptime (but it's getting better though). 2.6.25 was particularly good but not maintained anymore.

    Hoping this helps,
    Willy

  51. Re:GCC 2.95? Seriously? by Lord+Kano · · Score: 1

    You comment belies a certain lack of knowledge. There is quite of bit of new development being done in FORTRAN today. Especially in heavy industry. Old VAXEN and Alphas are still in use with programs that were originally coded in DEC FORTRAN. When someone needs to add new functionality, it's typically written in the language used for the rest of the system.

    LK

    --
    "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
  52. Only make changes that have good business reasons by chafey · · Score: 1

    Nobody can answer your question if it is worth it to change operating systems because we don't understand your business. All changes have an associated cost and that must be measured in terms of value to the business. You claim to have a technical reason for changing CPUs - but is that backed by a justification for the business? I will assume so, but part of our responsibility as a professional is to always keep the business's best interest in mind.

    Your second question about what you will gain or lose is definitely appropriate because that gives you the information you need to make the business decision. While everyone likes to use the latest and greatest, doing so does not always make the most business sense. Good luck!

  53. Re:I misread the opening sentence of the article, by Anonymous Coward · · Score: 0

    You'd ask a 6 year old to write SIMD code by hand?
    You cruel person.

    Updating to a bang-up-to-date GCC with automatic vectorisation means less crying, and no more endless arguments about who broke the inline assembly.

  54. Awesome! by empaler · · Score: 1

    I had completely forgotten about my near-useless Qtek 9100 (same as HTC Wizard, the slight difference being the casing, colours and market)
    Is it any good, or is it just as treacle-slow as the Windows implementation?
    Argh, who am I kidding, I'm probably going to dig it up and have a go either way. F/OSS FTW! :-D

    1. Re:Awesome! by miknix · · Score: 1

      I had completely forgotten about my near-useless Qtek 9100 (same as HTC Wizard, the slight difference being the casing, colours and market)
      Is it any good, or is it just as treacle-slow as the Windows implementation?

      Windows Mobile is slow crap indeed, totally useless. If I didn't enjoy myself so much hacking the wizard to run Linux, my QTEK 9100 would be already on ebay.

      Argh, who am I kidding, I'm probably going to dig it up and have a go either way. F/OSS FTW! :-D

      Well.. Good news then. :) Because I'm one of the developers that are porting Linux to the wizard.
      Check out our website at
      http://sourceforge.net/projects/linwizard/

      Here is what is working: USB, Leds, vibrator, touchscreen, keyboard, SD/MMC host.
      We are currently working on GSM and audio.

      We are gathered up at #linwizard @ irc.freenode.net , join us for more details.

      Lets give some utility to that wonderful device with a qwerty keyboard, shall we?

    2. Re:Awesome! by empaler · · Score: 1

      Good thing you answered - I saw that the project home page hadn't been updated for 6 months, so I assumed that it had gone the way of the dodo, like so many other SF-projects.
      I'll try to dig up my Qtek and see where that takes us :)

  55. Speaking from RECENT experience by PingXao · · Score: 1

    As in I'm in the middle of a similar project right now... If you have drivers, go for 2.6 and make it a recent 2.6, like 2.6.26. I was very afraid of kernel bloat when we were considering a move up from 2.4.18, but the hit wasn't as bad as I feared. As others have said, maybe 5 or 10%. That can be a lot depending on your runtime system. How do you save non-volatile variables? Flash? PXE boot? Custom bootloader that boots up with an NFS-mounted root partition? We have found the initramfs boot environment of 2.6 MUCH easier to use than the initrd of 2.4. You don't even need to compile in ext2 to the kernel!

    Toolchains. Toolchains are a GIGANTIC PAIN IN THE ASS. Don't be fooled by people who tell you buildroot, or openwrt or cross-tool are panaceas. They are not. You will have to do major modifications on any of them to fit your particular needs. Having said that, you're much more likely to have early success with a modern toolchain. One that uses, say, gcc 4.1.2 (or even newer). I built gcc 2.something toolchains a couple of years ago. What a nightmare trying to find support/patches/mailing list archived posts newer than a couple of years ago.

    Before I get rambling on too much... I strongly recommend going to 2.6 if your hardware allows it. I also recomment using an OpenWrt-like approach to your toolchain, kernel, driver and application development system. You will have to modify it for your own situation, but having everything reproducible from source in one tree is a definite advantage.

  56. 2.6 by dltaylor · · Score: 2

    I do embedded Linux and have done so on several generations of hardware and kernel.

    There are a lot of slightly incorrect comments here about the size of the 2.6 kernel vs. 2.4. Once you know what your target hardware platform will is, and which subsystems you need, you can tailor a kernel to be usably small by configuring out the parts that you don't need. Don't need USB, or video4linux? Leave it out. Don't use modules, unless you need to control the load order, set parameters, or want to be able to swap hardware platforms, since they take up space in two places (ram disk and kernel memory).

    One of the best reasons that I have for the 2.6 family is the new version of ram disk. You can almost trivially generate a run-time ram disk in the new cpio format, with a tweaked init that doesn't need to go to a disk for root, although some kind of non-volatile storage will certainly be needed.

    It will be harder and more expensive to find really small RAM DIMMs for the Atom. Get a size that will be manufactured for a while. Same thing with your non-volatile storage. On a current project using a commercial board (including a GUI, commercial multi-language font set, media player, and a kernel with modules so we can move to other hardware, as needed), we've got a 512MByte DIMM for the Intel chip set with room to spare.

    Another great reason for moving on is development. Have you tried to run a 2.4-based distribution on computers that you can buy today? It's doable, but painful. If you want to give your developers a (for example) Ubuntu 8.10 distro, which can be easily guested to freeze your build environment, they can run on the same kernel and libraries you do in the target for initial build and test.

  57. Specific features that make 2.6 better than 2.4 by Sits · · Score: 3, Informative

    Your question feels a bit of strange question to ask as surely anyone who has looked would notice a huge difference between the latest 2.6 (2.6.28) and the latest 2.4 (2.4.37).

    Preemptible kernel (so lower latencies are possible)
    Far more devices supported (both in terms of architectures and additional add on devices e.g. SATA support)
    Better scheduler (initially made O(1) scales better under load and then fairer with CFS)
    Task Control Groups
    Better support for threads (schedules them in a more intelligent fashion)
    Strict overcommit
    Massive VM changes
    Tickless/dynticks support
    Asynchronous I/O support
    Introduction of different I/O schedulers (deadline, cfq
    Network stack improvements (faster, better under load e.g. NAPI support)
    epoll support
    Improved ACPI support
    Network filesystem improvements
    Initramfs support

    There is a huge list of Linux kernel changes that happened between 2.4 and 2.5. There is also a good Linux kernel 2.5 changes page on IBM's developerworks. Kernelnewbies has an excellent summary of changes for each of the 2.6 kernels and a 2.5 changes page. LWN is also excellent for kernel news.

    I hate it when people don't bother to state exactly the points they object to. What other changes (not listed above) do you think the question poster wouldn't benefit from? Follow the links to the full lists (don't just use the ones off the top of your head)...

    1. Re:Specific features that make 2.6 better than 2.4 by ta+bu+shi+da+yu · · Score: 1

      Sadly for you the original poster has already admitted to bullshitting.

      But thanks for the info, very informative.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    2. Re:Specific features that make 2.6 better than 2.4 by Sits · · Score: 1

      Point. Plus there is a time problem writing big posts with lots of links in them (I bet no one will even see it). Next time I'll think twice before writing such a post...

    3. Re:Specific features that make 2.6 better than 2.4 by ta+bu+shi+da+yu · · Score: 1

      No, I genuinely think your post was informative and interesting. I currently have mod points, and if I was able to mod in a story I'd commented on I'd give you +1 informative.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    4. Re:Specific features that make 2.6 better than 2.4 by JackieBrown · · Score: 1

      I agree.

      Few times are a single post worth bookmarking.

    5. Re:Specific features that make 2.6 better than 2.4 by Anonymous Coward · · Score: 0

      Yeah but that means slashdot moderation has actually worked, this is truly a momentous occasion.

      Even though the OP didn't know it his post WAS insightful (as proved by GP) the mods did and modded it accordingly.

  58. MMU? uCLinux? by bradgoodman · · Score: 1
    I think the big deciding factor is: "Does the CPU you are going with have an MMU or not?"

    I will explain the reasoning:

    If you have an MMU, it esentially means you can use any kernel, distro, apps, etc. without really much thought involved. Therefore, you might as well use 2.6 for all the reasons aforementioned.

    If you do not have an MMU, it means you more than likely have to/are using uCLinux. uCLinux, is not just a kernel, it is a whole distro. This is largly due to the fact that MMY-less kernels cannot support fork, etc. and all the apps are slightly customized.

    My experience (as of a couple years ago) has been that uCLinux is not quite "up to snuff", and is a little flakey - particularly in support of the 2.6 kernel.

    This may have changed in the past few years, by my experience was that 2.6 was not as well supported in uCLinux as 2.4, and I wound up going with 2.4 just to avoid various complications.

  59. Have you tried bisecting this? by Sits · · Score: 1
    1. Re:Have you tried bisecting this? by richlv · · Score: 1

      thanks, i haven't tried bisecting for a vriety of reasons - first, the machine in question doesn't have git, second, intermediate kernel versions do not even compile.
      but the bug has been picked up, so i'll try to do some more testing with reboots and such :)

      --
      Rich
  60. The Embedded Nightmare LWN article by Sits · · Score: 1

    It may be useful for you to read LWN's embedded nightmare prologue along with the original Embedded Nightmare article. If you have written extra drivers and can get them into the mainline kernel them the benefits of going with a new 2.6 could be big...

  61. Why change by sjames · · Score: 1

    If your software does what it needs to do as well as you need it done, why introduce new variables unless you have to?

    There are a number of improvements in 2.6 (enumerated by others here) as well as drivers for newer hardware, but unless you actually need those features, the gain for you is zero.

    In any event, you're already going through the upheaval of a platform change, that's quite enough for one jump. Once you have everything validated on the new hardware, if you'd just like to move ahead, that is the time. You'll benefit from a known good reference where the only change between it and the new version is the kernel.

    "New is good" works OK on desktop machines. "Well proven" is for the embedded world. Servers live somewhere in-between.

  62. why 2.6? by gillbates · · Score: 1

    I'm not sure why anyone would choose 2.4 over 2.6, except for cases of legacy support. There have been numerous security issues and improvements which Linus has decided not to backport into 2.4. The notion that 2.6 is too heavyweight for embedded systems is just bunk - it will run rather well on cpus as slow as 40 MHz.

    With 2.6, you're going to get the latest drivers, and a lot of important new technologies, especially with regard to things like wifi and USB. While I haven't looked at the Linux A/V architecture recently, IIRC, 2.6 brought a better AV framework than 2.4. (But I don't want to start a flamewar wrt to ALSA/OSS/Whatever, so I'll leave it at that).

    --
    The society for a thought-free internet welcomes you.
  63. 2.6 is memory hungry by magma · · Score: 1

    Basic config of the kernel will require at least 12 MB RAM. I think that if you fiddle with it for a while you can get lower but that is what you should expect. --- If you are using 2.4 kernel you can survive in 4 MB RAM. --- Something to consider. 2.4 was not THAT bad. I mean back then we were all saying how cool it was. :-)

  64. Smaller binaries/environments by Sits · · Score: 1

    There seem to be a few BSD tools with the aim of building smaller collections of binaries in a similar fashion to BusyBox.

    You've mentioned crunchgen but there is also embutils (which can be smaller than busy box but requires dietlibc) and there also seems to be something called beastiebox (which allows different amounts of linking). Finally there is Cauldron which seems to be a collection of tools for creating embedded BSD environments.

  65. Depends on the media by Sits · · Score: 1

    SSDs (or anything that does rotating writes) may defeat some software file shredders.

    The whole residual magnetic domain thing is up for debate with today's disks... In recent years there is apparently so little space and densities are so high very few bits can be recovered. The reasoning for this is that there have been cases where drives have been blanked and vast sums of money have been at stake but the data was not recovered (old Slashdot thread about data recovery questioning if it's possible after one pass). If you have a reliable link saying that this is to the contrary (for modern (post 2003) spinning hard disks) I would really like to see it though.

    1. Re:Depends on the media by setagllib · · Score: 1

      Nope - thanks for the update. SSD will only defeat software file shredders if run through an FTL (which most are, but we should be moving away from this). However if your flash-optimised file system like ubifs does rotating writes then once again a file shredder is useless and will just waste erase blocks.

      Ideally you'd just use block level encryption before writing the data in the first place. For years now it has been very easy to set up a volume manager (lvm, gvinum, ...) over an encrypted volume (device-mapper, geli) over software raid (md, gmirror) on server-class operating systems like Linux and FreeBSD. You get volume management, RAID and encryption, at the cost of entering a password and some ever-shrinking performance penalty.

      --
      Sam ty sig.
  66. network performance with atom by Anonymous Coward · · Score: 1, Informative

    Hi,

    I have been playing with some embedded systems as I have some personal projects with some colleagues to develop an embedded network based sflow/netflow collector. We have been testing a variety of architectures using development products and different tool chains etc. One of the common themes is that we have moved out entire system from 2.4 to 2.6 and newer versions of gcc etc which provided us with as much as 5% improvement in performance with no additional hardware. One of the observations we have found with our system is that the ATOM processors do not seem to be able to push network traffic nearly as quickly or efficiently as the MIPS or ARM based systems. This may well be because all of the ATOM based systems we have tested use realtek interfaces which don't seem to be able to handle the volumes of sflow/netflow we are pushing towards them. When we compare the performance to some of the ARM/MIPS combinations we have tested we get at least 20-40% higher network throughput when compared to the single core ATOM 1.6Ghz processors despite the ATOM having at least twice the raw Mhz. I would highly recommend testing the network throughput if your doing anything that requires bandwidth.

    In the coming weeks I will update this post with a URL with all the information on the tests we have been conducting and the results. Its unfortunate that this post came soo soon before we had the information compiled.

  67. Have migrated 2.4 to 2.6 about 6 months ago by Anonymous Coward · · Score: 0

    I migrated a 2.4 kernel to a 2.6 kernel on an xscale embedded product about 6 months ago. ABout 1 man moths work. What no one here is mentonioning (cuase they are wankers not kernel coders) is that the 2.4 kernel did not have pre-emptive multitasking in the kernel, whereas the 2.6 kernel does. If you have written any 2.4 kernel modules that **really** needs to be taken into account when porting the thing, Else the jump is worth it...

  68. Hardware. by muxecoid · · Score: 1

    I'm not an expert, I compiled Linux kernel only once and not on embedded system. Also I'm good at generalizing. ;)

    Why do people switch to Windows Vista? Windows XP does not support some of the newest hardware. That's it, new OS runs better on new hardware. Why do people use 2.6 kernel on desktops? Old kernels do not support old hardware.

    I know, computational power of embedded devices must be as small as possible to reduce energy consumption, cost, weight, whatever. I know, embedded hardware does not evolve the same way as desktop. But there is something in common. When new hardware comes out driver writers support newest OS first and old ones enter "if time permits" mode. Imagine that next year you device must support USB3 (while everything else remains the same). USB3 driver for new kernel is likely to be developed soon, usb3 driver for 2.4 may take longer. (Disclaimer: I know nothing about usb3, it is just an example).

    Conclusion: Moore's Law is your friend.

  69. Use 2.6 by Thaidog · · Score: 1

    My best friend is a senior developer at Bcom for embedded systems so I get quite an earful about his kernel code. They are using basically the latest Linux 2.6 kernel for various embedded cpus (2.6.21 on PPC, ARM, MIPS cores) He was talking about one of his layer 3 switches that runs one process with 300 threads and still runs like a champ with 2.6. Also, the Atom is not an embedded cpu (per say) and it runs XP fine while even doing video editing on netbooks so I think you'll be just fine with a slightly bulkier kernel. Also, the Atom has HT and 2.6 has much better smp support than 2.4. I would go with the Gentoo advice posted earlier and that way you can transition good and also account for the future when you have to port this thing all over again. Who knows where 2.4 will be at that point.

    --

    ||| I still can't believe Parkay's not butter.

  70. Guidance from Alan Perlis comes to mind by sinewalker · · Score: 1

    Epigrams of programming:

    120 Adapting old programs to fit new machines usually means adapting new machines to behave like old ones.

    ( http://www.pam1.bcs.uwa.edu.au/~michaelw/Perlis_Epigrams.html )

    --
    “Our opponent is an alien starship packed with nuclear bombs. We have a protractor.” — Neal Stepnenso
  71. More 2.4 - 2.6 differences by Sits · · Score: 1

    And for those kind words I'm going to post a follow up to my original post of more relevant changes between the 2.4 and latest 2.6 kernels (I'll try and add a few more words after each point).

    Kernel configuration was overhauled. Outside support for more GUI menus, it now means you no longer have to do make dep after changing something. Further building modules outside the kernel tree is now not so baroque. The time to build and partially rebuild kernels also dropped. Building a kernel in parallel (i.e. using more than one CPU during the build process) works better.

    Better support for configuring out unneeded parts of the core kernel on embedded systems. You can see the seeds of this going mainline in a git commit on 2.5.70. There is an outside project called Linux Tiny that produces patches aimed at being able to configure out features not needed for embedded systems. Over the course of 2.6 many of these patches have trickled into the mainstream kernel.

    I mentioned that 2.6 scales better under load in my previous post. Here are some benchmark comparison graphs of 2.4 versus 2.6 kernels (the graphs also include comparisons against the BSDs but you can see that Linux 2.4 had some serious problems that Linux 2.6 addressed).

    The kernel is now (on systems where there is reliable device discovery) able to automatically load the modules it needs to drive hardware. No more having to adjust static lists of which modules need to be loaded.

    udev was introduced. This change meant that the entries in /dev were no longer static. In 2.4 all possible device entries (even for devices you didn't have) were shown in /dev and their major/minor numbers were fixed (which was causing problems as new devices were turning up - what major/minor number do you give them?). Additionally the other dynamic /dev system (devfs) was whittled away and killed off.

    FUSE support (LWN article about FUSE). Allows filesystem drivers to be written in userspace. Currently the best Linux NTFS driver is written using FUSE and it allows fun things like sshfs. Might be handy if you need users to be able to configure where data is stored remotely, you are writing your own filesystem or you need to support writing to NTFS formatted USB disks...

    There is better CFS (Samba/SMB/Windows File Sharing) support. NFS version 4 support was also added.

    cpufreq support. The kernel can clock down the CPU speed (usually by changing voltages via some hardware interface) to save large amounts of power. This can be done in response to work load so you run at full speed as often as possible and then when things are quiet you scale down to the lowest setting (you often save the most power when doing absolutely nothing so it pays to finish things as quickly as possible).

    Any switch from 2.4 to 2.6 will of course require userspace changes (updated modutils, udev, later gcc, later glibc).

    There is also davej's post Halloween document discussing changes from 2.4 to 2.5. This is very detailed and is another excellent reference.

    Many many other things have changed too (e.g. ALSA support for sound has been added) but I have tried to keep the ones mentioned at least tangentially related to the original scenario :)

  72. Thanks! by Sits · · Score: 1

    (After reading this and another comment I posted another follow up)