Slashdot Mirror


TCCBOOT Compiles And Boots Linux In 15 Seconds

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

8 of 342 comments (clear)

  1. usefulness? by FUF · · Score: 5, Interesting

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

    1. Re:usefulness? by Walkiry · · Score: 4, Interesting

      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.

      --
      ---- Take the Space Quiz!
  2. 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.

  3. How? by wowbagger · · Score: 4, Interesting

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

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

    --
    I am TheRaven on Soylent News
  5. Re:Wow. That really is fast. by TheRaven64 · · Score: 4, Interesting
    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
    --
    I am TheRaven on Soylent News
  6. Re:Main reason for this? by kbahey · · Score: 4, 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:

    #!/usr/local/bin/tcc -run
    main()
    {
    DoSomethingHere();
    }

    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.

  7. This guy is amazing. by meff · · Score: 5, Interesting

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