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."
Ain't that qute? (Score:3, Insightful)
I assume they mean Qt application, not QuickTime, or whatever.
Re:Ain't that qute? (Score:5, Insightful)
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, Funny)
If he came here for abuse, it's definitely the right website!
Re: (Score:1)
No, it isn't.
Re: (Score:3)
Re: (Score:2)
I came here for a good argument.
Well, do you want to have just one argument, or were you thinking of taking a course?
Re:Ain't that qute? (Score:4, Funny)
Re: (Score:3)
I came here for a good argument.
I'm sorry, but this is abuse.
Re: (Score:1)
take char * string
Re:Ain't that qute? (Score:5, Funny)
I came here to meet lonely singles in my area.
Re: (Score:2)
someone mod this particular AC "Informative".
Going off on a tangent, I wonder if the sexual orientation of lonely geeks is any different from the average - we could use some more serious levelheaded science on such things...
Re: (Score:2)
I came here for a good argument.
Well, you might have to make do with mindless abuse.
Re: (Score:2)
Re:Ain't that qute? (Score:4, Insightful)
If the first thing that enters your mind when reading "QT" is QuickTime, you're on the wrong website I'm afraid.
It's usually rendered as Q t not Q T .
Re: (Score:1)
And it's pronounced as "cute".
Re: (Score:2)
QT -> QuickTime -> Trouble
Isn't that the usual line of thought?
Re: (Score:1)
If the first thing that enters your mind when reading "QT" is QuickTime, you're on the wrong website I'm afraid.
I'm an Apple Fanboy, you insensitive clod!
Re: (Score:1)
My best friend was killed by Apple Fanboys you insensitive clod!
Re: (Score:2)
If the first thing that enters your mind when reading "QT" is QuickTime, you're on the wrong website I'm afraid.
Well, QT is QuickTime. Qt is the toolkit. And he's just assuming that slashdot summary got it wrong.
Re: (Score:2)
I assure you I've been a nerd since before most slashdotters were born. Hell, I read the entire Encyclopedia Britannica when I was ten, used a slide rule in high school to cheat in math class, built a ham radio reciever and guitar amp when I was a kid. I've hacked hardware, built computers from junk, hand-assembled machine code, software hacked a low resolution (40x20) MC-10 to about 500x400 and wrote a complete graphics program for it complete with capabilities to print the images on the MC-10's primitive
Re: (Score:2)
But I've never heard of Qt before today
Maybe you have that Slashdot section turned off in your preferences.
http://www.google.com/search?q=qt+site:slashdot.org [google.com]
Re:Ain't that qute? (Score:5, Informative)
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"
Re:Ain't that qute? (Score:4, Funny)
if you go to wikipedia for help? Now you have 2 problems.
can we please get back to arguing now?
Re: (Score:3, Insightful)
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*
Re: (Score:2)
I just wish I GNU what you were talking about.
Re: (Score:2)
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.
Re: (Score:2)
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!
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:3)
QuikTrip [wikipedia.org]. The device gives you coffee and a microwave sandwich while filling your gas tank, all in less than a second.
Re: (Score:2)
Pretty cool... (Score:1)
Ciao!
Re: (Score:1)
picotux [picotux.com] does not seem to be available anymore. That's too bad. :-(
Re: (Score:2)
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)
Re: (Score:2)
Loading Emacs onto a Sun-3.
Re: (Score:2)
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.
Re: (Score:2)
Cars come to mind right off. Start car -> no music for next 2 minutes -> this computer is lame.
Re: (Score:2)
Now my comment was that you could trim boot on a desktop.... I do not have a desktop in my car as a sound system, and I dare guess that neither do you ;-)
Re: (Score:2)
If the application is for a formerly instant-on analog device it matters a LOT. It takes my DVD player about twenty seconds after being powered up to become functional, and it seems like a lifetime compared to a VCR.
I find it funny that we used to wait a full minute for the TV's tubes to warm up, but now we have no tubes and instead wait for the TV's computer to boot up.
Details (Score:2)
Re: (Score:2, Informative)
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
yes, my 1990 Acorn A3000... (Score:5, Interesting)
...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.
Re: (Score:2)
"...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.
Re: (Score:3)
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.
Re: (Score:2)
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.
Re: (Score:1)
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."
Re:yes, my 1990 Acorn A3000... (Score:4, Insightful)
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.
Re: (Score:2)
Re: (Score:2)
I do that several times a day.... When I open the lid on the laptop it is up in 2 seconds
Re: (Score:3)
Re: (Score:3, Insightful)
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
Re: (Score:2)
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.
Re: (Score:2)
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.
Re:yes, my 1990 Acorn A3000... (Score:4, Insightful)
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.
Re: (Score:2)
Reading a megabyte or so from disk to RAM doesn't take longer than a couple milliseconds.
Re: (Score:2)
Reading a megabyte or so from disk to RAM doesn't take longer than a couple milliseconds.
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.
Re: (Score:2)
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
Re: (Score:2)
How long does it take to load 10M from HDD to memory on a modern system?
Including spin-up time? We take it for granted that our HD's are often always spinning when using our systems. From cold boot that simply isnt the case.
I know that when I access my older drive, which is normally not spun up (its just a backup) it takes over 1 second before I can get a directory listing.
Re:yes, my 1990 Acorn A3000... (Score:4, Informative)
Re: (Score:2)
The irony is that a slideshow is one of the most time-consuming ways of absorbing information.
Re: (Score:2)
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)
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.
Re: (Score:2)
I bet it would be fun to see... if they hadn't hosted the site on the device too.
Re: (Score:2)
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!
Function re-ordering inside the image? wow (Score:5, Insightful)
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.
Re:Function re-ordering inside the image? wow (Score:5, Informative)
Re: (Score:2)
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.
Re:Function re-ordering inside the image? wow (Score:5, Informative)
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.
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
Function-level linking is comparison is so trivial, I'm wondering why it's so uncommon on Unix
Because static linking is so uncommon. If you are linking statically, you can use -ffunction-sections to put each function into its own section so the linker can skip all the unused ones.
Re: (Score:2)
A program's mainline code is statically linked. At least when I'm writing a program, I often use small utilities I've written over the years. They aren't substantial enough to be put into a shared library, and they contain plenty of functions a given program never calls.
I use shared libraries for those.
On Unix systems there's very little reason not to. On Windows it's a bit of work (not a lot, but some) to fix your code up so it can be used as a DLL, but on Unix it's just some compiler and linker flags -- and not even that if you're using a build system that takes care of it for you. The only downsides are (a) possibly a tiny bit of wasted RAM as unused functions that happen to be on the same page as used function are loaded, but that is typically more than offset if t
Re: (Score:2)
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)
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).
Re:Function re-ordering inside the image? wow (Score:4, Funny)
You forgot to mention the performance died when marketing made you link in ie.h .
Re:Function re-ordering cheats? (Score:3, Interesting)
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
Re: (Score:2)
Re:Function re-ordering inside the image? wow (Score:5, Informative)
The Story of Mel! http://foldoc.org/The+Story+of+Mel [foldoc.org] (That's not the original, that's the "free verse" version which is better IMHO.) It might even be a true story! http://en.wikipedia.org/wiki/Mel_Kaye [wikipedia.org]
Re: (Score:2)
Re: (Score:2)
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)
Re: (Score:2)
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)
Flash 9 (Score:3)
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.)
Re: (Score:1)
Screwed it too.
Re: (Score:3, Informative)
1 second? Lies! (Score:2)
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....
Re: (Score:3)
I'd be willing to bet they are doing software boot process monitoring and know exactly how long it takes to boot.
There is one small problem... (Score:2)
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.
Re: (Score:3)
Re: (Score:2)
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
About the same amount of time (Score:2)
**Yawn** (Score:2)
The link does not seem to work. (Score:2)
It redirects to 123 reg. What's happening?
Re: (Score:2)
It does not matter, now it works.
This will be the death of Linux... (Score:2)
We won't have our uptime to brag about anymore!
Re:Ermm.. (Score:5, Informative)
The have a slideshow here: http://www.slideshare.net/andrewmurraympc/elce-the [slideshare.net] , it's interesting starting at slide 19. Especially the executable reordering to defer loading of UI event handling code is impressive.
Re: (Score:3)
I hate slideshare. What ever happened with good old Pdf downloads? But now Pdfs need to be embedded in Web2.0 crap. We ain't on the cloud yet, every PC out there have have a Pdf viewer installed. If they at least would use JavaScript so you don't need Flash for it like Google Maps.
"Download is disabled by the owner". If the owner don't like the Pdf be in public than why the hell are they posting it on a freely accessible website? Does the owner really thinks I'm going to copy it and distribute it as my own
PDF is available here (Score:3, Informative)
http://elinux.org/images/f/f7/RightApproachMinimalBootTimes.pdf