Posted by
timothy
on from the count-to-ten-very-slowly dept.
An anonymous reader writes "TCCBOOT is the first boot loader able to compile and boot a Linux kernel directly from its source code. It can compile and start booting a typical Linux kernel in less than 15 seconds on a 2.4 GHz Pentium 4. TCCBOOT uses the latest version of the TinyCC C compiler."
No it wouldn't. You'd still have to reboot to see the change... at least if you compile -before- the reboot you know that the compile worked.
Plus using this mechanism as-is without alternative boots would mean compiling your kernel every time you boot. A waste of time and resources.
Note that it didn't say it booted in 15 seconds... only that it -started- to boot in 15 seconds. Even removing all modules I find it impossible to believe that a P4 could compile the entire kernel with -any- compiler faster than it takes to load a precompiled kernel. No matter what you still have a "+ compile time" situation even if it is much faster than the stock gcc.
This has some "because you can" value, but otherwise I just don't see it as being useful to the user, or even to the vast majority of kernel developers.
Making C feel like Perl is not a good thing for me:)
-- It is more productive to voice thoughtful opinions (reply) than to judge (moderate) others.
Do you know what this means?!
by
AKAImBatman
·
· Score: 5, Interesting
This could allow for platform independent Linux programs! i.e. If programs could be compiled on the fly from source bundles as an acceptable speed, then there would be no need to distribute binaries any longer. One source bundle, and you'll rule them all!
Failing that, one could always fall back on my previous plan. My thought was that if GCC compiled to P-Code instead of the final binary, the target GCC could complete the P-Code conversion at install time.
Comparing it to Perl is a bit unfair considering we don't exactly have a full fledged Unix like kernel written in Perl to boot...
I prefer to see this as a great proof of concept that kernel compilation can be made fast enough to do "on the fly". Considering that driver installation for Linux still often requires a kernel recompile, if this system can be made solid enough it could make things like that a lot easier for end users, though I think I'd prefer to have it done at package installation time rather than boot time:-)
Wow! Ultimate Gentoo!
by
Eunuchswear
·
· Score: 5, Funny
TCC is an incredibly tiny compiler with practically no dependencies on the environment. It's based on a cleaned up entry to the obfuscated C contest. So you can safely assume it's using every dirty trick in the book and then some. It still sounds incredible though.
Wow. That really is fast.
by
TheRaven64
·
· Score: 5, Interesting
Out of sheer boredom, I just downloaded the demo ISO and ran it inside VirtualPC on a 1.5GHz G4. The emulated system is probably roughly equal to a P2 300. The total time from turning the emulated machine on to a shell was around a minute.
Re:TCC compiler
by
TheRaven64
·
· Score: 5, Informative
TCC has a few significant drawbacks.
It is not portable (well, technically it is portable, but currently only has an i386 back end).
It only supports C (not a drawback if you are just compiling C, but a lot of projects use C++/Objective-C/Whatever).
It produces fairly sub-optimal code. The register allocation done by TCC is not very clever, and it performs no serious optimisation steps.
On the other hand, TCC has two huge advantages:
It is not GCC. Compiling your code using two or more compilers and ideally for 2 or more CPU architectures is a good way of finding some more obscure bugs.
It is very fast. The less time you spend compiling, the more time you can spend testing / debugging.
Just look at this guy's work.. It's amazing what this he can do. If you haven't tried it yet, definately check out QEMU, it's great, and totally free. He also wrote FFMPEG which most definately your linux media player uses..
To be honest, I LIKE the delay when I have to reboot. It gives me time to have a pee, stretch my legs, have a drink...
Eventually we're going to spend 24 hours a day staring at the screens because there'll be no excuse at all for leaving the screen.
Why would anyone *possibly* want their bootloader be able to compile the kernel?
This could allow for platform independent Linux programs! i.e. If programs could be compiled on the fly from source bundles as an acceptable speed, then there would be no need to distribute binaries any longer. One source bundle, and you'll rule them all!
Failing that, one could always fall back on my previous plan. My thought was that if GCC compiled to P-Code instead of the final binary, the target GCC could complete the P-Code conversion at install time.
Javascript + Nintendo DSi = DSiCade
Now they can compile their kernel with "-mday=Wednesday" for even better optimization.
I prefer to see this as a great proof of concept that kernel compilation can be made fast enough to do "on the fly". Considering that driver installation for Linux still often requires a kernel recompile, if this system can be made solid enough it could make things like that a lot easier for end users, though I think I'd prefer to have it done at package installation time rather than boot time :-)
Recompile your programs EVERY TIME YOU RUN THEM.
Ricers Rule!
Watch this Heartland Institute video
I think the main thing here is the TCC compiler, which is 100K or so, and very fast.
This TCCBOOT is something to showcase the speed of the TCC compiler.
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.
TCC is an incredibly tiny compiler with practically no dependencies on the environment. It's based on a cleaned up entry to the obfuscated C contest. So you can safely assume it's using every dirty trick in the book and then some. It still sounds incredible though.
Out of sheer boredom, I just downloaded the demo ISO and ran it inside VirtualPC on a 1.5GHz G4. The emulated system is probably roughly equal to a P2 300. The total time from turning the emulated machine on to a shell was around a minute.
I am TheRaven on Soylent News
- It is not portable (well, technically it is portable, but currently only has an i386 back end).
- It only supports C (not a drawback if you are just compiling C, but a lot of projects use C++/Objective-C/Whatever).
- It produces fairly sub-optimal code. The register allocation done by TCC is not very clever, and it performs no serious optimisation steps.
On the other hand, TCC has two huge advantages:I am TheRaven on Soylent News
http://fabrice.bellard.free.fr/
:)
Just look at this guy's work.. It's amazing what this he can do.
If you haven't tried it yet, definately check out QEMU, it's great, and totally free.
He also wrote FFMPEG which most definately your linux media player uses..
I am always wondering what he'll put out next