diff --git a/templates/initramfs-tools/files/hook-functions b/templates/initramfs-tools/files/hook-functions index 5b139e2d97e..05139eb7246 100644 --- a/templates/initramfs-tools/files/hook-functions +++ b/templates/initramfs-tools/files/hook-functions @@ -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 diff --git a/templates/initramfs-tools/files/hooks/blkid b/templates/initramfs-tools/files/hooks/blkid new file mode 100755 index 00000000000..3442bd09e1c --- /dev/null +++ b/templates/initramfs-tools/files/hooks/blkid @@ -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 diff --git a/templates/initramfs-tools/files/hooks/busybox b/templates/initramfs-tools/files/hooks/busybox new file mode 100755 index 00000000000..6f0b7495b79 --- /dev/null +++ b/templates/initramfs-tools/files/hooks/busybox @@ -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 diff --git a/templates/initramfs-tools/files/hooks/klibc b/templates/initramfs-tools/files/hooks/klibc new file mode 100755 index 00000000000..773bc34420e --- /dev/null +++ b/templates/initramfs-tools/files/hooks/klibc @@ -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 diff --git a/templates/initramfs-tools/files/hooks/module_init_tools b/templates/initramfs-tools/files/hooks/module_init_tools new file mode 100755 index 00000000000..58ae517339b --- /dev/null +++ b/templates/initramfs-tools/files/hooks/module_init_tools @@ -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 diff --git a/templates/initramfs-tools/files/mkinitramfs b/templates/initramfs-tools/files/mkinitramfs index 11d91331633..668029c3792 100755 --- a/templates/initramfs-tools/files/mkinitramfs +++ b/templates/initramfs-tools/files/mkinitramfs @@ -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 diff --git a/templates/initramfs-tools/files/scripts/init-premount/blacklist b/templates/initramfs-tools/files/scripts/init-premount/blacklist index 1dd9dbc7b5d..21649066061 100755 --- a/templates/initramfs-tools/files/scripts/init-premount/blacklist +++ b/templates/initramfs-tools/files/scripts/init-premount/blacklist @@ -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 diff --git a/templates/initramfs-tools/template b/templates/initramfs-tools/template index 52ba11e35c7..c585d1a97f5 100644 --- a/templates/initramfs-tools/template +++ b/templates/initramfs-tools/template @@ -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 "