Announcement

Collapse
No announcement yet.

Building The Default x86_64 Linux Kernel In Just 16 Seconds

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by discordian View Post
    Now you can checkout the Linux master branch, compile the kernel and kexec into it from initrd. All while still booting faster than many systems.
    Rolling release was yesterday, now it's run-from-source!
    tcc was able to boot from the linux source about 15 years ago: https://bellard.org/tcc/tccboot.html

    Comment


    • #12
      Originally posted by birdie View Post

      What about building in tmpfs? ;-)
      Can't believe Michael hasn't heard about building applications in RAM. It didn't make sense with older machines, but now even most desktops have sufficient RAM for building large projects such as the kernel in RAM. The sources require around 1 GB, and the resulting binaries also need 1-2 GB. While compiling, each gcc thread probably uses few hundred megabytes at most. So, 32 GB might be enough for building on a 64 core system.

      Comment


      • #13
        Originally posted by caligula View Post

        Can't believe Michael hasn't heard about building applications in RAM. It didn't make sense with older machines, but now even most desktops have sufficient RAM for building large projects such as the kernel in RAM. The sources require around 1 GB, and the resulting binaries also need 1-2 GB. While compiling, each gcc thread probably uses few hundred megabytes at most. So, 32 GB might be enough for building on a 64 core system.
        It's not a matter of "not heard of", but rather trying to be realistic - how many people actually build in tmpfs?
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #14
          Originally posted by Michael View Post
          It's not a matter of "not heard of", but rather trying to be realistic - how many people actually build in tmpfs?
          You can build outside tmpfs?

          All buildslaves I setup build in tmpfs, debian packages can be built in tmpfs (and their wiki documents how: https://wiki.debian.org/sbuild#sbuild_overlays_in_tmpfs). With eclipse I add a link to /tmp/x.y.z/build (/tmp - as you might have gueesed - is a tmpfs), eclipse will automatically create the folder is missing.
          The only downside would be missing RAM, if the linker step needs alot of it...
          Last edited by discordian; 08-14-2019, 07:48 AM.

          Comment


          • #15
            Originally posted by Michael View Post

            It's not a matter of "not heard of", but rather trying to be realistic - how many people actually build in tmpfs?
            I've been doing that for the past 10 years or even longer. It also allows your disks (specially SSDs) to live longer.

            As far as I know many distros now build in tmpfs to speed up the process.

            Comment


            • #16
              Compile the Linux-Libre kernel, Michael. Probably be able to do it in under 10 seconds without all the proprietary bits.

              Comment


              • #17
                is that "make vmlinux" or "make" (ie. all)?

                Comment


                • #18
                  Originally posted by ernstp View Post
                  is that "make vmlinux" or "make" (ie. all)?
                  https://openbenchmarking.org/innhold...9318861580923a
                  Michael Larabel
                  http://www.michaellarabel.com/

                  Comment


                  • #19
                    Originally posted by Michael View Post

                    It's not a matter of "not heard of", but rather trying to be realistic - how many people actually build in tmpfs?
                    It's the first tweak I do regardless of what distribution I'm using. I also assume that it's one of the first things people who compile lots of software do as well.

                    I has a sad. That compiles the kernel around 75x faster than my computer.



                    Comment


                    • #20
                      I know Ubuntu's kernel config has a million modules but perhaps the defconfig has less... I wonder how long time it takes with Ubuntu's config.

                      Also, it would be fun to see a graph with different -j N values! I'm guessing you would actually run into buildsystem limitations there, that it doesn't have 64 or 128 tasks to queue up all the time.

                      Comment

                      Working...
                      X