Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

TCCBOOT Compiles And Boots Linux In 15 Seconds

timothy posted more than 9 years ago | from the count-to-ten-very-slowly dept.

Announcements 342

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."

cancel ×

342 comments

Sorry! There are no comments related to the filter you selected.

Frosty Piss (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#10641422)

Oh yeah!!!

fp! (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#10641428)

fp

Poop! (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#10641429)

Frist Proop

Too fast... (5, Funny)

smudge8 (812705) | more than 9 years ago | (#10641438)

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.

Re:Too fast... (0, Redundant)

PeteDotNu (689884) | more than 9 years ago | (#10641460)

I, for one, welcome our liquid crystal overlords.

Re:Too fast... (1, Insightful)

garcia (6573) | more than 9 years ago | (#10641461)

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.

Do you actually reboot that often? I'm pissed off if I have to reboot once every 6 months.

There's always an "excuse" to be away from the screen. It's called having a life outside of your computer. If you have let your work enter your personal life so far that you seriously believe you have to be attached you have more problems than you think.

Re:Too fast... (3, Interesting)

stratjakt (596332) | more than 9 years ago | (#10641644)

I reboot my machines all the time, because it's easier than ssh'ing in, and figuring out what the problem is.

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 working, reset this box and wait a minute".

Linux can have really really long uptimes, but only if you have an admin who can babysit it and solve problems without rebooting.

I'm not an admin, and I don't have time to figure out why "dhcpcd" or "dnsmasq" decided they dont need to spawn anymore. While such problems could probably be easily fixed by deleting some lockfile or clearing some log, rebooting is just easier.

Linux needs to be able to boot fast to move forward, especially in the world of "embedded" or single-function PCs.

Re:Too fast... (1, Redundant)

OverlordQ (264228) | more than 9 years ago | (#10641466)

Erm, no offense, but if I have to piss or get a drink I go do that, just because the computer is on (Oh noes!) doesn't mean I'm forced to sit at it 24/7.

Re:Too fast... (2, Funny)

Anonymous Coward | more than 9 years ago | (#10641547)

if I have to piss ... I go do that

+2 Insightful. ... When did /. become a Zen monastery? "If you are hungry, then eat. If you are tired, then sleep."

Re:Too fast... (4, Funny)

Dasein (6110) | more than 9 years ago | (#10641480)

there'll be no excuse at all for leaving the screen

Um. Social life, family, sex, ....

Yes, I do realize that I'm posting to slashdot.

Re:Too fast... (5, Funny)

wrook (134116) | more than 9 years ago | (#10641567)

That might be OK for Windows. For Linux, you might not want to wait for a reboot to take a pee. Just a word of warning...

Re:Too fast... (5, Funny)

D-Cypell (446534) | more than 9 years ago | (#10641659)

I LIKE the delay when I have to reboot. It gives me time to have a pee, stretch my legs, have a drink...

Then I suggest you stay away from windows, you will end up as a dehydrated, 12 foot alcholic!

Re:Too fast... (5, Funny)

rattler14 (459782) | more than 9 years ago | (#10641701)

well said!

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

script? (3, Insightful)

sporty (27564) | more than 9 years ago | (#10641440)

So they effectively make the kernel a script instead of a compiled unit, where it needs to be loaded, compiled into memory, and then used.


Perl5 does the same thing. read, compile, run..


So what are the uses for this?

Re:script? (1)

Skinkie (815924) | more than 9 years ago | (#10641452)

Compile Gentoo in lets say 5 minutes?

Re:script? (5, Insightful)

vidarh (309115) | more than 9 years ago | (#10641487)

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 :-)

Re:script? (2, Funny)

Ford Prefect (8777) | more than 9 years ago | (#10641534)

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...

How about using it to bootstrap Emacs? That's virtually an operating system already... ;-)

Re:script? (2, Informative)

Alioth (221270) | more than 9 years ago | (#10641730)

It should never need a kernel compile (I'll make an exception for an experimental driver) - they should all compile fine as modules. All the most recent 3rd party Linux drivers I've used just needed the module compiling and then loading - not even a reboot was needed.

usefulness? (5, Interesting)

FUF (68684) | more than 9 years ago | (#10641441)

Why would anyone *possibly* want their bootloader be able to compile the kernel?

Re:usefulness? (1, Funny)

EaterOfDog (759681) | more than 9 years ago | (#10641454)

I want my bootloader to write the operating system from scratch.

Re:usefulness? (2, Interesting)

nick-less (307628) | more than 9 years ago | (#10641470)

Why would anyone *possibly* want their bootloader be able to compile the kernel?

So you never fucked up your .config and tried to boot a kernel that wont support harddisk without having a backup kernel somewhere? Hell, you seem to be a lot smarter than me...

Re:usefulness? (2, Interesting)

cbreaker (561297) | more than 9 years ago | (#10641513)

I've never made my Linux boxes completly unbootable. I've always put in a link to the old kernel, or something.

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? (0)

Anonymous Coward | more than 9 years ago | (#10641649)

Hell, you seem pretty dumb to me...

Re:usefulness? (0, Troll)

DogDude (805747) | more than 9 years ago | (#10641658)

So you never fucked up your .config and tried to boot a kernel that wont support harddisk without having a backup kernel somewhere? Hell, you seem to be a lot smarter than me...

If you even can screw up your Linux install that badly, then that's a very serious design flaw.

Re:usefulness? (1)

Short Circuit (52384) | more than 9 years ago | (#10641750)

Erm...you can do the same thing to Windows NT/200/XP systems. Not that you can recompile your kernel, but you can probably configure the bootloader to load DOS instead of XP.

Re:usefulness? (1)

Hard_Code (49548) | more than 9 years ago | (#10641692)

Grub understands ext file systems and gives you a console that is pretty flexible, so unless you intentionally deleted all backup bootable kernels (shame on you) you should still be able to boot in some manner.

Re:usefulness? (2, Interesting)

Gherald (682277) | more than 9 years ago | (#10641751)

> Grub understands ext file systems and gives you a console that is pretty flexible, so unless you intentionally deleted all backup bootable kernels (shame on you) you should still be able to boot in some manner.

Yeah, like... ummm, KNOPPIX?

Been there done that :)

Re:usefulness? (1)

binford2k (142561) | more than 9 years ago | (#10641728)

sorry. No.

Optimizer? (2, Insightful)

Anonymous Coward | more than 9 years ago | (#10641502)

Why would anyone *possibly* want their bootloader be able to compile the kernel? ...and I can hardly imagine just how un-optimized the code from the tiny cc compiler must be.

Re:usefulness? (2, Informative)

Anonymous Coward | more than 9 years ago | (#10641512)

It's called a "hack".

Have the last nerd left the building?

Re:usefulness? (4, Interesting)

Walkiry (698192) | more than 9 years ago | (#10641518)

Two words: ATI drivers. These fuckers have to be compiled in the kernel, and I don't doubt there may be some other dumbasses who make similar drivers for other stuff. If the kernel just compiles like that (as in, is designed to just compile on boot), it'd make messing with the drivers less painful.

Re:usefulness? (2, Interesting)

jimicus (737525) | more than 9 years ago | (#10641621)

There is a world of difference between re-compiling the kernel and actually getting your nicely recompiled kernel working properly.

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? (5, Insightful)

Jahf (21968) | more than 9 years ago | (#10641671)

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 :)

Re:usefulness? (1)

FUF (68684) | more than 9 years ago | (#10641576)

Yanno, I'm *really* tempted to give this a try just so I can make a new version of /usr/bin/uptime by parsing /bin/uname -v and /bin/date output, and calculating the difference :p

What we really want to know is (4, Funny)

Anonymous Coward | more than 9 years ago | (#10641442)

How long does it take to boot Gentoo?

Re:What we really want to know is (1)

nick-less (307628) | more than 9 years ago | (#10641524)

How long does it take to boot Gentoo?
look here [slashdot.org] for exact timings... ;-)

Hmm (4, Funny)

Anonymous Coward | more than 9 years ago | (#10641443)

If only they could apply this to compiling the rest of Gentoo . . .

Yes, but... (4, Funny)

Anonymous Coward | more than 9 years ago | (#10641444)

does it run Linux?

Do you know what this means?! (5, Interesting)

AKAImBatman (238306) | more than 9 years ago | (#10641446)

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.

Limited (1)

smudge8 (812705) | more than 9 years ago | (#10641498)

When I first read that comment, I thought cool, independent LiveCDs... but the bootstrap procedure is still architecture-dependant. Whatever program does the on-the-fly compiling, it will need to be architecture-specific.

Re:Limited (1)

SpaceLifeForm (228190) | more than 9 years ago | (#10641629)

Yes. TCC is specifc for x86 platform anyway.

Re:Do you know what this means?! (0)

Anonymous Coward | more than 9 years ago | (#10641545)

P-Code? But then shouldn't we allow linux contributions in Pascal? :-P

Re:Do you know what this means?! (1)

SpaceLifeForm (228190) | more than 9 years ago | (#10641583)

You'll always need binaries. You'll need your base toolchain as binary in order to compile anything (including a new toolchain).

Re:Do you know what this means?! (1)

Rentar (168939) | more than 9 years ago | (#10641679)

That's pretty much the same idea that was realized in each high-level language that is less than 10 years old (and several that are older):

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 tccboot is in any way good for cross-platform stuff. If I wanted cross-platform I would have written in a high-level language that was designed to be cross-platform (Python, Ruby, Java, C#, Perl, Brainfuck ... pick your poison).

Don't misunderstand me: tccboot is cool and it has a quite high geek value, but it's not The Next Big Thing!

Just-in-time compilation (0)

Anonymous Coward | more than 9 years ago | (#10641447)

How does it deal with
someint = *null_pointer;
then? A LaTeX-style command prompt?

Re:Just-in-time compilation (4, Funny)

maxwell demon (590494) | more than 9 years ago | (#10641595)

Well, maybe a BIOS-integrated Emacs automatically launches and allows you to edit the code ...

What's the point ? (1)

mirko (198274) | more than 9 years ago | (#10641448)

I understand how geeky this is but what would its uses be ? Especially when it's now become possible to boot a full featured Linux distro from an USB key ?

Re:What's the point ? (2, Funny)

Anonymous Coward | more than 9 years ago | (#10641549)

I understand how geeky this is but what would its uses be ? Especially when it's now become possible to boot a full featured Linux distro from an USB key ?

You just answered your own question:
I understand how geeky this is

But why? (3, Insightful)

jolyonr (560227) | more than 9 years ago | (#10641451)

It doesn't actually explain on the site why anyone would want to do this.

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? (3, Interesting)

mbrezu79 (669155) | more than 9 years ago | (#10641558)

Well, I'm no kernel hacker, but I guess this could help speed up the debug cycle for the kernel in some instances.

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 (including Bellard) believes TCC is any good for delivered apps (it doesn't optimize etc.) but it can provide a huge boost to edit-compile-debug cycles.

So yes, TCC is very cool, but not useful for the general public.

I'm trying to think of a reason why ... (3, Insightful)

nels_tomlinson (106413) | more than 9 years ago | (#10641457)

I know that the answer to ``why?'' is ``why not?''. but I'm trying to think of some practical use for this.

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 ... (2)

vidarh (309115) | more than 9 years ago | (#10641519)

CPU specific optimizations would be a benefit, but having looked at TCC I doubt it currently does anything of the sort :-) And of course I doubt the tiny performance improvement you could get out of it would make a difference if you're running off a CD anyway... :)

Re:I'm trying to think of a reason why ... (1)

mkro (644055) | more than 9 years ago | (#10641522)

Sounds perfect for a Gentoo live cd ;)

Not a complete compile (4, Informative)

cbreaker (561297) | more than 9 years ago | (#10641458)

The README says it needs some of the binaries and headers on the linux kernel, so you have to pre-compile these first.

I guess this could have some limited use somewhere, perhaps, but I can't really see how if you need some precompiled stuff.

No. Fucking. Way. (0)

Anonymous Coward | more than 9 years ago | (#10641464)

It takes that long to just read all the files in the kernel source tree. There is no way this thing does what it says.

Great for Gentoo (5, Funny)

Solder Fumes (797270) | more than 9 years ago | (#10641465)

Now they can compile their kernel with "-mday=Wednesday" for even better optimization.

Re:Great for Gentoo (0)

Anonymous Coward | more than 9 years ago | (#10641616)

> Now they can compile their kernel with "-mday=Wednesday" for even better optimization.

lol.

Re:Great for Gentoo (0)

Anonymous Coward | more than 9 years ago | (#10641686)

while that comment was slightly funny, get over it already. if you don't want to compile your applications from source don't but for the love of god, WHY make fun of others that do? its simply ignorant and shows that you lack a adequate understanding of why someone might want to do such an activity. grow up.

Architecture Independence (2, Informative)

Ford Prefect (8777) | more than 9 years ago | (#10641473)

For some reason, I'm reminded of the platform-independent device drivers and boot code written in Forth in Open Firmware [openfirmware.org] .

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?

I've always wanted one of those... (0)

pyro jackelope (771283) | more than 9 years ago | (#10641474)

Hmm...it boots up really fast...but how quickly does it shut down? Sounds like something a nerd invented so he can hide his porn habits from his parents =D. JK/JK...really sweet though. And what's this about a 2.4 ghz p4? Yeah, those were cool a couple months ago =D. They can run what...solitaire? ;-).

Advantage? (1)

cmad_x (723313) | more than 9 years ago | (#10641478)

Is there an advantage in booting directly from the kernel source?

How? (4, Interesting)

wowbagger (69688) | more than 9 years ago | (#10641486)

How can this thing:

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? (0)

Anonymous Coward | more than 9 years ago | (#10641531)

> when it takes much longer than that for my already booted system to build a kernel ?

Because you build with gcc. They use tinyCC..

It would also take 15 seconds to build your kernel after boot. Doing it a boot time is uber geeky.

Re:How? (5, Informative)

vidarh (309115) | more than 9 years ago | (#10641561)

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.

Re:How? (1)

gathond (236744) | more than 9 years ago | (#10641585)

If you read the slashdot text it says 15 seconds to compile and "start" to boot the kernel, not 15 seconds to compile AND boot the kernel.

My guess it the kernel would probably be alot slower, since I doubt tinyCC optimises much

Re:How? (0)

Anonymous Coward | more than 9 years ago | (#10641623)

But his question (and mine) is about the 15 seconds to compile the kernel.

Re:How? (1)

r6144 (544027) | more than 9 years ago | (#10641743)

Here [kerneltrap.org] someone compiled kernel 2.5.7 on a 32-way Power4 1.1GHz within 7.52 seconds, in 2002.

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 compilation.

Wow! Ultimate Gentoo! (5, Funny)

Eunuchswear (210685) | more than 9 years ago | (#10641490)

Recompile your programs EVERY TIME YOU RUN THEM.

Ricers Rule!

Re:Wow! Ultimate Gentoo! (1)

borgdows (599861) | more than 9 years ago | (#10641580)

ROFLMAO!!

mod parent +1000 Funny AND Insightful :)

A.K.A. (2, Funny)

Omni-Cognate (620505) | more than 9 years ago | (#10641600)

Java

Re:Wow! Ultimate Gentoo! (1)

maxwell demon (590494) | more than 9 years ago | (#10641632)

Well, that's still not the ultimate. The ultimate would be to compile the program while you run it, i.e. a JIT C compiler.

Re:Wow! Ultimate Gentoo! (0, Redundant)

Speare (84249) | more than 9 years ago | (#10641642)

Recompile your programs EVERY TIME YOU RUN THEM.

Oh, you mean like Perl? Or JIT JVMs?

Wow (3, Funny)

physicsphairy (720718) | more than 9 years ago | (#10641493)

My windows box and I would still be trying to negotiate whether it wanted to boot in "Normal Mode" "Safe Mode" "Last Known Good Configuration" or "Sorry, chap, just not gonna happen."

Main reason for this? (5, Insightful)

kbahey (102895) | more than 9 years ago | (#10641497)

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? (1)

uberchicken (121048) | more than 9 years ago | (#10641590)

Thank you.

The most intelligent and useful post so far, including this one.

Slashdot v. Freshmeat (0, Troll)

Anonymous Coward | more than 9 years ago | (#10641508)

Have we really devolved to the point we have nothing but project announcements? Surely there's news of substance, but if there isn't, why not keep yesterday's important news on the front page? This "story" is absolutely nothing but a project announcement. It's nothing new, nothing special, and nothing newsworthy. How many people here read USA Today for the ads? If you do, would you still do it if you could get just the ads without the news?

I call shenanigans on this (1, Interesting)

Weaselmancer (533834) | more than 9 years ago | (#10641517)

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 (1)

stratjakt (596332) | more than 9 years ago | (#10641596)

That's because you're using GCC.

The submission is misleading, it takes 15 seconds for TCC to compile the kernel (without modules and just enough support to read the HDD). They just jammed the compiling into boot time. So 15 seconds from when your POST screen clears to the time the machine actually starts booting the kernel.

Boot time would still be measured in minutes, it doesn't magically make init.d or all the other crud load up fast.

Re:I call shenanigans on this (3, Interesting)

Godeke (32895) | more than 9 years ago | (#10641619)

Looking at benchmarks for TCC, combined with the fact this needs kernel patches to work, I don't see this as shenanigans.

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.

Reading comprehension is a lost art...... (0)

Anonymous Coward | more than 9 years ago | (#10641638)

Next time read it twice or three times
before opening up your reply box...

and STARTS to boot in less than 15 seconds...

Re:I call shenanigans on this (0)

Anonymous Coward | more than 9 years ago | (#10641677)

You need to realize that most time in a compiler (on a large source) is spent optimizing. If you don't optimize, you can be very fast (in fact, you can just output asm/binary as you parse). TCC sounds like it's written to be small and fast, which probably sacrifice things we take for granted in a production compiler; standards compliance and optimizations (which in itself req. a different internal representation of the code which might not be speed efficient to build/traverse)

Re:I call shenanigans on this (1)

ciupman (413849) | more than 9 years ago | (#10641746)

It doesn't compile the whole kernel .. just the the main core and some drivers, wich will be sufficient to boot the machine, start the init process and then a shell! In my AMD XM 2.5 (mobile) inside a VMWare machine it takes 20 to 30 seconds to compile and run! Before posting you should've tried it yourself!

This should go over BIG.. (3, Funny)

murderlegendre (776042) | more than 9 years ago | (#10641540)

..with the Gentoo crowd.

The once impossible dream of actually compiling the Linux kernel on every boot is now a shining reality.

Re:This should go over BIG.. (0)

Anonymous Coward | more than 9 years ago | (#10641711)

wow, your impossibly accurate wit is amazing.... except that you are like the 15th comment about Gentoo. next time show up on time and you won't look like a total jerk by doing nothing but hurting the linux community as a whole! If you don't want to compile your software youself, then don't. but get over that fact that other people take advantage of such an activity. grow up.

Re:This should go over BIG.. (0)

Anonymous Coward | more than 9 years ago | (#10641736)

Hardly. The benefit of Gentoo is that compiling programs specially for your hardware makes them faster on your hardware. A C compiler this fast and small isn't doing a lot of platform-specific optimization.

Wha? (3, Informative)

stratjakt (596332) | more than 9 years ago | (#10641556)

It takes a couple minutes to compile my kernel on a 3.06 P4, and of course, forever and a day to boot.

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".

Wow. That really is fast. (5, Interesting)

TheRaven64 (641858) | more than 9 years ago | (#10641566)

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:Wow. That really is fast. (4, Interesting)

TheRaven64 (641858) | more than 9 years ago | (#10641589)

I just ran the same thing again (exactly the same configuration), with a stopwatch. 46 seconds. 15 seconds on a P4 sounds like they were being a bit pessimistic. Note that this doesn't include launching any daemons, or a
sh-2.05b# ps -x
PID TTY STAT TIME COMMAND
1 ? S 0:01 /bin/sh /sbin/init auto
2 ? SW 0:00 [keventd]
3 ? SW 0:00 [bdflush]
4 ? SW 0:00 [kupdated]
5 ? SWN 0:00 [ksoftirqd_CPU0]
6 ? SW 0:00 [kswapd]
15 ? S 0:00 /bin/sh
17 ? R 0:00 ps -x

Blatant Karma Whoring: In case of a slashdotting.. (3, Informative)

jimicus (737525) | more than 9 years ago | (#10641570)



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 (2, Interesting)

PhilipOfOregon (771069) | more than 9 years ago | (#10641604)

but when does it *finish* booting?

In Soviet Russia.... (2, Funny)

MetaMarty (38276) | more than 9 years ago | (#10641607)

The kernel compiles your bootloader!! Oh wait...

Lifestyles of the seriously bored... (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#10641622)

This is, by far, the most pointless thing I've ever seen. Show me some screenshots of a bootloader working a man sausage like so many 17 year old coked up runaways who "just wanna go home" and I'll be impressed.

compile-time kernel (2, Interesting)

jproffer (766368) | more than 9 years ago | (#10641639)

Hmm very interesting. This could be very useful on embedded systems running linux, using hot-swap or hot-plug technology, and you want to have drivers compiled into the kernel at bootup for faster performance or better stability.

Compiles itself NOT the Kernel (1)

PetoskeyGuy (648788) | more than 9 years ago | (#10641663)

It compiles and loads itself, then loads the kernel. Still you have to wonder what's doing the compiling and loading of the source? Sounds like one of those compressable compressors.

Re:Compiles itself NOT the Kernel (1)

PetoskeyGuy (648788) | more than 9 years ago | (#10641703)

I was wrong.

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...

Maybe for testing (1)

rico_el_diablo (208537) | more than 9 years ago | (#10641680)

I try to figure out what to do whith this mad project.
The only thing I see for rapid testing of large scale C application like testing an OS.

Maybe to test a kernel new build: rapid boot inside qemu with TCCBOOT. So you don't have to reboot your pc to test your new kernel configuration.

I don't if this scenario is realistic or not...

Other ideas?

note to editor (1)

phil42 (24711) | more than 9 years ago | (#10641683)

Please slashback this if it turns out to be untrue.

But...uh .... (0)

Anonymous Coward | more than 9 years ago | (#10641712)

I can boot Windows from cold metal in 10 seconds.

Specs: 3.4GHz P4, 1024MB Ram, 80GB 8MB 7200 SE WD HDD, etc, etc.

Why is this so special of a story? Just because you can compile code into binaries and then boot from that doesn't mean anything special. Did the article mention HOW MUCH CODE is being compiled? Compiling 10K lines is nothing. Try compiling 15M lines and come back to the show for admittance, kids.

TCC compiler (1)

ratta (760424) | more than 9 years ago | (#10641718)

Seriously, how good is the tcc compiler to be used as a default compiler? could it be used as a replacement for gcc (that is so slow)? Does it support debugging information and some optimization?

So I'm guessing here... (1)

mark-t (151149) | more than 9 years ago | (#10641740)

Because TFA doesn't give any details... (what does it say about the article when some of the /. posts on it are longer than the article itself?)

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_ well under half a minute. For comparison, my system is only a 1.2GHz machine.

It's what happens once /sbin/init has finished loading and starts reading and executing the commands in the /etc/inittab file that seems to take so long as part of a reboot.

By the way, considering that /sbin/init itself is an ELF binary, I don't see any great advantage to being able to recompile the kernel at boot time. There's certainly no portability benefits.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>