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."
Too fast... (Score:5, Funny)
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.
Re:Too fast... (Score:2, Redundant)
Re:Too fast... (Score:2, Funny)
+2 Insightful.
Re:Too fast... (Score:5, Funny)
Um. Social life, family, sex,
Yes, I do realize that I'm posting to slashdot.
Re:Too fast... (Score:3, Funny)
All of which are possible from in front of the screen:
Re:Too fast... (Score:5, Funny)
Re:Too fast... (Score:5, Funny)
Then I suggest you stay away from windows, you will end up as a dehydrated, 12 foot alcholic!
Re:Too fast... (Score:5, Funny)
plus, my boss really thinks i'm working hard when he sees 4 terminals open with stuff flying past them. hence, i always compile from source
Re:Too fast... (Score:3, Interesting)
# while [ true ]; do make; make clean; done
and sat back and had a nice relaxing day. Whenever anyone would ask me anything, I'd point to the scrolling compile messages on the screen and tell them that I was busy.
Now that I think back on it, I could have just i
Re:Too fast... (Score:3, Interesting)
One is mainly an LDAP server/PDC, and for some reason OpenLDAP just dies once in awhile. Has something to do with BDB settings, I'm supposed to know some magical cache size setting or something to make it stable. I have no time for that. It boots from a RO image, which I rarely need to update.
Same for the firewall/gateway. It's just much easier to tell people "if the internet or vpn isnt workin
Re:Too fast... (Score:3, Interesting)
My greatest technical achievement in regards to Linux is trying to compile the kernel after stripping crude from using, and sometiems having the whole thing balls up because I have stripped something that was vital.
I am not your average sysadmin who can figure out every script and knows much about process lists, or Kill Signals.
So
Re:Too fast... (Score:3, Informative)
1a)
Note that your init scripts might be in a slightly different location.
Re:Too fast... (Score:3, Informative)
Heh, why do people type so much? On RedHat at least, there is a script in /sbin called "service" which runs the given service for you.
For example, instead of typing:
You can just type:
service httpd restart
Re:Too fast... (Score:3, Informative)
Re:Too fast... (Score:3, Informative)
I am not your average sysadmin who can figure out every script and knows much about process lists, or Kill Signals.
That's what an education is for. From this sentence, I get the impression that you are a sysadmin, albeit one that is grossly unqualified for any sysadmin position.
I guess we can pin this sort of thing on Microsoft, who's penchant for wizards and paperclips has led to a flooding of the market by uneducated or unqualified IT workers. It's the same frightful problem that the developer space
How did that get "insightful"? (Score:3, Insightful)
I guess that depends upon what the symptoms are. But "insightful"? Only if you only know Windows.
I have problems with Comcast. But I only have to tell people to reset the cable modem. The firewall never has problems.
You might want to think about that. (Score:3, Insightful)
All computers perform the same functions. Input data, store data, process data, output data. Once you understand that, the rest is just learning the logic and the idiosyncracies behind each system.
script? (Score:4, Insightful)
Perl5 does the same thing. read, compile, run..
So what are the uses for this?
Re:script? (Score:5, Insightful)
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 :-)
Re:script? (Score:3, Funny)
How about using it to bootstrap Emacs? That's virtually an operating system already...
Re:script? (Score:3, Informative)
Re:script? (Score:2)
I didn't say the kernel is perl. I said that it turned the process into that of a script language, just like perl is. Anyway, it's not unpossible to make your drivers loadable/unloadable. linux already supports this and so does freebsd.
Still no gain.
Re:script? (Score:2)
usefulness? (Score:5, Interesting)
Re:usefulness? (Score:3, Interesting)
So you never fucked up your
Re:usefulness? (Score:3, Interesting)
Actually, I can't say that - one time lilo locked up the system while installing, and that caused it to not boot. But since that was a bootloader thing, this nifty compile-at-boot thing wouldn't help anyways.
Re:usefulness? (Score:2)
I've only ever once made my linux box completely unbootable. But that was because I accidently did rm -rf
Anyway, it deletes in alphabetical order, and I hit control-c when I saw it delete apache2.conf. Too late though, with
Re:usefulness? (Score:2)
Re:usefulness? (Score:3, Interesting)
Yeah, like... ummm, KNOPPIX?
Been there done that
Re:usefulness? (Score:4, Insightful)
The only way you can prevent this is to prevent the tinkering in the first place, which is what all the appliance type systems do. Even then, you can always pop the hood and start reflashing the eproms, etc. rendering the device non-functional.
Linux runs on Many different architecturs and supports THOUSANDS of different devices. Because you have the ability to cross-compile and include / exclude support for just about anything, it's trivial to create a non-functional kernel. This is NOT a design flaw.
Back to the topic at hand... It would be very cool to include hardware / device detection and auto-compile all the different modules / support needed to run on any particular platform, even optimizing for the local processor. Furthermore, you do this via netboot / PXE as well as a boot CD. I dont know what capabilities tinycc has for optimization - probably none, but that may be something that could be added.
Optimizer? (Score:2, Insightful)
Re:usefulness? (Score:2, Informative)
It's called a "hack".
Have the last nerd left the building?
Re:usefulness? (Score:5, Interesting)
Re:usefulness? (Score:3, Interesting)
However, it's a step in the right direction - I can see Mandrake or SUSE taking this idea and integrating it with some kind of video-driver update system - "Instructions: install this package, reboot."
Re:usefulness? (Score:5, Insightful)
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
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
Re:usefulness? (Score:2, Interesting)
That being said, why not just have it recompile while booted. The install script could install the new kernel in lilo/grub and keep the last kernel for a failsafe. The user would simp
Re:usefulness? (Score:2)
What we really want to know is (Score:4, Funny)
Re:What we really want to know is (Score:2)
look here [slashdot.org] for exact timings...
Re:What we really want to know is (Score:2)
Hmm (Score:4, Funny)
Yes, but... (Score:4, Funny)
Do you know what this means?! (Score:5, Interesting)
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.
Re:Do you know what this means?! (Score:2)
Re:Do you know what this means?! (Score:2)
1) Compile to some intermediate form (byte code or whatever you like to call it)
2a) Use an interpreter to run the result
2b) Compile the result to native code
3) Profit!
(Another added benefit is that the user doesn't have to care wether 2a or 2b is choosen, he won't see any difference apart from the speed-increase you'll most likely get from choosing 2b).
I don't think t
Re:Do you know what this means?! (Score:2)
Re:Do you know what this means?! (Score:2)
Another option is system like Semantic Dictionary Encoding (M. Franz. Code-Generation On-the-Fly: A Key to Portable Software. PhD thesis, ETH Zurich, Mar. 1994. - It's available online on ETH's servers somewhere but I don't have time to dig it up) - which was (is?) in use by the Mac Oberon people to generate CPU independent binaries.
Re:Limited (Score:2)
Re:Limited (Score:2)
But why? (Score:4, Insightful)
And I'm still not sure! What's wrong with compiling it every time the code changes and booting up quicker than 15 seconds?
Jolyon
Re:But why? (Score:3, Interesting)
It could also be a trap (it runs well compiled with tcc but fails misteriously when compiled and optimized with gcc).
TCC is a very fast C compiler and it is very nice for development (I used it as a backend to the SmartEiffel Eiffel compiler, it greatly speeds up compiling - waiting for GCC every time was a nuissance) and I guess Fabrice Bellard likes to experiment.
I guess nobody (inclu
Re:But why? (Score:3, Informative)
It is indeed very fast, but it wouldn't compile ghostscript for me.
# apt-get install tcc ./configure && make ./obj/zfcid.o -c ./src/zfcid.c ./src/zfcid.c:23: ./src/bfont.h:24:
./src/ifont.h:34: identifier expected
[...]
$ cd ~/projects/ghostscript/gs
$ make distclean
[...]
$ CC=tcc
[...]
tcc -DHAVE_MKSTEMP -DHAVE_HYPOT -O -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -I./src -I./obj -I./obj -I./src -o
In file included from
In file included from
make: *** [obj/zfcid.o] Error 1
Co
Re:But why? (Score:3, Informative)
Why not give some more information so we can figure out why it doesn't work? It could just be a misconfigured #define somewhere.
Re:But why? (Score:4, Interesting)
cedric@cedric:~$ time tcc fibo.c -o fibo.tcc
real 0m0.060s
user 0m0.020s
sys 0m0.010s
cedric@cedric:~$ time gcc fibo.c -O3 -o fibo.gcc
real 0m0.441s
user 0m0.150s
sys 0m0.030s
cedric@cedric:~$ time
1
real 0m0.074s
user 0m0.000s
sys 0m0.000s
cedric@cedric:~$ time
1
real 0m0.072s
user 0m0.000s
sys 0m0.000s
cedric@cedric:~$ time
1
real 0m0.071s
user 0m0.000s
sys 0m0.000s
cedric@cedric:~$ time
1
real 0m0.074s
user 0m0.000s
sys 0m0.000s
cedric@cedric:~$ time
1
real 0m0.071s
user 0m0.000s
sys 0m0.010s
cedric@cedric:~$ time
1
real 0m0.070s
user 0m0.000s
sys 0m0.000s
I can't believe this is what GCLS uses as a benchmark. The running time is so short it's probably all start-up and shutdown. Anyway, the numbers are pretty fair for a compiler compiling code that was tweaked to get the other compiler to be as fast as possible.
Re:But why? (Score:2)
I'm trying to think of a reason why ... (Score:4, Insightful)
Maybe you could use some Knoppix-style hardware detection to probe the hardware at boot-time, then custom-compile a kernel to match? I just can't really see that that would be an improvement over just compiling in everything and the kitchen sink as a module.
Oh, well, even if it's useless, it's neat.
Re:I'm trying to think of a reason why ... (Score:3)
Re:I'm trying to think of a reason why ... (Score:2)
Not a complete compile (Score:5, Informative)
I guess this could have some limited use somewhere, perhaps, but I can't really see how if you need some precompiled stuff.
Great for Gentoo (Score:5, Funny)
Re:Great for Gentoo (Score:3, Funny)
Look, I know everyone here hates Gentoo because there is some group of nebulous "Gentoo zealots" who go around posting pro-Gentoo stuff on every single slashdot story. I've never actually seen them, but I always hear people complaining about them, so they must exist.
But how many times can people hear, "Haw haw, they compile stuff and it's slow" and still laugh? Do you guys laugh at every single fart joke you hear? How can stuff like this still get +5 funny?
Anyone who thinks about posting some "Gent
Re:Great for Gentoo (Score:5, Funny)
Architecture Independence (Score:3, Informative)
I don't know how useful a processor architecture-independent version of this would be (the compiler itself is pre-compiled for a specific processor, presumably!) but it does seem a rather cool hack. Maybe an ultra-inclusive version of Gentoo?
How? (Score:5, Interesting)
Load the needed environment for the compiler.
Load the source
Build the source
Boot the source
in 15 seconds, when it takes much longer than that for my already booted system to build a kernel? A P4 isn't THAT much faster than an AMD3200! (And I have done the old "drop to RL1 and build" trick, so it is not an issue of other tasks running).
I want to know a) What kernel options are enabled b) From when are they starting the clock (are they counting the time to load the bootloader and initrd?) and c) is this TRULY a fully functional kernel, or "just enough to get a prompt"?
Re:How? (Score:5, Informative)
Re:How? (Score:2)
Now suppose TCC is 10 times as fast as GCC (which is true based on my experience), the 32-way machine is 20 time as fast as than a single Power4 (the kerneltrap site said "2246% CPU usage"), and the 2.4GHz Pentium4 is as fast as a 1.1GHz Power4, then building the kernel just takes 15 seconds. Of course, it is a rough estimate, and I suspect the P4 should be faster than a 2002-ish Power4 for cpu-intensive job such as
Re:How? (Score:2)
Re:How? (Score:2)
Re:How? (Score:4, Informative)
Re:How? (Score:4, Informative)
Wow! Ultimate Gentoo! (Score:5, Funny)
Ricers Rule!
A.K.A. (Score:3, Funny)
Re:Wow! Ultimate Gentoo! (Score:2)
Wow (Score:4, Funny)
Main reason for this? (Score:5, Insightful)
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.
Re:Main reason for this? (Score:5, Interesting)
You are generally right.
But think about it for a bit: this fast C compiler turns the tables, and redefines what we know (paradigm shift anyone?). No longer will C be seen as a compiled language. One can think of it as a scripting language. A construct like this works with tcc:
Something that was unthinkable under GCC.
As someone else posted, this can mean the proliferation of self contained bundles that are platform independant.
The potential is enormous. Not the boot part, but the compiler and what it can be twisted into doing.
I call shenanigans on this (Score:2, Interesting)
I'm posting this from a 2.4Ghz machine myself, and it doesn't compile kernel 2.6 in 15 seconds, let alone boot in that short of a time. It takes at least a couple of minutes.
Hell, "make clean" takes longer than that.
Re:I call shenanigans on this (Score:4, Interesting)
15,000 - 16,000 lines per second for GCC vs 134,000 lines per second is a pretty huge speed improvement.
On the other hand, if "make clean" takes longer than 15 seconds on your machine, I have to wonder what you are doing. I'm typing this on a lowly 550 Mhz Pentium with 512 MB of RAM (running a full KDE install) and I can assure you I would be unhappy if running "clean" took that long.
This should go over BIG.. (Score:3, Funny)
..with the Gentoo crowd.
The once impossible dream of actually compiling the Linux kernel on every boot is now a shining reality.
Wha? (Score:3, Informative)
I guess 15 seconds is to compile without any device support other than the boot drive.
That said, linux boot time as it is sucks, especially if you want to use it on something like a router/firewall box like I do. The only button I ever press on that machine is reset. VPN not working? Reset.
That's how it should work IMO, but every time I do it the 'net is out for 10 mintues until it's back up.
Resetting the whole box should be faster than ssh'ing in and typing a "/etc/init.d/shorewall restart" and "/etc/init.d/openvpn restart".
Re:Wha? (Score:2, Insightful)
Resetting the whole box should be faster than ssh'ing in and typing a "/etc/init.d/shorewall restart" and "/etc/init.d/openvpn restart".
Why? Resetting the box requires the whole OS and all support routines to be started. Restarting a couple of services doesn't - why on earth should rebooting the whole lot be faster? That being said, are you using a cut-down desktop distro? That is probably why it takes so long - take a look at the embedded market for hints on how to have a faster booting system.
Re:Wha? (Score:2)
Well, at that point, use acpd to run a script when you hit the reset button, and have the script take down all of the networking stuff, then put it back up.
Also, I trust your hard drives are all either mounted read-only?
Wow. That really is fast. (Score:5, Interesting)
Re:Wow. That really is fast. (Score:5, Interesting)
Blatant Karma Whoring: In case of a slashdotting.. (Score:4, Informative)
Introduction
TCCBOOT is a boot loader able to compile and boot a Linux kernel directly from its source code.
TCCBOOT is only 138 KB big (uncompressed code) and it can compile and run a typical Linux kernel in less than 15 seconds on a 2.4 GHz Pentium 4.
TCCBOOT is based on the TinyCC compiler, assembler and linker. TinyCC is an experiment to produce a very small and simple C compiler compatible with the GNU C compiler and binary utilities.
Screenshots
Download
ISO image demonstation: tccboot.iso (5.9 MB).
Create a CD from it and boot it to see TCCBOOT in action (PC with at least 64 MB of RAM required). You can also try it with the QEMU PC emulator.
TCCBOOT source code: tccboot-0.1.tar.gz, and README file.
Yes, it starts booting (Score:2, Interesting)
In Soviet Russia.... (Score:2, Funny)
Compiles itself NOT the Kernel (Score:2)
Re:Compiles itself NOT the Kernel (Score:2)
Pretty impressive if they can do it, still I wonder what modules are loaded? Are they really compiling or just linking? I wonder how fast my P-133 would boot...
So I'm guessing here... (Score:2)
But I'd say the time they are speaking of is the time from power-up until /sbin/init starts running.
Given that...15 seconds is not as huge a deal as they imply... although it's pretty darn neat that it can compile the kernel in that amount of time.
My system starts the init process in only a few seconds too, I've never actually timed it, but it's _DEFINITELY_
Consumer Devices (Score:2, Interesting)
Im wondering if this level of functionality and speed becomes helpful when applied to consumer devices. Or situations where the average user is not able, or capoble, to make changes at this level.
Things like mobile phones. The consumer wont have the abilities to re compile, if say; they connect device like a camera.
The mobile can recognize the device, and retrieve the drivers from the hardware. Then a quick rebuild, and the mobile is configured for the new hardware. (of course a re-boot is still necess
Imagine a (Score:4, Funny)
LinuxBIOS (Score:3, Informative)
BIOS there's the LinuxBIOS [linuxbios.org].
It looks like its only for clusters but I'd
like to get it from my next Linux box.
This guy is amazing. (Score:5, Interesting)
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
Tcc seems truly amazing (Score:2, Informative)
I had to download its source code, build it and use it to believe it. 100k for something that compile a C code about 5 times faster (my very rough measures) is something I would have consider a joke if I could not see it in action.
Obviously, it probably not do all the optimizations gcc implements, but still. Wow.
Less than perfect first impression (Score:3, Informative)
This is fixed by defining __TINYC__ in the rule for bcheck.o, and you get a tcc executable. Trying to remake it with itself
Results in complaints about stddef.h not found. Adding -I/usr/include/linux leaves us with other errors, and as Mr. Costello would say at this point, "I don't give a darn".My interest just ran dry for now.
-dB, on third base.
Re:What's the point ? (Score:2, Funny)
You just answered your own question:
I understand how geeky this is
Re:Just-in-time compilation (Score:5, Funny)
Owned (Score:2)
Re:TCC compiler (Score:5, Informative)