Hacker News new | ask | show | jobs
by imoverclocked 1 day ago
It’s fairly easy to build your own kernel packages from vanilla sources in Debian. I’m running the latest 7.0.x within a few hours of its release. The build takes about 30-45 minutes depending on how much time I spend on skimming the ChangeLog. YMMV.
5 comments

> The build takes about 30-45 minutes

If you don't actually need all the drivers, you can use "make localmodconfig" to substantially reduce that. My local kernels build in 90 seconds on a 32-thread desktop machine :)

The kernel is a lot more stable than people think: I run the daily linux-next on my Debian stable gaming PC to look for bugs, and I don't find very many.

You're being a bit disingenuous, it builds in 90 seconds because you build it daily and the vast majority of objects are unchanged and cached by ccache.
No, I don't think that's what happening actually.

A stripped down cold build will literally take 90 seconds without caching on modern hardware.

The overwhelming majority of stuff that is being built is drivers, and most of them probably aren't needed for any specific user, so you can disable quite a lot of stuff.

Fwiw a full build of the fedora kernel config takes around 5-10m for my 12core ryzen 3900x, and it's definitely not the fastest CPU around.

No, 90 seconds is the clean build time without ccache.
try to build it with make clean first
It's actually faster than I remembered:

  {0}[calvinow@sousa ~/git/linux] git describe
  v7.1
  {0}[calvinow@sousa ~/git/linux] git clean -dffxq
  {0}[calvinow@sousa ~/git/linux] zcat /proc/config.gz > .config
  {0}[calvinow@sousa ~/git/linux] time make -skj32 tar-pkg
  './System.map' -> 'tar-install/boot/System.map-7.1.0'
  '.config' -> 'tar-install/boot/config-7.1.0'
  './vmlinux' -> 'tar-install/boot/vmlinux-7.1.0'
  'arch/x86/boot/bzImage' -> 'tar-install/boot/vmlinuz-7.1.0'
  
  real    0m56.539s
  user    18m41.863s
  sys     2m8.754s
I did that for a while because of compatibility issues with a newer laptop, it works but generally if there is no reason it's way easier to stay with the provided packages. Compiling weekly due to security patches becomes annoying over time for no real gain other than the version number
> It’s fairly easy to build your own kernel packages from vanilla sources in Debian.

IIRC, Debian has a command called "make-kpkg" which does nearly all the work for you, ending up with a installable package which works identically to the standard Debian kernel packages.

I miss the days when my 486 took about 12 hours to compile a kernel
Or it took >15 minutes to generate PGP 2.x private keys due to entropy generation and prime calculations/tests.
what about your carbon footprint
I build using excess solar from my house. The build host is a small arm64 SBC that doesn’t require cooling in my passively cooled garage.

The resources behind your post likely have a larger carbon footprint.

Turn the shed light off overnight and you’re at net zero