r4429 - in dists/trunk/utils/initramfs-tools: . debian hooks
Bastian Blank
waldi at costa.debian.org
Wed Oct 12 12:11:17 UTC 2005
Author: waldi
Date: 2005-10-12 12:11:16 +0000 (Wed, 12 Oct 2005)
New Revision: 4429
Modified:
dists/trunk/utils/initramfs-tools/debian/control
dists/trunk/utils/initramfs-tools/hook-functions
dists/trunk/utils/initramfs-tools/hooks/evms
dists/trunk/utils/initramfs-tools/mkinitramfs
Log:
* debian/control: Add mklibs-small as dependency.
* hook-functions: Remove copy_exec.
* hooks/evms: Use cp instead of copy_exec.
* mkinitramfs
- Use cp instead of copy_exec.
- Call mklibs-small to collect necessary libs.
Modified: dists/trunk/utils/initramfs-tools/debian/control
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/control 2005-10-12 09:50:44 UTC (rev 4428)
+++ dists/trunk/utils/initramfs-tools/debian/control 2005-10-12 12:11:16 UTC (rev 4429)
@@ -8,7 +8,7 @@
Package: initramfs-tools
Architecture: all
-Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-4)
+Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-3), mklibs-small
Description: tools for generating an initramfs
This package contains tools to create and boot an initramfs for prepackaged
2.6 Linux kernel. The initramfs is an cpio archive. At boot time, the kernel
Modified: dists/trunk/utils/initramfs-tools/hook-functions
===================================================================
--- dists/trunk/utils/initramfs-tools/hook-functions 2005-10-12 09:50:44 UTC (rev 4428)
+++ dists/trunk/utils/initramfs-tools/hook-functions 2005-10-12 12:11:16 UTC (rev 4429)
@@ -51,36 +51,6 @@
done
}
-# $1 is source
-# $2 is relative destination
-copy_exec() {
- ln -s ${1} ${DESTDIR}/${2}
-
- # Copy the dependant libraries
- for x in $(ldd ${1} 2>/dev/null | sed -e '
- /\//!d;
- /linux-gate/d;
- /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
- s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do
-
- # Try to use non-optimised libraries where possible.
- # We assume that all HWCAP libraries will be in tls.
- nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#')
-
- if [ -e ${nonoptlib} ]; then
- x=${nonoptlib}
- fi
-
- libname=$(basename ${x})
- dirname=$(dirname ${x})
-
- mkdir -p ${DESTDIR}/${dirname}
- if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then
- ln -s ${x} ${DESTDIR}/${dirname}
- fi
- done
-}
-
# Copy entire subtrees to the initramfs
copy_modules_dir()
{
Modified: dists/trunk/utils/initramfs-tools/hooks/evms
===================================================================
--- dists/trunk/utils/initramfs-tools/hooks/evms 2005-10-12 09:50:44 UTC (rev 4428)
+++ dists/trunk/utils/initramfs-tools/hooks/evms 2005-10-12 12:11:16 UTC (rev 4429)
@@ -20,12 +20,12 @@
exit 0
fi
-copy_exec /sbin/evms_activate /sbin
+cp /sbin/evms_activate ${DESTDIR}/sbin
EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }')
mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION}
for x in disk lvm2 dos multipath; do
- copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION}
+ cp /lib/evms/${EVMS_VERSION}/${x}* ${DESTDIR}/lib/evms/${EVMS_VERSION}
done
Modified: dists/trunk/utils/initramfs-tools/mkinitramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs 2005-10-12 09:50:44 UTC (rev 4428)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs 2005-10-12 12:11:16 UTC (rev 4429)
@@ -117,9 +117,7 @@
# Have to do each file, because cpio --dereference doesn't recurse down
# symlinks.
-ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin
-ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib
-copy_exec /usr/share/initramfs-tools/init /init
+cp /usr/share/initramfs-tools/init ${DESTDIR}/init
cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts
for f in $(cd /etc/mkinitramfs/scripts && \
find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \
@@ -127,39 +125,44 @@
mkdir --parents ${DESTDIR}/scripts/$(dirname ${f})
cp -p /etc/mkinitramfs/scripts/${f} ${DESTDIR}/scripts/$(dirname ${f})
done
-copy_exec ${CONFDIR}/initramfs.conf /conf
+cp ${CONFDIR}/initramfs.conf ${DESTDIR}/conf
cp -a /etc/udev ${DESTDIR}/etc
# Hack until udev is built with klibc
-copy_exec /sbin/udev /sbin
-copy_exec /sbin/udevstart /sbin
+cp /sbin/udev ${DESTDIR}/sbin
+cp /sbin/udevstart ${DESTDIR}/sbin
# Busybox
-rm ${DESTDIR}/bin/sh
-ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
-# This is ugly, but needed atm to make the builtins work =(
-ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
# Modutils
-copy_exec /sbin/modprobe /sbin
-copy_exec /sbin/depmod /sbin
-copy_exec /sbin/rmmod /sbin
+cp /sbin/modprobe ${DESTDIR}/sbin
+cp /sbin/depmod ${DESTDIR}/sbin
+cp /sbin/rmmod ${DESTDIR}/sbin
mkdir -p ${DESTDIR}/etc/modprobe.d
-copy_exec /etc/modprobe.d/aliases /etc/modprobe.d
+cp /etc/modprobe.d/aliases ${DESTDIR}/etc/modprobe.d
# Raid
-copy_exec /sbin/mdadm /sbin
-copy_exec /sbin/mdrun /sbin
+cp /sbin/mdadm ${DESTDIR}/sbin
+cp /sbin/mdrun ${DESTDIR}/sbin
# LVM
-copy_exec /lib/lvm-200/vgchange /sbin
+cp /lib/lvm-200/vgchange ${DESTDIR}/sbin
+mklibs-small -d ${DESTDIR}/lib --root=${DESTDIR} $(find ${DESTDIR} -type f -perm +0111 -o -name '*.so')
+
+ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin
+ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib
+
+rm ${DESTDIR}/bin/sh
+ln -s busybox ${DESTDIR}/bin/sh
+
run_scripts /usr/share/initramfs-tools/hooks
run_scripts /etc/mkinitramfs/hooks
# Apply DSDT to initramfs
if [ -e ${CONFDIR}/DSDT.aml ]; then
- copy_exec ${CONFDIR}/DSDT.aml /
+ cp ${CONFDIR}/DSDT.aml ${DESTDIR}
fi
(cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile})
More information about the Kernel-svn-changes
mailing list