uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
51
pkgs/build-support/kernel/make-initrd.sh
Normal file
51
pkgs/build-support/kernel/make-initrd.sh
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
source $stdenv/setup
|
||||
|
||||
set -o pipefail
|
||||
|
||||
objects=($objects)
|
||||
symlinks=($symlinks)
|
||||
suffices=($suffices)
|
||||
|
||||
mkdir root
|
||||
|
||||
# Needed for splash_helper, which gets run before init.
|
||||
mkdir root/dev
|
||||
mkdir root/sys
|
||||
mkdir root/proc
|
||||
|
||||
|
||||
for ((n = 0; n < ${#objects[*]}; n++)); do
|
||||
object=${objects[$n]}
|
||||
symlink=${symlinks[$n]}
|
||||
suffix=${suffices[$n]}
|
||||
if test "$suffix" = none; then suffix=; fi
|
||||
|
||||
mkdir -p $(dirname root/$symlink)
|
||||
ln -s $object$suffix root/$symlink
|
||||
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 -prP --parents $storePaths .)
|
||||
|
||||
|
||||
# Put the closure in a gzipped cpio archive.
|
||||
mkdir -p $out
|
||||
for PREP in $prepend; do
|
||||
cat $PREP >> $out/initrd
|
||||
done
|
||||
(cd root && find * .[^.*] -exec touch -h -d '@1' '{}' +)
|
||||
(cd root && find * .[^.*] -print0 | sort -z | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- | eval -- $compress >> "$out/initrd")
|
||||
|
||||
if [ -n "$makeUInitrd" ]; then
|
||||
mkimage -A "$uInitrdArch" -O linux -T ramdisk -C "$uInitrdCompression" -d "$out/initrd" $out/initrd.img
|
||||
# Compatibility symlink
|
||||
ln -sf "initrd.img" "$out/initrd"
|
||||
else
|
||||
ln -s "initrd" "$out/initrd$extension"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue