initramfs-tools: sync with Debian initramfs-tools-0.102.
This commit is contained in:
parent
6fd1695638
commit
2660514acc
5 changed files with 34 additions and 34 deletions
srcpkgs/initramfs-tools
|
@ -83,11 +83,6 @@ manual_add_modules()
|
||||||
continue
|
continue
|
||||||
fi
|
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
|
if [ -e "/lib/firmware/${version}/${firmware}" ]; then
|
||||||
copy_exec "/lib/firmware/${version}/${firmware}"
|
copy_exec "/lib/firmware/${version}/${firmware}"
|
||||||
else
|
else
|
||||||
|
@ -135,7 +130,7 @@ copy_exec() {
|
||||||
# Try to use non-optimised libraries where possible.
|
# Try to use non-optimised libraries where possible.
|
||||||
# We assume that all HWCAP libraries will be in tls,
|
# We assume that all HWCAP libraries will be in tls,
|
||||||
# sse2, vfp or neon.
|
# 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
|
if [ -e "${nonoptlib}" ]; then
|
||||||
x="${nonoptlib}"
|
x="${nonoptlib}"
|
||||||
|
@ -225,17 +220,22 @@ dep_add_modules()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# findout root block device + fstype
|
# 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
|
# On failure fallback to /proc/mounts if readable
|
||||||
if [ -z "$root" ] && [ -r /proc/mounts ]; then
|
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
|
fi
|
||||||
|
|
||||||
# recheck root device
|
# recheck root device
|
||||||
if [ -z "$root" ]; then
|
if [ -z "$root" ]; then
|
||||||
echo "mkinitramfs: failed to determine root device" >&2
|
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 "grep -r MODULES /etc/initramfs-tools/" >&2
|
||||||
echo "" >&2
|
echo "" >&2
|
||||||
echo "Error please report bug on initramfs-tools" >&2
|
echo "Error please report bug on initramfs-tools" >&2
|
||||||
|
@ -349,12 +349,13 @@ dep_add_modules()
|
||||||
sys_walk_mod_add ${root_dev_path}
|
sys_walk_mod_add ${root_dev_path}
|
||||||
|
|
||||||
# catch old-style IDE
|
# 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}
|
sys_walk_modalias ${root_dev_path}
|
||||||
manual_add_modules ide-gd_mod
|
manual_add_modules ide-gd_mod
|
||||||
|
manual_add_modules ide-cd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "${DESTDIR}/lib/modules/${version}/kernel/drivers/scsi" ]; then
|
if [ -e /sys/bus/scsi/devices/ ]; then
|
||||||
manual_add_modules sd_mod
|
manual_add_modules sd_mod
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -379,9 +380,9 @@ auto_add_modules()
|
||||||
case "${1:-}" in
|
case "${1:-}" in
|
||||||
base)
|
base)
|
||||||
for x in ehci-hcd ohci-hcd uhci-hcd usbhid xhci-hcd \
|
for x in ehci-hcd ohci-hcd uhci-hcd usbhid xhci-hcd \
|
||||||
hid-apple hid-cherry hid-logitech hid-microsoft hid-sunplus \
|
hid-apple hid-cherry hid-logitech hid-logitech-dj \
|
||||||
btrfs ext2 ext3 ext4 isofs jfs reiserfs udf xfs nilfs2 \
|
hid-microsoft hid-sunplus btrfs ext2 ext3 ext4 isofs \
|
||||||
i8042 virtio_pci; do
|
jfs reiserfs udf xfs nilfs2 i8042 virtio_pci; do
|
||||||
manual_add_modules "${x}"
|
manual_add_modules "${x}"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -272,5 +272,5 @@ mount -o move /proc ${rootmnt}/proc
|
||||||
mount -o move /run ${rootmnt}/run
|
mount -o move /run ${rootmnt}/run
|
||||||
|
|
||||||
# Chain to real filesystem
|
# 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."
|
panic "Could not execute run-init."
|
||||||
|
|
|
@ -141,7 +141,7 @@ fi
|
||||||
if ! `grep -q -i ^config_rd_${COMPRESS%p} /boot/config-${version}` ; then
|
if ! `grep -q -i ^config_rd_${COMPRESS%p} /boot/config-${version}` ; then
|
||||||
compress=gzip
|
compress=gzip
|
||||||
[ "${verbose}" = y ] && \
|
[ "${verbose}" = y ] && \
|
||||||
echo "linux-2.6 misses ${COMPRESS} support, using gzip"
|
echo "linux kernel misses ${COMPRESS} support, using gzip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ "$compress" = xz ] && compress="xz --check=crc32"
|
[ "$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}"
|
mkdir -p "${DESTDIR}/${d}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy the modules.order file in
|
# Copy in modules.builtin and modules.order (not generated by depmod)
|
||||||
if [ -f "${ROOTDIR}${MODULESDIR}/modules.order" ]; then
|
for x in modules.builtin modules.order; do
|
||||||
cp -p "${ROOTDIR}${MODULESDIR}/modules.order" \
|
if [ -f "${MODULESDIR}/${x}" ]; then
|
||||||
"${DESTDIR}${MODULESDIR}/modules.order"
|
cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}"
|
||||||
fi
|
fi
|
||||||
# Copy the modules.builtin file in
|
done
|
||||||
if [ -f "${ROOTDIR}${MODULESDIR}/modules.builtin" ]; then
|
|
||||||
cp -p "${ROOTDIR}${MODULESDIR}/modules.builtin" \
|
|
||||||
"${DESTDIR}${MODULESDIR}/modules.builtin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MODULES=list case. Always honour.
|
# MODULES=list case. Always honour.
|
||||||
for x in "${CONFDIR}/modules" ${ROOTDIR}/usr/share/initramfs-tools/modules.d/*; do
|
for x in "${CONFDIR}/modules" ${ROOTDIR}/usr/share/initramfs-tools/modules.d/*; do
|
||||||
|
@ -235,9 +231,7 @@ esac
|
||||||
# Resolve hidden dependencies
|
# Resolve hidden dependencies
|
||||||
hidden_dep_add_modules
|
hidden_dep_add_modules
|
||||||
|
|
||||||
# Have to do each file, because cpio --dereference doesn't recurse down
|
# First file executed by the linux kernel
|
||||||
# symlinks.
|
|
||||||
|
|
||||||
cp -p ${ROOTDIR}/usr/share/initramfs-tools/init ${DESTDIR}/init
|
cp -p ${ROOTDIR}/usr/share/initramfs-tools/init ${DESTDIR}/init
|
||||||
|
|
||||||
# add existant boot scripts
|
# add existant boot scripts
|
||||||
|
|
|
@ -39,14 +39,19 @@ panic()
|
||||||
chvt 1
|
chvt 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$@"
|
||||||
# Disallow console access
|
# Disallow console access
|
||||||
if [ -n "${panic}" ]; then
|
if [ -n "${panic}" ]; then
|
||||||
|
echo "Rebooting automatically due to panic= boot argument"
|
||||||
sleep ${panic}
|
sleep ${panic}
|
||||||
reboot
|
reboot
|
||||||
fi
|
fi
|
||||||
modprobe i8042
|
modprobe -v i8042
|
||||||
modprobe atkbd
|
modprobe -v atkbd
|
||||||
echo "$@"
|
modprobe -v ehci-hcd
|
||||||
|
modprobe -v uhci-hcd
|
||||||
|
modprobe -v ohci-hcd
|
||||||
|
modprobe -v usbhid
|
||||||
REASON="$@" PS1='(initramfs) ' /bin/sh -i </dev/console >/dev/console 2>&1
|
REASON="$@" PS1='(initramfs) ' /bin/sh -i </dev/console >/dev/console 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'initramfs-tools'
|
# Template file for 'initramfs-tools'
|
||||||
pkgname=initramfs-tools
|
pkgname=initramfs-tools
|
||||||
_localver=119 # This is the XBPS version
|
_localver=1 # This is the XBPS version
|
||||||
_distver=0.99 # This should match debian version
|
_distver=0.102 # This should match debian version
|
||||||
version=${_distver}.${_localver}
|
version=${_distver}.${_localver}
|
||||||
short_desc="Tools for generating an initramfs"
|
short_desc="Tools for generating an initramfs"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
Loading…
Reference in a new issue