Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Announcements Software Linux

TCCBOOT Compiles And Boots Linux In 15 Seconds 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."
This discussion has been archived. No new comments can be posted.

TCCBOOT Compiles And Boots Linux In 15 Seconds

Comments Filter:
  • script? (Score:4, Insightful)

    by sporty ( 27564 ) on Wednesday October 27, 2004 @10:26AM (#10641440) Homepage
    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?

  • But why? (Score:4, Insightful)

    by jolyonr ( 560227 ) on Wednesday October 27, 2004 @10:27AM (#10641451) Homepage
    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
  • by nels_tomlinson ( 106413 ) on Wednesday October 27, 2004 @10:28AM (#10641457) Homepage
    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:Too fast... (Score:1, Insightful)

    by garcia ( 6573 ) * on Wednesday October 27, 2004 @10:28AM (#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:script? (Score:5, Insightful)

    by vidarh ( 309115 ) <vidar@hokstad.com> on Wednesday October 27, 2004 @10:30AM (#10641487) Homepage Journal
    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 :-)

  • by kbahey ( 102895 ) on Wednesday October 27, 2004 @10:30AM (#10641497) Homepage

    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.

  • Optimizer? (Score:2, Insightful)

    by Anonymous Coward on Wednesday October 27, 2004 @10:31AM (#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? (Score:5, Insightful)

    by Jahf ( 21968 ) on Wednesday October 27, 2004 @10:50AM (#10641671) Journal
    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? (Score:4, Insightful)

    by walt-sjc ( 145127 ) on Wednesday October 27, 2004 @11:13AM (#10641973)
    Nice troll. That's like saying: "if you CAN drive your car into a tree, then that's a very serious design flaw." There is no way that you can design a general purpose OS that is immune to "operator head-gap errors." Believe me: I can easily screw up Windowsi, MacOS, any flavor of Unix, etc. to the point where they won't boot by going in and playing with the registry, system settings, driver resources, etc.

    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.
  • Re:Wha? (Score:2, Insightful)

    by blane.bramble ( 133160 ) on Wednesday October 27, 2004 @11:16AM (#10642030)

    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.

  • by skiman1979 ( 725635 ) on Wednesday October 27, 2004 @12:00PM (#10642717)
    As a matter of fact, I have compiled on Gentoo. I run Gentoo at home as my main system. Although I haven't compiled all of Gentoo (i.e., stage1), I have recompiled the kernel a few times and compiled a few other larger applications. They just compile in a konsole window in the background while I work on other things. So, like I said, what's the big deal? It's not like I need my new kernel *now*.
  • Re:script? (Score:2, Insightful)

    by torpor ( 458 ) <ibisum.gmail@com> on Wednesday October 27, 2004 @12:08PM (#10642842) Homepage Journal
    manufacturing makes a machine, it has tccboot in firmware. product is finished, goes to be tested. first test: turn it on, it compiles its own kernel, its own operating system, its own libs. its own app. there is no 'image copied' for mfr'ing; the machine makes its own software itself (source code is served to the firmware over network).

    why would this be cool? it would mean an end to the 'all systems run the same binary' dilemna, you know .. the reason for the success of software piracy?

    i predict that there will be a distro of linux, using tccboot, in the very near future, which offers the ability to encrypt everything to a unique system key, probably something on-chip. per-processor, custom binaries, it will only run what it compiles itself.
  • Re:Too fast... (Score:2, Insightful)

    by bhirsch ( 785803 ) on Wednesday October 27, 2004 @12:10PM (#10642874) Homepage
    The best is web surfing in links/lynx. Terminals = hard work!
  • by torpor ( 458 ) <ibisum.gmail@com> on Wednesday October 27, 2004 @12:13PM (#10642918) Homepage Journal
    It means you can now make a computer that'll only run its own binaries, finally, and not only that but the process that allows it becomes an essential part of the manufacturing/QA stage.

    TCCBOOT is what is going to defeat the DMCA, because pretty soon, from firmware on, we can all be encrypting our own executable binaries to a safe and unique internal system key. TCCBOOT makes it possible to integrate even the operating system build into a key-based, locked-down-in-sillicon, complete computing system.

    As a manufacturer of equipment, this is exciting to me. As a consumer, it sorta is a bit scarey, but I don't wanna be much of a consumer any more anyway, so I'm not that freaky about it.. as a programmer, this really interests me because it means I could probably make money from software again; it'd mean I'd have to *only distribute source* (i.e. the death of precompiled binaries), but then, I like that anyway, being an F/OSS activist, as I am ..

    TCCBOOT is a big wind in a very small place.
  • by khasim ( 1285 ) <brandioch.conner@gmail.com> on Wednesday October 27, 2004 @01:22PM (#10644006)
    I reboot my machines all the time, because it's easier than ssh'ing in, and figuring out what the problem is.
    I guess that depends upon what the symptoms are. But "insightful"? Only if you only know Windows.

    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".
    I have problems with Comcast. But I only have to tell people to reset the cable modem. The firewall never has problems.

    Linux can have really really long uptimes, but only if you have an admin who can babysit it and solve problems without rebooting.
    There's no need to "babysit" Linux. Once you've set it up correctly, it keeps running.

    10:15:56 up 156 days, 19:54, 1 user, load average: 0.00, 0.00, 0.02

    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.
    There's a problem waiting to happen. Will you know if you've setup something wrong on your firewall and you get cracked?

    Rather, you are a good example of why ISP's need to offer "managed" services. The Internet is not a safe place to connect a computer and too many people are unwilling to take the time to learn how to protect their systems.
  • by khasim ( 1285 ) <brandioch.conner@gmail.com> on Wednesday October 27, 2004 @02:35PM (#10644944)
    It works so well the other way, though. You Linux people often have no idea what you're doing on Windows, i suppose mostly because you refuse to learn it rather than you're too stupid to.
    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.

    You see it ALL THE TIME on here, people bitching about how ugly Windows is, how much useless crap it comes with, how you can't change ___ (which just means you don't know where to look), how it crashes non-stop, how it's so slow, et cetera.
    Ugly is a matter of opinion.

    The useless crap can be removed, UNLESS you're talking about IE which is a problem because it is bolted to the OS which makes the security problems in IE operating system holes.

    The crashes can usually be mitigated by rebooting the system. Remember, Microsoft has issued a couple of service packs to deal with problems such as that. Until you get the service pack that fixes the crash bug you're experiencing, you don't have much in the way of options, do you?

    None of it is true if you have any idea at all what you're doing, but more often than not some moron whining about how Windows crashes all the time (i have never once had Windows XP crash, and i've been using it continuously since the beta versions) will get his post modded up insightful. -___-
    What that actually means is that you've never triggered any of the crash bugs that Microsoft has admitted to.

    If you don't use a sub-system that has a crash bug in it, is it because you know how to use Windows or because you are avoiding those bugs?

    (This doesn't necessarily reflect on you, per se, but your 'only know Windows' comment leads me to believe that you might be one of these people after all, because i know i certainly don't fix problems by just rebooting.)
    The problem with Windows is that it isn't designed for easy diagnostics. It is easier to just reboot it than to actually find the problem.

    With Linux, the diagnostic process is easy.

    Go ahead. Show that I'm wrong. What would you do if you were getting a blue screen on startup with a message about the software hive?

The only possible interpretation of any research whatever in the `social sciences' is: some do, some don't. -- Ernest Rutherford

Working...