linux: Compress kernel modules

This reduces the kernel package from 185 to 62 MiB, for a neglible
boot time cost.
This commit is contained in:
Eelco Dolstra 2016-02-01 17:54:35 +01:00
parent b21ef9c9e6
commit 48f51f1185
2 changed files with 8 additions and 4 deletions

View File

@ -21,6 +21,12 @@
with stdenv.lib;
''
# Compress kernel modules for a sizable disk space savings.
${optionalString (versionAtLeast version "3.18") ''
MODULE_COMPRESS y
MODULE_COMPRESS_XZ y
''}
# Debugging.
DEBUG_KERNEL y
TIMER_STATS y

View File

@ -8,11 +8,9 @@ stdenv.mkDerivation rec {
sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs";
};
# Disable xz/zlib support to prevent needing them in the initrd.
buildInputs = [ pkgconfig libxslt xz /* zlib */ ];
buildInputs = [ pkgconfig libxslt /* xz zlib */ ];
configureFlags = [ "--sysconfdir=/etc" /* "--with-xz" "--with-zlib" */ ];
configureFlags = [ "--sysconfdir=/etc" "--with-xz" /* "--with-zlib" */ ];
patches = [ ./module-dir.patch ];