summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog24
-rw-r--r--debian/initramfs-tools.postinst4
-rw-r--r--hook-functions23
-rw-r--r--hooks/kernelextras39
-rw-r--r--mkinitramfs7
5 files changed, 91 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 445d581..aaa2dba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,27 @@
+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
+
initramfs-tools (0.20) breezy; urgency=low
* Depend on cpio.
diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst
index ea92067..fe734cf 100644
--- a/debian/initramfs-tools.postinst
+++ b/debian/initramfs-tools.postinst
@@ -13,6 +13,10 @@ if [ "$1" = configure ]; then
. /etc/mkinitrd/mkinitrd.conf
fi
+ if [ -e /etc/mkinitrd/modules ]; then
+ cp /etc/mkinitrd/modules /etc/mkinitramfs
+ fi
+
if [ -e ${RESUME} ]; then
sed -i -e "s@#RESUME=@RESUME=${RESUME}@" /etc/mkinitramfs/initramfs.conf
fi
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
diff --git a/hooks/kernelextras b/hooks/kernelextras
new file mode 100644
index 0000000..d1b8c34
--- /dev/null
+++ b/hooks/kernelextras
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# Hooks for loading loading extra kernel bits into the initramfs
+
+. /usr/share/initramfs-tools/hook-functions
+
+fbcon=n
+
+for x in ${MODULESDIR}/initrd/*; do
+ x=${x##*/}
+ x=${x%.*}
+ case ${x} in
+ *fb)
+ fbcon=y
+ ;;
+ esac
+
+ force_load ${x}
+done
+
+if [ ${fbcon} = "y" ]; then
+ force_load fbcon
+fi
+
diff --git a/mkinitramfs b/mkinitramfs
index 3257c94..7344a03 100644
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -70,8 +70,10 @@ if [ -d ${outfile} ]; then
exit 1
fi
-if [ ! -e /lib/modules/${version} ]; then
- echo "Cannot find /lib/modules/${version}"
+MODULESDIR="/lib/modules/${version}"
+
+if [ ! -e ${MODULESDIR} ]; then
+ echo "Cannot find ${MODULESDIR}"
exit 1
fi
@@ -80,6 +82,7 @@ __TMPCPIOGZ=$(mktemp -t mkinitramfs-OL_XXXXXX) || exit 1
# Export environment for hook scripts.
#
+export MODULESDIR
export version
export CONFDIR
export DESTDIR