diff --git a/ChangeLog b/ChangeLog index bc8be73..5115896 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ # Distributed under the GPL v2 # $Id$ + 06 Feb 2012: Richard Yao gen_initramfs.sh: + copy_binaries utility function for putting binaries and librares into + initramfs (see git commit for full details). + 06 Feb 2012; Robin H. Johnson defaults/initrd.scripts: Support virtio devices, and provide fallback of all remaining devices. diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 32a1b1e..b96e36e 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -3,6 +3,15 @@ CPIO_ARGS="--quiet -o -H newc" +copy_binaries() { + + local destdir=$1 files=$2 + + # Copy files + lddtree $files | tr ')(' '\n' |awk '/=>/{ if($3 ~ /^\//){print $3}}' | sort | uniq | cpio -p --make-directories --dereference --quiet $destdir + +} + append_base_layout() { if [ -d "${TEMP}/initramfs-base-temp" ] then