summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-04 09:29:25 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-04 09:29:25 +0200
commit35308163932b39fbeb147b09b5e807009392c46a (patch)
tree213ec1b8be0cd25e7da14880b4f3ea6584cb4fdf /install
parentf5b35a26476faadaf518d4fbeef8187436e18980 (diff)
downloadmkinitcpio-35308163932b39fbeb147b09b5e807009392c46a.tar.gz
mkinitcpio-35308163932b39fbeb147b09b5e807009392c46a.tar.xz
Changes to autodetection:
General performance improvement Cleaned up excess modules git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@56 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install')
-rw-r--r--install/autodetect29
-rw-r--r--install/sata8
-rw-r--r--install/scsi5
-rw-r--r--install/usb8
4 files changed, 31 insertions, 19 deletions
diff --git a/install/autodetect b/install/autodetect
index 6371d35..d9214ed 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -5,27 +5,24 @@ install ()
msg ":: Autodetecting modules"
MODULE_FILE="$(mktemp /tmp/initcpio_modules.XXXXXX)"
#blegh, we'll let /tmp clean itself up
- AUTODETECT=" $((auto_modules "/scsi/" | grep -ve "imm" -e "pcmcia" -e "ide") && echo "sd_mod sr_mod")
- $(auto_modules "/block/" && echo "sd_mod sr_mod")
- $(auto_modules "/fusion/" && echo "sd_mod sr_mod")
- $(auto_modules "/usb/" && echo "usb_storage usbhid sd_mod sr_mod")
- $(auto_modules "/ide/")
- $(auto_modules "/ieee1394/" && echo "sbp2 sd_mod sr_mod")
- $(auto_modules "/cdrom/")
- $(cat /proc/filesystems | grep -v nodev) "
+ AUTODETECT="$(auto_modules -e "/scsi/" -e "/block" -e "/fusion/" \
+ -e "/usb/" -e "/ide/" -e "/ieee1394/" -e "/cdrom")
+ $(cat /proc/filesystems | grep -v nodev) "
for m in $AUTODETECT; do
modname="$(basename ${m%%\.ko})"
grep "${modname}" "${MODULE_FILE}" >/dev/null 2>&1 && continue
+ case "${m}" in
+ #*/ieee1394/*) echo -e "sbp2\nsd_mod\nsr_mod" >> "${MODULE_FILE}";;
+ *ext3*) echo "jbd" >> "${MODULE_FILE}" ;;
+ *afs*)echo "rxrpc" >> "${MODULE_FILE}" ;;
+ *cramfs*) echo "zlib_inflate" >> "${MODULE_FILE}" ;;
+ *isofs*) echo "zlib_inflate" >> "${MODULE_FILE}" ;;
+ *msdos*) echo "fat" >> "${MODULE_FILE}" ;;
+ *vfat*)echo "fat" >> "${MODULE_FILE}" ;;
+ *ocfs2*) echo -e "ocfs2_dlm\njbd\nocfs2_nodemanager\nconfigfs" >> "${MODULE_FILE}" ;;
+ esac
echo "${modname}" >> "${MODULE_FILE}"
- # fixing missing depends for filesystems
- [ "$m" = "ext3" ] && echo "jbd" >> "${MODULE_FILE}"
- [ "$m" = "afs" ] && echo "rxrpc" >> "${MODULE_FILE}"
- [ "$m" = "cramfs" ] && echo "zlib_inflate" >> "${MODULE_FILE}"
- [ "$m" = "isofs" ] && echo "zlib_inflate" >> "${MODULE_FILE}"
- [ "$m" = "msdos" ] && echo "fat" >> "${MODULE_FILE}"
- [ "$m" = "vfat" ] && echo "fat" >> "${MODULE_FILE}"
- [ "$m" = "ocfs2" ] && echo -e "ocfs2_dlm\njbd\nocfs2_nodemanager\nconfigfs" >> "${MODULE_FILE}"
done
BINARIES=""
diff --git a/install/sata b/install/sata
index 134ecdb..73c2729 100644
--- a/install/sata
+++ b/install/sata
@@ -2,7 +2,13 @@
install ()
{
- MODULES=" $(checked_modules "scsi/.*ata" && echo "sx8 ahci pdc_adma sd_mod sr_mod")"
+ MODULES=" $(checked_modules "scsi/.*ata") "
+
+ MODULES=$(echo ${MODULES}) #trim whitespace
+ if [ "x${MODULES}" != "x" ]; then
+ MODULES="${MODULES} sx8 ahci pdc_adma sd_mod sr_mod"
+ fi
+
BINARIES=""
FILES=""
SCRIPT=""
diff --git a/install/scsi b/install/scsi
index 2f107bc..8e8694b 100644
--- a/install/scsi
+++ b/install/scsi
@@ -5,6 +5,11 @@ install ()
MODULES=" $(checked_modules "/scsi/" | grep -ve "imm" -e "pdc_adma" -e "ahci" -e "ata" -e "pcmcia" -e "ide")
$(checked_modules "/block/" | grep -v "sx8")
$(checked_modules "/fusion/")"
+
+ MODULES=$(echo ${MODULES}) #trim whitespace
+ if [ "x${MODULES}" != "x" ]; then
+ MODULES="${MODULES} sd_mod\nsr_mod"
+ fi
BINARIES=""
FILES=""
SCRIPT=""
diff --git a/install/usb b/install/usb
index 03ed024..f528322 100644
--- a/install/usb
+++ b/install/usb
@@ -2,8 +2,12 @@
install ()
{
- MODULES=" $(checked_modules "/usb/host" | grep -ve "_cs" -e "sl1811-hcd" -e "isp116x-hcd")
- usb_storage usbhid sd_mod sr_mod "
+ MODULES=" $(checked_modules "/usb/host" | grep -ve "_cs" -e "sl1811-hcd" -e "isp116x-hcd")"
+
+ MODULES=$(echo ${MODULES}) #trim whitespace
+ if [ "x${MODULES}" != "x" ]; then
+ MODULES="${MODULES} usb_storage sd_mod sr_mod"
+ fi
BINARIES=""
FILES=""
SCRIPT="usb"