summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-03 04:02:53 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-03 04:02:53 +0200
commitad1050964eabbbc00547e8c6c91d8a7c3f13598f (patch)
tree79962456d502bbbb8a072568f31bd18e99b85099 /install
parent66f28ea341f293cbddd30242f9ea03673d4674d2 (diff)
downloadmkinitcpio-ad1050964eabbbc00547e8c6c91d8a7c3f13598f.tar.gz
mkinitcpio-ad1050964eabbbc00547e8c6c91d8a7c3f13598f.tar.xz
Merged autodetect changes from tpowa.
Removed older subsystem specific scripts, replaced then with 'modload' just to keep the option in place. git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@43 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install')
-rw-r--r--install/autodetect36
-rw-r--r--install/filesystems-auto17
-rw-r--r--install/ide2
-rw-r--r--install/modload18
-rw-r--r--install/pci17
-rw-r--r--install/sata2
-rw-r--r--install/scsi2
-rw-r--r--install/udev3
8 files changed, 47 insertions, 50 deletions
diff --git a/install/autodetect b/install/autodetect
index 9e23783..c851a4b 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -5,21 +5,33 @@ install ()
msg ":: Autodetecting modules"
#blegh, we'll let /tmp clean itself up
modtmp=$( mktemp /tmp/initcpio_modules.XXXXXX )
- MODULES=" $(auto_modules "/scsi/" | grep -v "ata")
- $(auto_modules "/block/")
- $(auto_modules "/fusion/")
- $(auto_modules "/usb/") usb_storage usbhid
- $(auto_modules "scsi/.*ata")
- $(auto_modules "/ide/")
- $(cat /proc/filesystems | grep -v nodev) "
- for m in $MODULES; do
+ modall=$( mktemp /tmp/initcpio_modulesall.XXXXXX )
+ AUTODETECT=" $(auto_modules "/scsi/" | grep -v "imm"| grep -v "pcmcia" | grep -v "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) "
+
+ for m in $AUTODETECT; do
echo $(basename ${m//\.ko/}) >> $modtmp
- [ "$m" == "ata_piix" ] && echo "piix" >> $modtmp
+ [ "$m" == "ext3" ] && echo "jbd" >> $modtmp
done
- add_file $modtmp "/modules"
-
+ grep "file /lib/modules" ${FILELIST} >>$modall
+ for i in `cat $modtmp`; do
+ sed -i -e "\=/$i=d" $modall
+ done
+ for i in `grep "file /lib/modules" $modall | awk '{print $2}'`; do
+ sed -i -e "\=$i=d" ${FILELIST}
+ done
+ msg "Included MODULES:"
+ msg "-----------------"
+ msg "$(grep "file /lib/modules/" ${FILELIST} | awk '{print $2}')"
+ msg "-----------------"
BINARIES=""
FILES=""
- SCRIPT="autodetect"
+ SCRIPT=""
}
diff --git a/install/filesystems-auto b/install/filesystems-auto
deleted file mode 100644
index bf7976c..0000000
--- a/install/filesystems-auto
+++ /dev/null
@@ -1,17 +0,0 @@
-# vim: set ft=sh:
-
-install ()
-{
- MODULES=" $(cat /proc/filesystems | grep -v nodev) "
- BINARIES=""
- FILES=""
- SCRIPT="filesystems"
-}
-
-help ()
-{
-cat<<HELPEOF
- This hook is responsible for loading filesystems for the root device.
- Detection will be done at runtime.
-HELPEOF
-}
diff --git a/install/ide b/install/ide
index bbd1ef5..b8aafc3 100644
--- a/install/ide
+++ b/install/ide
@@ -5,7 +5,7 @@ install ()
MODULES=" $(all_modules "/ide/" | grep -v "legacy") ";
BINARIES=""
FILES=""
- SCRIPT="ide"
+ SCRIPT=""
}
help ()
diff --git a/install/modload b/install/modload
new file mode 100644
index 0000000..fd46a22
--- /dev/null
+++ b/install/modload
@@ -0,0 +1,18 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=""
+ BINARIES=""
+ FILES=""
+ SCRIPT="modload"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook manually detects and loads modules. It is much
+ slower than udev and the udev hook should be preferred.
+ This remains meerly as another option for a user.
+HELPEOF
+}
diff --git a/install/pci b/install/pci
deleted file mode 100644
index 4329720..0000000
--- a/install/pci
+++ /dev/null
@@ -1,17 +0,0 @@
-# vim: set ft=sh:
-
-install ()
-{
- MODULES=""
- BINARIES=""
- FILES=""
- SCRIPT="pci"
-}
-
-help ()
-{
-cat<<HELPEOF
- This hook loads the necessary modules for the pci bus.
- No modules are installed by this hook, it is script-only.
-HELPEOF
-}
diff --git a/install/sata b/install/sata
index 708e3ff..e50ffee 100644
--- a/install/sata
+++ b/install/sata
@@ -5,7 +5,7 @@ install ()
MODULES=" $(all_modules "scsi/.*ata") sx8 ahci pdc_adma sd_mod sr_mod piix"
BINARIES=""
FILES=""
- SCRIPT="sata"
+ SCRIPT=""
}
help ()
diff --git a/install/scsi b/install/scsi
index 6e822c1..0525ae4 100644
--- a/install/scsi
+++ b/install/scsi
@@ -7,7 +7,7 @@ install ()
$(all_modules "/fusion/")"
BINARIES=""
FILES=""
- SCRIPT="scsi"
+ SCRIPT=""
}
help ()
diff --git a/install/udev b/install/udev
index 8f1f570..120b3f2 100644
--- a/install/udev
+++ b/install/udev
@@ -9,9 +9,10 @@ install ()
add_file /lib/initcpio/udev/udevd /sbin/udevd
add_file /lib/initcpio/udev/udevtrigger /sbin/udevtrigger
add_file /lib/initcpio/udev/udevsettle /sbin/udevsettle
- add_file /lib/initcpio/udev/udev.rules etc/udev/rules.d/udev.rules
+ add_file /lib/initcpio/udev/udev.rules /etc/udev/rules.d/udev.rules
add_file /lib/initcpio/udev/start_udev /etc/start_udev
add_file /lib/initcpio/udev/load-modules.sh /lib/udev/load-modules.sh
+ add_file /lib/initcpio/udev/modalias_ieee1394 /lib/udev/modalias_ieee1394
}
help ()