diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-03-05 12:42:31 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-03-05 12:49:59 +0100 |
commit | 165b32d3863889f8c3615c676a201c889d860da6 (patch) | |
tree | f261d97bd4718983821ba912017ee59eb9aaa744 /pkgs/build-support/kernel | |
parent | 97693915e1d31478528ee72e8d1fea5aa384577b (diff) | |
download | nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.tar nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.tar.gz nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.tar.bz2 nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.tar.lz nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.tar.xz nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.tar.zst nixpkgs-165b32d3863889f8c3615c676a201c889d860da6.zip |
Revert "makeInitrd: Use closureInfo"
This reverts commit 776a5e6ebfacc6831527bc6c3c1a58ef2087c819. Fixes #36268.
Diffstat (limited to 'pkgs/build-support/kernel')
-rw-r--r-- | pkgs/build-support/kernel/make-initrd.nix | 9 | ||||
-rw-r--r-- | pkgs/build-support/kernel/make-initrd.sh | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index a4d162dc8b5..5353ae82841 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -12,7 +12,7 @@ # `contents = {object = ...; symlink = /init;}' is a typical # argument. -{ stdenv, closureInfo, cpio, contents, compressor, prepend, ubootTools +{ stdenv, perl, cpio, contents, compressor, prepend, ubootTools , hostPlatform }: @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { makeUInitrd = hostPlatform.platform.kernelTarget == "uImage"; - nativeBuildInputs = [ cpio ] + nativeBuildInputs = [ perl cpio ] ++ stdenv.lib.optional makeUInitrd ubootTools; # !!! should use XML. @@ -30,7 +30,10 @@ stdenv.mkDerivation rec { symlinks = map (x: x.symlink) contents; suffices = map (x: if x ? suffix then x.suffix else "none") contents; - closure = closureInfo { rootPaths = (map (x: x.object) contents); }; + # For obtaining the closure of `contents'. + exportReferencesGraph = + map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents; + pathsFromGraph = ./paths-from-graph.pl; inherit compressor prepend; } diff --git a/pkgs/build-support/kernel/make-initrd.sh b/pkgs/build-support/kernel/make-initrd.sh index 2e64eeb81c1..0aeaedeb372 100644 --- a/pkgs/build-support/kernel/make-initrd.sh +++ b/pkgs/build-support/kernel/make-initrd.sh @@ -25,9 +25,13 @@ for ((n = 0; n < ${#objects[*]}; n++)); do done +# Get the paths in the closure of `object'. +storePaths=$(perl $pathsFromGraph closure-*) + + # Paths in cpio archives *must* be relative, otherwise the kernel # won't unpack 'em. -(cd root && cp -prd --parents $(cat $closure/store-paths) .) +(cd root && cp -prd --parents $storePaths .) # Put the closure in a gzipped cpio archive. |