Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Linux

Embedded Linux 1-Second Cold Boot To QT 141

An anonymous reader writes "The blog post shows an embedded device cold booting Linux to a QT application all in just one second. This post also includes a link which describes what modifications were made to achieve this."
This discussion has been archived. No new comments can be posted.

Embedded Linux 1-Second Cold Boot To QT

Comments Filter:
  • Ain't that qute? (Score:3, Insightful)

    by Carewolf ( 581105 ) on Thursday January 13, 2011 @06:33PM (#34870338) Homepage

    I assume they mean Qt application, not QuickTime, or whatever.

    • by Anonymous Coward on Thursday January 13, 2011 @06:38PM (#34870420)

      If the first thing that enters your mind when reading "QT" is QuickTime, you're on the wrong website I'm afraid.

    • Re:Ain't that qute? (Score:5, Informative)

      by countSudoku() ( 1047544 ) on Thursday January 13, 2011 @06:58PM (#34870754) Homepage

      I had the same reaction. The answer lies in the wikipedia, not in the unhelpful intermediate posts:

      http://en.wikipedia.org/wiki/Qt_(framework) [wikipedia.org]

      Qt "is a cross-platform application framework that is widely used for developing application software with graphical user interface (GUI) (in which case Qt is referred to as a widget toolkit when used as such), and also used for developing non-GUI programs such as command-line tools and consoles for servers"

      • by NemoinSpace ( 1118137 ) on Thursday January 13, 2011 @07:36PM (#34871408) Journal
        as a corallary to OP: If the first thing that enters your mind when reading "QT" is QuickTime, you have a problem.
        if you go to wikipedia for help? Now you have 2 problems.
        can we please get back to arguing now?
        • Re: (Score:3, Insightful)

          by nawcom ( 941663 )

          can we please get back to arguing now?

          Yeah, right after I finish beating Doom III by "I.D." software running on my "MAC".

          I wouldn't be surprised if the poster pronounces daemon as "daymon" either. The geek ego sure seems to get in the way of learning how to pronounce things. It looks like devs these days will have to provide audio files [kernel.org] to show how to pronounce their work [irssi.org].

          *shakes his head at correct pronunciation deniers*

          • by cgenman ( 325138 )

            I just wish I GNU what you were talking about.

          • The jargon file/hacker's dictionary explicitly states that day-mun is acceptable pronunciation.
            It doesn't really matter that the original users, in correct English, pronounced it dee-mon when a made up meaning of a word (the computer terminology definition) is pronounced in a multitude of ways decades later.

          • by shish ( 588640 )

            pronounce their work [irssi.org]

            L-eye-nux / L-ee-nux, fair enough; but this guy's using syllables that don't exist in half the world!

          • by mcgrew ( 92797 ) *

            The geek ego sure seems to get in the way of learning how to pronounce things.

            Er, guilty as charged, your honor. I like pronouncing Linux as "lie nix" reather than "lennox", even though I'm a Linux fan who'se been using various distros for almost a decade.

        • Comment removed based on user account deletion
          • MAYBE you should use less SHOUTING etc. ?

            Bur seriously, they have given back a lot of FOSS to the community themselves (GWT, contributions to Linux, OpenOffice etc) Have you?. They're getting the concept of FOSS, getting a lot out of it and giving something back - in such a way it is beneficial to their bottom line. And mine. And yours.

    • by Gerald ( 9696 )

      QuikTrip [wikipedia.org]. The device gives you coffee and a microwave sandwich while filling your gas tank, all in less than a second.

    • by Meski ( 774546 ) *
      Can QuickTime do anything in one second? (apart from crash)
  • ...speechless!
    Ciao!
    • picotux [picotux.com] does not seem to be available anymore. That's too bad. :-(

      • by Ashtead ( 654610 )

        Kleinhenz, who are making the picotux, have had a server crash apparantly, according to http://www.kleinhenz.com/ [kleinhenz.com]

        Not sure if one could get Qt going on the Picotux however, besides, the startup time there is about 90 seconds from poweron to the time the busybox banner and prompt appears on the serial console.

        The equipment shown in the featured blog is identified as a Renesas MS7724 development board. It has quite a lot more peripherals.

    • Re: (Score:2, Insightful)

      by PatPending ( 953482 )
      I don't think it's cool at all because this takes away one more of my excuses [xkcd.com] to grab a cup of Joe and have a smoke.
    • by Z00L00K ( 682162 )

      I agree that this was a really good job done!

      I will have to look into that because there are many applications around that would benefit from such a solution.

  • Any details on what they've done? Is it largely hardware-specific initialisation, or have they made changes that would be useful on a traditional desktop?
    • Re: (Score:2, Informative)

      by Anonymous Coward

      Any details on what they've done? Is it largely hardware-specific initialisation, or have they made changes that would be useful on a traditional desktop?

      From the article:

      "We've not applied any specific intellectual property but instead spent time analysing where boot delays are coming from and simply optimising them away. The majority of the modifications we make usually fall into the category of 'removing things that aren't required', 'optimising things that are required', or 'taking a new approach to solving problems' and are tailored very precisely to the needs of the 'product'."

      Also:

      "If you're interested in exactly what modification I made and a little

  • by FuckingNickName ( 1362625 ) on Thursday January 13, 2011 @06:57PM (#34870744) Journal

    ...booted in about 5 seconds, and that was to a general desktop.

    And my toy homebrew OS boots to a primitive UI in under 2 seconds after BIOS, and much of that is running interpreted bytecode.

    The fact is that a full BIOS + Linux / Windows system is a horrible fucking mess of bloat, but part of it is the price you pay finding and initialising all those millions of third party devices your old/embedded device isn't going to need to worry about.

    Still, as always, I believe any engineer's claim not before I get to test it myself.

    • by Cyberax ( 705495 )

      "...booted in about 5 seconds, and that was to a general desktop."

      So does Linux back in 2008 - http://www.youtube.com/watch?v=s7NxCM8ryF8 [youtube.com] Yes, BIOS is a kludge but it's on the way out.

      As for Linux/Windows - they can certainly be optimized to achieve sub-second boot times. But flexibility might be greatly limited in this case.

      • Yes, BIOS is a kludge but it's on the way out.

        A quick search only showed news articles from 2003 (behind a pay wall...), but I am pretty sure I heard the same claims before 2000. I have no idea what the technical hurdles are, but there has been much talk and little action on killing BIOS.

        On the plus side, I'm looking forward to using more than 640k of ram, which is no longer enough for anyone.

        • The problem is - why? What are you doing that makes 10 seconds less on your boot such a big deal!?

          It works as-is now, and there's not a whole lot to be gained by "fixing" it - which is why it doesn't seem to be happening.

          • by Anonymous Coward

            The problem is - why? What are you doing that makes 10 seconds less on your boot such a big deal!?

            Jef Raskin summed it up in one of his commandments for designing a "humane" interface:

            "A computer shall not waste your time or require you to do more work than is strictly necessary."

          • by wolrahnaes ( 632574 ) <sean AT seanharlow DOT info> on Friday January 14, 2011 @12:29AM (#34874090) Homepage Journal

            CarPC? HTPC? Just being able to turn the computer entirely off when it's not in use rather than suspend?

            This particular example was focused on embedded applications, but the general idea of being able to boot a computer reasonably close to instantly is advantageous pretty much anywhere.

          • Any time wasted is not available for other uses. Yes, it's only 10 seconds, but it does add up over time. Plus, unless it took a ridiculous amount of time, I'm not sure I see any reason not to do it. Plus systems that boot fast tend to be less bloated.
        • by afidel ( 530433 )
          The biggest problem is the first widely used MS OS that support EUFI was Vista x64 SP1 so system builders had basically no incentive to switch (EUFI supports BIOS emulation but if 90% of systems sold will be running the emulation why not just ship a BIOS with fewer compatibility issues).
    • Re: (Score:3, Insightful)

      by Microlith ( 54737 )

      The fact is that a full BIOS + Linux / Windows system is a horrible fucking mess of bloat

      It's also a huge pile of capability that wasn't around 20 years ago. I find it hard to believe that, capability-wise, your Acorn A3000 was on par with a modern PC. I don't see it as bloat, but as the necessary result of supporting a wide array of capabilities (not necessarily hardware) and an extremely capable and platform-independent environment.

      BIOSes (especially RAID) are the slowest part these days, and UEFI is hope

      • as the necessary result of supporting a wide array of capabilities (not necessarily hardware)

        Explain.

        BIOSes (especially RAID) are the slowest part these days, and UEFI is hopefully going to combat that.

        Many modern BIOS implementations are just a UEFI implementation with a translation layer. The "problem" is the firmware self-testing and doing lots of patient device detection/initialisation - there's no inherent reason UEFI would improve that.

        • Explain.

          VESA BIOS extensions. DMI. ACPI. Legacy USB device support (that's software). Option ROM detection and execution. Thermal management detection and operation. LBA (my first three computers didn't have that). Hardware-level security. That's just off the top of my head, in flash ROM soldered to your motherboard.

          It gets more interesting the moment the boot sector is executed.

    • by sitharus ( 451656 ) on Thursday January 13, 2011 @07:56PM (#34871710) Homepage

      Your Acorn A3000 held and executed most of the OS from ROM. When you don't have to copy from disk times are much faster.

      • Reading a megabyte or so from disk to RAM doesn't take longer than a couple milliseconds.

        • Reading a megabyte or so from disk to RAM doesn't take longer than a couple milliseconds.

          ..not in those days (1990.)

          In those days, drives often peaked out at 5 Mbit/sec with seek times of at best 40ms, but often as bad as 80ms average.

          So a "megabyte or so" would take several seconds to read at best.

        • Actually it does with a 7200RPM drive rotational latency alone is going to eat over 4ms on average (sometimes you will be lucky and it will be near zero, sometimes you will be unlucky and it will be double that) for each access and actually reading a file is likely to take multiple accesses. Still reading in a single file (even a fairly large one) from a modern drive takes a pretty small ammount of time if you only do one.

          The thing is most disk based operating systems i've seen don't work like that, they ar

    • by thegarbz ( 1787294 ) on Thursday January 13, 2011 @08:46PM (#34872368)
      Actually if you custom compile your kernel to strip out every device driver that's irrelevant to your system you will save an absolute trivial amount of boot time at best. Go to TFA and click the slideshow to see where the real slogs of the boot lie.
      • The irony is that a slideshow is one of the most time-consuming ways of absorbing information.

      • Note that this doesn't mean custom compiling the kernel is a bad idea not because of what you can strip out but because compiling stuff into the kernel saves the need for an initrd.

  • Made my day (Score:5, Interesting)

    by LoRdTAW ( 99712 ) on Thursday January 13, 2011 @07:02PM (#34870856)

    Its good to see a fun tech article like this on /. I haven't seen any in a while (maybe its just me).

    I assume that during boot time, the Qt UI and low level hardware modules are loaded immediately. Then other modules and services can be loaded later on such as networking, video capture drivers and other lower priority services. I also assume the UI is not based on X but a Qt implementation that is directly drawing to the frame buffer.

    Lately I have been on a bit of an embedded systems kick playing around with PLC's and embedded micro controllers. This is a great article.

    • I bet it would be fun to see... if they hadn't hosted the site on the device too.

    • I enjoyed it. Imagine how nice it would be in a instant wireless browsing device. Or it serves out pages from which you can control a connected Arduino [arduino.cc] device. Turn on and go - very neat!

  • by RollingThunder ( 88952 ) on Thursday January 13, 2011 @07:06PM (#34870924)

    I have to say, the most impressive/innovative tweak, to me, was the re-ordering of required functions in the compiled binary. Doing so allowed them to reduce load time, by making it that only two blocks had to be demand-read off the flash filesystem, instead of four.

    That's some crazy, use-the-drum-spin-as-timing, innovative thinking right there. Serious kudos.

    • by Chrutil ( 732561 ) on Thursday January 13, 2011 @07:17PM (#34871108)
      That's actually common practice in profile guided optimization, put commonly used code close together in the image to minimize the number of pages loaded.
    • by pz ( 113803 )

      I have to say, the most impressive/innovative tweak, to me, was the re-ordering of required functions in the compiled binary. Doing so allowed them to reduce load time, by making it that only two blocks had to be demand-read off the flash filesystem, instead of four.

      That's some crazy, use-the-drum-spin-as-timing, innovative thinking right there. Serious kudos.

      Most assuredly!

      I realized these guys were serious when they talked about the bandwidth reading from flash vs. the bandwidth of boot image decompression. Kudos, indeed.

    • by noidentity ( 188756 ) on Thursday January 13, 2011 @08:29PM (#34872150)
      Really? I thought this was standard stuff for profile-guided-optimization. It's common knowledge that when a system initializes, it jumps all over the image, which is bad if it's paged. Seems a big "duh" to reorder functions so that all the init code is together.

      Another optimization that was common old Mac compilers was "dead-stripping", where they avoided linking in any functions that were never called. Apparently this isn't commonly done and instead if a single function in a file is called, then ALL are linked in, at least when I looked into it for Linux a while back.

      • Another optimization that was common old Mac compilers was "dead-stripping", where they avoided linking in any functions that were never called. Apparently this isn't commonly done and instead if a single function in a file is called, then ALL are linked in, at least when I looked into it for Linux a while back.

        But doesn't rely on linker optimization support to work (eg GCC's new LTO)? Normally in the first pass when all the objects are being compiled, there's no way to know which functions are

        • It's called -ffunction-sections, which puts each function in a file in its own section so the linker can get rid of all the unused ones. No need for LTO.

      • by Chemisor ( 97276 )

        To do function level linking you need to compile your sources with -ffunction-sections -fdata-sections and pass --gc-sections to ld. It might be scary to some people because the .o files produced this way are much larger. Also, it does not work on shared libraries, for the obvious reason that you can not tell what will be unused.

    • Re: (Score:3, Interesting)

      by mhotchin ( 791085 )
      Um. This capability has been around since FOREVER. I worked at MS 'beside' the group that created exactly such a tool, called BBT. This was ~2000.

      It was the most used, but not the only result of a tool suite called Vulcan. This would allow you to pull apart and re-assemble a binary, either for re-ordering (optimization) or to add instrumentation for other optimization projects (like the one I worked on).
      • by codepunk ( 167897 ) on Thursday January 13, 2011 @10:26PM (#34873224)

        You forgot to mention the performance died when marketing made you link in ie.h .

      • by Anonymous Coward

        Um. This capability has been around since FOREVER. I worked at MS 'beside' the group that created exactly such a tool, called BBT. This was ~2000.

        It was the most used, but not the only result of a tool suite called Vulcan. This would allow you to pull apart and re-assemble a binary, either for re-ordering (optimization) or to add instrumentation for other optimization projects (like the one I worked on).

        You deliberately seem to miss one really important point.

        These guys do not have to pull apart binaries they can mod them from source if they feel like it. You have let the cat out of the bag and admitted that Microsoft uses disassemble technique on other peoples binaries all the time. No wonder it was so easy for you guys to clone closed functions in IBM's Lotus Suite and com SQL framework, then pretend that you did not know what was going on when all of a sudden their binaries were slower and less reliabl

    • ahhh damn what was that drum-spin story? I've read it around here before and I've been trying to find it again but with no luck. It's a great story and if you have a link it would be much appreciated!
    • Use the drum spin as timing, are we talking bendix G15 here?
    • Demand paging in of executables made sense back when we only had a few megs of ram in a general purpose computer but I wonder if it's an idea that is past it's time and if we would be better off loading smaller executables in a single read operation. Especially on hard drive based systems (flash is better but still once you add all the layers on I bet a single large read is faster than many small ones)

      • Without demand paging, he would have had to read the entire executable in; far more than just four or two blocks from the filesystem. The issue was I/O bandwidth rather than response time to requests, from what I understood.

  • At last! (Score:5, Funny)

    by mr_lizard13 ( 882373 ) on Thursday January 13, 2011 @07:18PM (#34871130)
    This is the year of Linux on the de- wow, that was quick.
  • by Max Hyre ( 1974 ) * <(ten.eryh) (ta) (hsals-hm)> on Thursday January 13, 2011 @07:41PM (#34871518)
    <rant>
    The bleedin' slideshow requires Flash 9 , for crying in a bucket! Why the hell do you need Flash to show a sequence of static images in succession!? And to download the slides, you have to have two accounts: one on Facebook, and one on something called Slideshare.

    Screw it.
    </rant>

    (Be glad I'm sparing you my take on Javascript.)
  • Um, when he pulls the plug - he inserts it at 1:03, the device is mostly booted by 1:06, but the video feed isn't restored until 1:08. In other words, I'd say at least 3 seconds, I'd call it 5 seconds to fully boot and load the application.

    Don't get me wrong, still impressive, but it seems to be a bit more than one second...

    On an unrelated note: Why the hell does Slashdot still not work properly with Google Chrome? It's the only site I've ever had any problems with....

    • by 7-Vodka ( 195504 )
      are you sure that the machine isn't booting in one second and then it takes the monitor itself some time to adjust?

      I'd be willing to bet they are doing software boot process monitoring and know exactly how long it takes to boot.

  • No, it's not about the Knights who say Ni. Does this thing have USB support? Does it have Wifi support? Products by Technogic Systems boot to a shell prompt in less than 2 seconds but if you need to load USB drivers and populate a /dev it drops to about 6-10 seconds. Wifi takes longer.

    • ...and what the hell is wrong with using a pre-configured suspend image anyhow? seems like a lot of effort wasted IMO.
      • Assuming that you have the ability to save the image. See, I'm developing what is essentially a Linux-based appliance that can be faceless (no user-interface) and uses a simple toggle switch on the battery so there is no facility for a graceful shutdown which it sounds like you'd need to do the suspended image. Plus I'm using a read-only file system for the OS to guard against corruption and tiny read/write partition for settings.

        One reason why fast boot is important to me is since it's faceless, the user

  • that it took to write this post? For a minute I was thinking this was twitter.
  • Wake me up when they get to ~80 millseconds. [google.com]
  • It redirects to 123 reg. What's happening?

  • We won't have our uptime to brag about anymore!

My sister opened a computer store in Hawaii. She sells C shells down by the seashore.

Working...