summaryrefslogtreecommitdiffstats
path: root/source/a/mkinitrd/mkinitrd_command_generator.sh
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/a/mkinitrd/mkinitrd_command_generator.sh
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.gz
current-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.xz
Slackware 14.1slackware-14.1
Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/a/mkinitrd/mkinitrd_command_generator.sh')
-rw-r--r--source/a/mkinitrd/mkinitrd_command_generator.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/a/mkinitrd/mkinitrd_command_generator.sh b/source/a/mkinitrd/mkinitrd_command_generator.sh
index 04c0c2a03..16893b05b 100644
--- a/source/a/mkinitrd/mkinitrd_command_generator.sh
+++ b/source/a/mkinitrd/mkinitrd_command_generator.sh
@@ -1,5 +1,6 @@
#!/bin/sh
# $Id: mkinitrd_command_generator.sh,v 1.45 2011/02/17 09:27:05 eha Exp eha $
+# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
# Copyright 2008, 2009, 2010, 2011 Eric Hameleers, Eindhoven, Netherlands
# Contact: <alien@slackware.com>
# Copyright 2008, 2009 PiterPUNK, Sao Paulo, SP, Brazil
@@ -50,7 +51,12 @@ SOURCE_TREE=${SOURCE_TREE:-"/boot/initrd-tree"}
CLEAR_TREE=${CLEAR_TREE:-1}
KEYMAP=${KEYMAP:-"us"}
UDEV=${UDEV:-1}
-WAIT=${WAIT:-1}
+# ARM devices need more time:
+case "$( uname -m )" in
+ arm*) WAIT_DEFAULT=4;;
+ *) WAIT_DEFAULT=1;;
+esac
+WAIT=${WAIT:-$WAIT_DEFAULT}
# A basic explanation of the commandline parameters:
basic_usage() {
@@ -108,7 +114,7 @@ extended_usage() {
the script determines, you can pass then to the script using the '-m'
parameter as follows:
- $(basename $0) -m "uhci-hcd:usbhid"
+ $(basename $0) -m "uhci-hcd:usbhid:hid_generic"
The above example adds support for USB keyboards to the initrd - you
may need that if you have encrypted your root partition and need to
@@ -219,7 +225,7 @@ function add_usb_keyboard() {
local USBMOD
if cat /proc/bus/input/devices | sed -e 's/^$/\$/g' | \
tr "\n$" " \n" | grep -q " Phys=.*usb.* .*Handlers=.*kbd.*B:"; then
- USBMOD="usbhid"
+ USBMOD="usbhid:hid_generic"
[ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
|| MLIST="$USBMOD"
fi
@@ -375,7 +381,7 @@ while [ ! -z "$1" ]; do
KFILE=$(basename $KFILE)
fi
KFILE=${KFILEPATH}/$KFILE
- if [ -z "$(file $KFILE | grep 'Linux kernel x86 boot')" ]; then
+ if [ -z "$(file $KFILE | grep -E 'Linux kernel x86 boot|x86 boot sector')" ]; then
echo "File '$KFILE' does not look like it is a kernel file!"
exit 1
fi
@@ -439,7 +445,8 @@ if echo $MLIST | grep -q "virtio"; then
MLIST="$MLIST:virtio:virtio_balloon:virtio_blk:virtio_ring:virtio_pci:virtio_net"
fi
-# Determine if a USB keyboard is in use and include usbhid to module list
+# Determine if a USB keyboard is in use and include usbhid and hid_generic
+# to module list
MLIST=$(add_usb_keyboard)
# If we use any USB module, try to determine the Host Controller
@@ -546,7 +553,7 @@ configurations are optional and you can stick to the defaults." 11 72 3 \
$([ $USING_LUKS = 1 ] && echo on || echo off) \
"RESUMEDEV" "Select device for 'suspend-to-disk' feature" off \
"UDEV" "Use UDEV in the initrd for device configuration" $(test $UDEV -eq 1 && echo on || echo off) \
-"WAIT" "Add delay to allow detection of slow disks at boot" $(test WAIT -gt 1 && echo on || echo off) )
+"WAIT" "Add delay to allow detection of slow disks at boot" $(test $WAIT -gt $WAIT_DEFAULT && echo on || echo off) )
if [ "$?" != "0" ]; then
exit 1
fi
@@ -794,7 +801,7 @@ if [ $UDEV -eq 1 ]; then
# Add UDEV support:
MKINIT="$MKINIT -u"
fi
-if [ -n "$WAIT" -a $WAIT -ne 1 ]; then
+if [ -n "$WAIT" -a $WAIT -ne $WAIT_DEFAULT ]; then
# Add non-default wait time:
MKINIT="$MKINIT -w $WAIT"
fi