nixpkgs/pkgs
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
..
applications Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
build-support Update FLTK and TigerVNC; doesn't fix TigerVNC Xvnc build per se 2014-01-01 01:36:57 +04:00
data hicolor_icon_theme: minor update 0.12 -> 0.13 2013-12-28 15:08:47 +01:00
desktops Remove uses of __overrides feature 2013-12-30 11:04:45 -05:00
development systemtap: Remove from linuxPackagesFor 2014-01-02 00:03:49 -05:00
games warmux: forgot to add the patch 2013-12-21 07:10:59 +02:00
misc Update unstable Wine to 1.7.9 2013-12-30 02:32:19 +04:00
os-specific Greatly reduce kernel closure size 2014-01-05 06:55:47 -05:00
servers Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00
shells dash: enable Hydra builds on Linux 2013-12-21 00:05:38 +01:00
stdenv mkDerivation: Set meta.position to the source file of the derivation 2013-11-19 14:58:47 +01:00
test
tools Update FLTK and TigerVNC; doesn't fix TigerVNC Xvnc build per se 2014-01-01 01:36:57 +04:00
top-level Update and fix kernel packages to new kernel build 2014-01-04 21:17:04 -05:00