initramfs-tools: update to 0.93.3.
* Add radeon/i915 drivers if MODULES=most, for KMS. * Remove blkid, busybox, klibc and module-init-tools stuff into its own hooks. * Fix init-premount/blacklist script, all files in /etc/modprobe.d should have the .conf extension. --HG-- extra : convert_revision : eb69e4c6e1097dfcc8ba937a96ec6e83fdb2f922
This commit is contained in:
parent
29c2d115f2
commit
81987c3df3
8 changed files with 120 additions and 37 deletions
|
@ -369,6 +369,11 @@ auto_add_modules()
|
|||
manual_add_modules "${x}"
|
||||
done
|
||||
;;
|
||||
kms)
|
||||
for x in intel_agp radeon i915; do
|
||||
manual_add_modules "${x}"
|
||||
done
|
||||
;;
|
||||
net)
|
||||
for x in 3c59x 8139cp 8139too 8390 atl1 atl1e b44 bmac \
|
||||
bnx2 cxgb cxgb3 de2104x de4x5 defxx dl2k dmfe \
|
||||
|
@ -424,6 +429,7 @@ auto_add_modules()
|
|||
;;
|
||||
*)
|
||||
auto_add_modules base
|
||||
auto_add_modules kms
|
||||
auto_add_modules net
|
||||
auto_add_modules ide
|
||||
auto_add_modules scsi
|
||||
|
|
23
templates/initramfs-tools/files/hooks/blkid
Executable file
23
templates/initramfs-tools/files/hooks/blkid
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREREQ=""
|
||||
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
# get pre-requisites
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
# from libblkid
|
||||
copy_exec /sbin/blkid.static /sbin/blkid
|
||||
|
||||
exit 0
|
35
templates/initramfs-tools/files/hooks/busybox
Executable file
35
templates/initramfs-tools/files/hooks/busybox
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREREQ="klibc"
|
||||
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
# get pre-requisites
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Busybox
|
||||
. /etc/initramfs-tools/initramfs.conf
|
||||
|
||||
if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
|
||||
# those root need busybox
|
||||
eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')"
|
||||
if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then
|
||||
echo "Warning: Busybox is required for successful boot!"
|
||||
fi
|
||||
else
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
rm -f ${DESTDIR}/bin/sh
|
||||
rm -f ${DESTDIR}/bin/busybox
|
||||
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
|
||||
ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
|
||||
fi
|
||||
|
||||
exit 0
|
24
templates/initramfs-tools/files/hooks/klibc
Executable file
24
templates/initramfs-tools/files/hooks/klibc
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREREQ=""
|
||||
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
# get pre-requisites
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# klibc
|
||||
ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin
|
||||
ln -s /lib/klibc-*.so ${DESTDIR}/lib
|
||||
rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/gzip \
|
||||
${DESTDIR}/zcat ${DESTDIR}/gunzip
|
||||
|
||||
exit 0
|
29
templates/initramfs-tools/files/hooks/module_init_tools
Executable file
29
templates/initramfs-tools/files/hooks/module_init_tools
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREREQ=""
|
||||
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
# get pre-requisites
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
copy_exec /sbin/modprobe /sbin
|
||||
copy_exec /sbin/depmod /sbin
|
||||
copy_exec /sbin/rmmod /sbin
|
||||
|
||||
if [ -d /etc/modprobe.d ]; then
|
||||
mkdir -p "${DESTDIR}/etc/modprobe.d"
|
||||
cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -8,7 +8,7 @@ keep="n"
|
|||
CONFDIR="/etc/initramfs-tools"
|
||||
verbose="n"
|
||||
errors_to="2>/dev/null"
|
||||
BUSYBOXDIR="/usr/lib/busybox-initramfs/bin"
|
||||
export BUSYBOXDIR="/usr/lib/busybox-initramfs/bin"
|
||||
|
||||
OPTIONS=`getopt -o d:ko:r:v -n "$0" -- "$@"`
|
||||
|
||||
|
@ -197,12 +197,6 @@ esac
|
|||
|
||||
# Have to do each file, because cpio --dereference doesn't recurse down
|
||||
# symlinks.
|
||||
|
||||
# klibc
|
||||
ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin
|
||||
ln -s /lib/klibc-*.so ${DESTDIR}/lib
|
||||
rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/gzip
|
||||
|
||||
cp -p /usr/share/initramfs-tools/init ${DESTDIR}/init
|
||||
|
||||
# add existant boot scripts
|
||||
|
@ -235,33 +229,6 @@ if [ -n "${ROOT}" ]; then
|
|||
echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root
|
||||
fi
|
||||
|
||||
# Busybox
|
||||
if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
|
||||
# those root need busybox
|
||||
eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')"
|
||||
if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then
|
||||
echo "Warning: Busybox is required for successful boot!"
|
||||
fi
|
||||
else
|
||||
rm -f ${DESTDIR}/bin/sh
|
||||
rm -f ${DESTDIR}/bin/busybox
|
||||
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
|
||||
ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
|
||||
fi
|
||||
|
||||
# Module-init-tools
|
||||
copy_exec /sbin/modprobe /sbin
|
||||
copy_exec /sbin/depmod /sbin
|
||||
copy_exec /sbin/rmmod /sbin
|
||||
|
||||
# libblkid
|
||||
copy_exec /sbin/blkid /sbin
|
||||
|
||||
if [ -d /etc/modprobe.d ]; then
|
||||
mkdir -p "${DESTDIR}/etc/modprobe.d"
|
||||
cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
|
||||
fi
|
||||
|
||||
run_scripts /usr/share/initramfs-tools/hooks
|
||||
run_scripts "${CONFDIR}"/hooks
|
||||
|
||||
|
|
|
@ -21,5 +21,5 @@ esac
|
|||
# write blacklist to modprobe.d
|
||||
IFS=','
|
||||
for b in ${blacklist}; do
|
||||
echo "blacklist $b" >> /etc/modprobe.d/initramfs
|
||||
echo "blacklist $b" >> /etc/modprobe.d/initramfs.conf
|
||||
done
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Template file for 'initramfs-tools'
|
||||
pkgname=initramfs-tools
|
||||
version=0.93.2
|
||||
revision=11
|
||||
version=0.93.3
|
||||
build_style=custom-install
|
||||
short_desc="Tools for generating an initramfs"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
Loading…
Reference in a new issue