diff --git a/srcpkgs/initramfs-tools/files/hook-functions b/srcpkgs/initramfs-tools/files/hook-functions index cdfb79bbd19..5023cbec9dc 100644 --- a/srcpkgs/initramfs-tools/files/hook-functions +++ b/srcpkgs/initramfs-tools/files/hook-functions @@ -83,11 +83,6 @@ manual_add_modules() continue fi - if [ ! -e "${DESTDIR}/lib/udev/firmware.agent" ] \ - && [ -e "/lib/udev/firmware.agent" ]; then - copy_exec /lib/udev/firmware.agent - fi - if [ -e "/lib/firmware/${version}/${firmware}" ]; then copy_exec "/lib/firmware/${version}/${firmware}" else @@ -135,7 +130,7 @@ copy_exec() { # Try to use non-optimised libraries where possible. # We assume that all HWCAP libraries will be in tls, # sse2, vfp or neon. - nonoptlib=$(echo "${x}" | sed -e 's#/lib/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\2#') + nonoptlib=$(echo "${x}" | sed -e 's#/lib/\([^/]*/\)\?\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\1\3#') if [ -e "${nonoptlib}" ]; then x="${nonoptlib}" @@ -225,17 +220,22 @@ dep_add_modules() fi # findout root block device + fstype - eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')" + eval "$( mount | while read dev foo mp foo fs opts rest ; do \ + [ "$mp" = "/" ] && printf "root=$dev\nFSTYPE=$fs" \ + && break; done)" # On failure fallback to /proc/mounts if readable if [ -z "$root" ] && [ -r /proc/mounts ]; then - eval "$(awk '!/^rootfs / {if ($2 == "/") {print "root=" $1 "\nFSTYPE=" $3; exit}}' /proc/mounts)" + eval "$(while read dev mp fs opts rest ; do \ + [ "$mp" = "/" ] && [ "$fs" != "rootfs" ] \ + && printf "root=$dev\nFSTYPE=$fs"\ + && break; done < /proc/mounts)" fi # recheck root device if [ -z "$root" ]; then echo "mkinitramfs: failed to determine root device" >&2 - echo "mkinitramfs: workaround is MODULES=most, check" >&2 + echo "mkinitramfs: workaround is MODULES=most, check:" >&2 echo "grep -r MODULES /etc/initramfs-tools/" >&2 echo "" >&2 echo "Error please report bug on initramfs-tools" >&2 @@ -349,12 +349,13 @@ dep_add_modules() sys_walk_mod_add ${root_dev_path} # catch old-style IDE - if [ -d "${DESTDIR}/lib/modules/${version}/kernel/drivers/ide" ]; then + if [ -e /sys/bus/ide/devices/ ]; then sys_walk_modalias ${root_dev_path} manual_add_modules ide-gd_mod + manual_add_modules ide-cd fi - if [ -d "${DESTDIR}/lib/modules/${version}/kernel/drivers/scsi" ]; then + if [ -e /sys/bus/scsi/devices/ ]; then manual_add_modules sd_mod fi @@ -379,9 +380,9 @@ auto_add_modules() case "${1:-}" in base) for x in ehci-hcd ohci-hcd uhci-hcd usbhid xhci-hcd \ - hid-apple hid-cherry hid-logitech hid-microsoft hid-sunplus \ - btrfs ext2 ext3 ext4 isofs jfs reiserfs udf xfs nilfs2 \ - i8042 virtio_pci; do + hid-apple hid-cherry hid-logitech hid-logitech-dj \ + hid-microsoft hid-sunplus btrfs ext2 ext3 ext4 isofs \ + jfs reiserfs udf xfs nilfs2 i8042 virtio_pci; do manual_add_modules "${x}" done ;; diff --git a/srcpkgs/initramfs-tools/files/init b/srcpkgs/initramfs-tools/files/init index 518d1d1e6fd..5a1ea200e5e 100755 --- a/srcpkgs/initramfs-tools/files/init +++ b/srcpkgs/initramfs-tools/files/init @@ -272,5 +272,5 @@ mount -o move /proc ${rootmnt}/proc mount -o move /run ${rootmnt}/run # Chain to real filesystem -exec switch_root ${rootmnt} ${init} "$@" +exec switch_root ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console panic "Could not execute run-init." diff --git a/srcpkgs/initramfs-tools/files/mkinitramfs b/srcpkgs/initramfs-tools/files/mkinitramfs index 0d75f92e8bd..6b5ecf50ae9 100755 --- a/srcpkgs/initramfs-tools/files/mkinitramfs +++ b/srcpkgs/initramfs-tools/files/mkinitramfs @@ -141,7 +141,7 @@ fi if ! `grep -q -i ^config_rd_${COMPRESS%p} /boot/config-${version}` ; then compress=gzip [ "${verbose}" = y ] && \ - echo "linux-2.6 misses ${COMPRESS} support, using gzip" + echo "linux kernel misses ${COMPRESS} support, using gzip" fi [ "$compress" = xz ] && compress="xz --check=crc32" @@ -196,16 +196,12 @@ for d in bin conf/conf.d etc lib/modules run sbin scripts ${MODULESDIR}; do mkdir -p "${DESTDIR}/${d}" done -# Copy the modules.order file in -if [ -f "${ROOTDIR}${MODULESDIR}/modules.order" ]; then - cp -p "${ROOTDIR}${MODULESDIR}/modules.order" \ - "${DESTDIR}${MODULESDIR}/modules.order" -fi -# Copy the modules.builtin file in -if [ -f "${ROOTDIR}${MODULESDIR}/modules.builtin" ]; then - cp -p "${ROOTDIR}${MODULESDIR}/modules.builtin" \ - "${DESTDIR}${MODULESDIR}/modules.builtin" -fi +# Copy in modules.builtin and modules.order (not generated by depmod) +for x in modules.builtin modules.order; do + if [ -f "${MODULESDIR}/${x}" ]; then + cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}" + fi +done # MODULES=list case. Always honour. for x in "${CONFDIR}/modules" ${ROOTDIR}/usr/share/initramfs-tools/modules.d/*; do @@ -235,9 +231,7 @@ esac # Resolve hidden dependencies hidden_dep_add_modules -# Have to do each file, because cpio --dereference doesn't recurse down -# symlinks. - +# First file executed by the linux kernel cp -p ${ROOTDIR}/usr/share/initramfs-tools/init ${DESTDIR}/init # add existant boot scripts diff --git a/srcpkgs/initramfs-tools/files/scripts/functions b/srcpkgs/initramfs-tools/files/scripts/functions index bc8a293316d..2ca6a5a307a 100644 --- a/srcpkgs/initramfs-tools/files/scripts/functions +++ b/srcpkgs/initramfs-tools/files/scripts/functions @@ -39,14 +39,19 @@ panic() chvt 1 fi + echo "$@" # Disallow console access if [ -n "${panic}" ]; then + echo "Rebooting automatically due to panic= boot argument" sleep ${panic} reboot fi - modprobe i8042 - modprobe atkbd - echo "$@" + modprobe -v i8042 + modprobe -v atkbd + modprobe -v ehci-hcd + modprobe -v uhci-hcd + modprobe -v ohci-hcd + modprobe -v usbhid REASON="$@" PS1='(initramfs) ' /bin/sh -i /dev/console 2>&1 } diff --git a/srcpkgs/initramfs-tools/template b/srcpkgs/initramfs-tools/template index ad6c368dcfc..31d15d90025 100644 --- a/srcpkgs/initramfs-tools/template +++ b/srcpkgs/initramfs-tools/template @@ -1,7 +1,7 @@ # Template file for 'initramfs-tools' pkgname=initramfs-tools -_localver=119 # This is the XBPS version -_distver=0.99 # This should match debian version +_localver=1 # This is the XBPS version +_distver=0.102 # This should match debian version version=${_distver}.${_localver} short_desc="Tools for generating an initramfs" maintainer="Juan RP "