summaryrefslogtreecommitdiff
path: root/hook-functions
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@ubuntu.com>2005-08-17 00:01:51 -0400
committerJeff Bailey <jbailey@ubuntu.com>2005-08-17 00:01:51 -0400
commit9a9de97229d09d9876575775a080a4056fcffcb5 (patch)
treeb8c66a8648a65d6ccb892e7d1154cbd33c822abf /hook-functions
parentf903a759dea3c85c88bbec151337efd2c64ba3bf (diff)
downloadinitramfs-tools-9a9de97229d09d9876575775a080a4056fcffcb5.tar.gz
initramfs-tools-9a9de97229d09d9876575775a080a4056fcffcb5.zip
initramfs-tools (0.21) breezy; urgency=low
"All that I desire to point out is the general principle that life imitates art far more than art imitates life." - Oscar Wilde * mkinitramfs: Define MODULESDIR and use it. * hook-functions: Use MODULESDIR (add_modules_from_file): Do not add .ko extension to file lists. Call force_load instead of twiddling conf/modules directly. (Ubuntu #13372) (force_load): New function. (copy_exec): Attempt to use non-optimsed libraries if available. (Ubuntu #13470) (auto_add_modules) Include forcedeth (Ubuntu #13448) * hooks/kernelextras: New file. (Ubuntu #13414) * debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if possible on new install. (Ubuntu #13372) -- Jeff Bailey <jbailey@ubuntu.com> Tue, 16 Aug 2005 15:56:00 -0400
Diffstat (limited to 'hook-functions')
-rw-r--r--hook-functions23
1 files changed, 19 insertions, 4 deletions
diff --git a/hook-functions b/hook-functions
index 5db7d27..8642af9 100644
--- a/hook-functions
+++ b/hook-functions
@@ -4,6 +4,12 @@ catenate_cpiogz() {
cat "$1" >>${__TMPCPIOGZ}
}
+force_load()
+{
+ manual_add_modules ${module}
+ echo ${@} >>${DESTDIR}/conf/modules
+}
+
add_modules_from_file()
{
# Sanity check
@@ -12,8 +18,7 @@ add_modules_from_file()
fi
sed -e '/^#/d' ${1} | while read module rest; do
- manual_add_modules ${module}
- echo ${module}.ko "${rest}" >>${DESTDIR}/conf/modules
+ force_load ${module} "${rest}"
done
}
@@ -42,8 +47,18 @@ copy_exec() {
/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}
@@ -56,7 +71,7 @@ copy_modules_dir()
{
tmpdir_modbase=${DESTDIR}/lib/modules/${version}
mkdir -p $(dirname ${tmpdir_modbase}/${1})
- cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1}
+ cp -a ${MODULESDIR}/${1} ${tmpdir_modbase}/${1}
}
dep_add_modules()
@@ -103,7 +118,7 @@ auto_add_modules()
done
# Ethernet
- for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire sundance sungem sungem_phy sunhme tg3 tlan de2104x de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb typhon via-rhine via-velocity yellowfin; do
+ for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi forcedeth hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire sundance sungem sungem_phy sunhme tg3 tlan de2104x de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb typhon via-rhine via-velocity yellowfin; do
manual_add_modules ${x}
done