Revert "makeInitrd: Use closureInfo"
This reverts commit 776a5e6ebfacc6831527bc6c3c1a58ef2087c819. Fixes #36268.
This commit is contained in:
parent
97693915e1
commit
165b32d386
@ -12,7 +12,7 @@
|
|||||||
# `contents = {object = ...; symlink = /init;}' is a typical
|
# `contents = {object = ...; symlink = /init;}' is a typical
|
||||||
# argument.
|
# argument.
|
||||||
|
|
||||||
{ stdenv, closureInfo, cpio, contents, compressor, prepend, ubootTools
|
{ stdenv, perl, cpio, contents, compressor, prepend, ubootTools
|
||||||
, hostPlatform
|
, hostPlatform
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
makeUInitrd = hostPlatform.platform.kernelTarget == "uImage";
|
makeUInitrd = hostPlatform.platform.kernelTarget == "uImage";
|
||||||
|
|
||||||
nativeBuildInputs = [ cpio ]
|
nativeBuildInputs = [ perl cpio ]
|
||||||
++ stdenv.lib.optional makeUInitrd ubootTools;
|
++ stdenv.lib.optional makeUInitrd ubootTools;
|
||||||
|
|
||||||
# !!! should use XML.
|
# !!! should use XML.
|
||||||
@ -30,7 +30,10 @@ stdenv.mkDerivation rec {
|
|||||||
symlinks = map (x: x.symlink) contents;
|
symlinks = map (x: x.symlink) contents;
|
||||||
suffices = map (x: if x ? suffix then x.suffix else "none") 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;
|
inherit compressor prepend;
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,13 @@ for ((n = 0; n < ${#objects[*]}; n++)); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Get the paths in the closure of `object'.
|
||||||
|
storePaths=$(perl $pathsFromGraph closure-*)
|
||||||
|
|
||||||
|
|
||||||
# Paths in cpio archives *must* be relative, otherwise the kernel
|
# Paths in cpio archives *must* be relative, otherwise the kernel
|
||||||
# won't unpack 'em.
|
# 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.
|
# Put the closure in a gzipped cpio archive.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user