11 # Needed for splash_helper, which gets run before init.
17 for ((n
= 0; n
< ${#objects[*]}; n
++)); do
19 symlink
=${symlinks[$n]}
20 suffix
=${suffices[$n]}
21 if test "$suffix" = none
; then suffix
=; fi
23 mkdir
-p $
(dirname root
/$symlink)
24 ln -s $object$suffix root
/$symlink
28 # Get the paths in the closure of `object'.
29 storePaths
=$
(perl
$pathsFromGraph closure-
*)
32 # Paths in cpio archives *must* be relative, otherwise the kernel
34 (cd root
&& cp -prP --parents $storePaths .
)
37 # Put the closure in a gzipped cpio archive.
39 for PREP
in $prepend; do
40 cat $PREP >> $out/initrd
42 (cd root
&& find * .
[^.
*] -exec touch -h -d '@1' '{}' +)
43 (cd root
&& find * .
[^.
*] -print0 |
sort -z |
cpio --quiet -o -H newc
-R +0:+0 --reproducible --null |
eval -- $compress >> "$out/initrd")
45 if [ -n "$makeUInitrd" ]; then
46 mkimage
-A "$uInitrdArch" -O linux
-T ramdisk
-C "$uInitrdCompression" -d "$out/initrd" $out/initrd.img
47 # Compatibility symlink
48 ln -sf "initrd.img" "$out/initrd"
50 ln -s "initrd" "$out/initrd$extension"