nixpkgs/pkgs/os-specific/linux/kernel
Shea Levy ac2035287f Greatly reduce kernel closure size
Based on access analysis with strace, I determined an essentially
minimal required set of files from the kernel source that was needed to
build all current kernel packages on 3.10, which ultimately resulted in
keeping 30M of source. Generalizing from that minimal set, which
required ad-hoc specifications of which headers outside of include/ and
arch/*/include and which files in the scripts/ directory should be kept,
to a policy of keeping all non-arch-specific headers that aren't part of
the drivers/ directory and the entire scripts/ directory added an
additional 17M, but there was nothing in the analysis that indicated
that that ad-hoc specification was at all complete so I think the extra
hit is worth the likely greater compatibility.

For reference, we now keep:

* All headers that are NOT in arch/${notTargetArch}/include or drivers/
* The scripts/ directory
* Makefile
* arch/${targetArch}/Makefile

IMO the most likely cause of future problems are the headers in
drivers/, but hopefully they won't actually be needed as they add 50M
Ideally kernel packages would only use include and
arch/${targetArch}/include, but alas this is observably not the case.

master:
  * $out
    * size: 234M
    * references-closure: linux-headers, glibc, attr, acl, zlib, gcc,
      coreutils, perl, bash
merge-kernel-builds:
  * $out
    * size: 152M
    * references-closure: none
  * $dev
    * size: 57M
    * references-closure: linux-headers, glibc, zlib, gcc

So even with the non-minimal set we still beat out master. Keeping the
drivers headers would make us only slightly bigger.

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-05 06:55:47 -05:00
..
common-config.nix splashutils: Remove 2013-09-26 18:03:43 +02:00
generate-config.pl Implement generic kernel build via manual-config 2014-01-01 09:21:25 -05:00
generic.nix Greatly reduce kernel closure size 2014-01-05 06:55:47 -05:00
grsec-path.patch grsecurity: Fix module loading during boot due to path restrictions 2013-11-27 01:32:50 +01:00
linux-3.2.nix linux: Update to 3.2.53 2013-12-04 15:28:20 +01:00
linux-3.4.nix linux: Fix hash 2013-12-17 13:27:03 +01:00
linux-3.10.nix linux: Update 3.10.18 -> 3.10.25 2013-12-29 07:53:23 -06:00
linux-3.11.nix linux: Update 3.11.8 -> 3.11.10 2013-12-29 07:53:19 -06:00
linux-3.12.nix Linux 3.12.6 2013-12-20 13:45:45 -05:00
linux-rpi-3.6.nix Set meta.hydraPlatforms instead of meta.platforms for some packages 2013-11-05 00:06:10 +01:00
linux.upstream.template Linux: Add 3.9-rc1 as lowPrio (it has a regression fix 3.8.2 lacks) 2013-03-06 23:59:49 +04:00
manual-config.nix Greatly reduce kernel closure size 2014-01-05 06:55:47 -05:00
mips-ext3-n32.patch mips linux: Adding a patch to fix an ext3 bug in 3.5 and 3.6 2012-11-06 00:16:13 +01:00
mips-fpu-sigill.patch Fixing the mips patch for sigill fpu cases. 2012-06-16 15:37:04 +00:00
mips-fpureg-emulation.patch Adding two kernel patches for mips, that make the life easier on loongson2f 2012-06-16 10:49:03 +00:00
no-xsave.patch Linux no-xsave.patch: commit patch into Nixpkgs since fetchurl no longer works 2012-07-02 16:53:53 +02:00
patches.nix Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
perf.nix Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
sec_perm-2.6.24.patch * Linux 2.6.25.4. 2008-05-21 09:19:44 +00:00