diff options
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 |
commit | 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch) | |
tree | 9b98e6e193c7870cb27ac861394c1c4592850922 /source/a/mkinitrd/mkinitrd | |
parent | 9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff) | |
download | current-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 '')
-rw-r--r-- | source/a/mkinitrd/mkinitrd | 13 | ||||
-rwxr-xr-x | source/a/mkinitrd/mkinitrd.SlackBuild | 18 | ||||
-rw-r--r-- | source/a/mkinitrd/mkinitrd_command_generator.sh | 21 |
3 files changed, 38 insertions, 14 deletions
diff --git a/source/a/mkinitrd/mkinitrd b/source/a/mkinitrd/mkinitrd index c5e30218b..fdc269348 100644 --- a/source/a/mkinitrd/mkinitrd +++ b/source/a/mkinitrd/mkinitrd @@ -45,7 +45,7 @@ # Modified by Patrick Volkerding <volkerdi@slackware.com> 21 August 2012 # Add Btrfs multi-device filesystem support option (-B). -MKINITRD_VERSION=1.4.7 +MKINITRD_VERSION=1.4.8 # Don't include these things from /lib/udev/ in the initrd image LIBUDEV_BLACKLIST="\ @@ -101,7 +101,7 @@ initrd, and the script is easy to modify. Be creative. :-) then you need to pass: -K LABEL=TRAVELSTICK:/keys/alien.luks -B Add /sbin/btrfs to enable scanning for a root filesystem that is part of a Btrfs multi-device filesystem. - -M Add the files in /etc/modprobe.d/ to the initrd + -M Add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd -R Add support for RAID partitions -V Display version number @@ -422,6 +422,10 @@ fi # (unless we find that value is already set in the initrd-tree): if [ -z "$WAIT" -a -z "$(cat $SOURCE_TREE/wait-for-root)" ]; then WAIT=1 + # ARM devices need even more time: + case "$( uname -m )" in + arm*) WAIT=4;; + esac fi if [ ! -z "$WAIT" ]; then echo $WAIT > $SOURCE_TREE/wait-for-root @@ -479,6 +483,9 @@ if [ ! -z "$RAID" ]; then mkdir -p $SOURCE_TREE/lib/udev/rules.d echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \ $SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules + if [ -r /etc/mdadm.conf ] ; then + cp /etc/mdadm.conf $SOURCE_TREE/etc + fi else echo "ERROR: mdadm and/or mdmon binary is missing, RAID support not installed" fi @@ -674,7 +681,7 @@ if [ ! -z "$MODULE_LIST" ]; then # Pregenerate the module dependency information depmod -a -b $SOURCE_TREE ${KERNEL_VERSION} - # Copy /etc/modprobe.d/* if desired + # Copy /{etc,lib}/modprobe.d/* if desired if [ ! -z $MODCONF ]; then copy_modconf fi diff --git a/source/a/mkinitrd/mkinitrd.SlackBuild b/source/a/mkinitrd/mkinitrd.SlackBuild index 322fa8c5d..4683a17f4 100755 --- a/source/a/mkinitrd/mkinitrd.SlackBuild +++ b/source/a/mkinitrd/mkinitrd.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2007, 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,9 +21,9 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=${VERSION:-1.4.7} -BB=1.20.1 -BUILD=${BUILD:-6} +VERSION=${VERSION:-1.4.8} +BB=1.20.2 +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -83,6 +83,11 @@ chmod 644 $PKG/usr/share/mkinitrd/keymaps.tar.gz ( cd $PKG/usr/share/mkinitrd/initrd-tree tar xf $CWD/_initrd-tree.tar.gz cat $CWD/init > init + + # These are useful for ARM: + mknod -m 644 dev/random c 1 8 + mknod -m 644 dev/urandom c 1 9 + tar czf ../initrd-tree.tar.gz . ) rm -rf $PKG/usr/share/mkinitrd/initrd-tree @@ -107,6 +112,11 @@ cat $CWD/mkinitrd.conf.5 | gzip -9c > $PKG/usr/man/man5/mkinitrd.conf.5.gz mkdir -p $PKG/etc cp -a $CWD/mkinitrd.conf.sample $PKG/etc/mkinitrd.conf.sample +# ARM systems often need more time to find devices: +case "$( uname -m )" in + arm*) sed -e 's@#WAIT="1"@#WAIT="4"@g' \ + -i $PKG/etc/mkinitrd.conf.sample;; +esac chown root:root $PKG/etc/mkinitrd.conf.sample chmod 644 $PKG/etc/mkinitrd.conf.sample 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 |