summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-04-22 01:00:28 +0200
committerAaron Griffin <aaron@archlinux.org>2006-04-22 01:00:28 +0200
commitea20a441f8fecc9fa84e0e1f12c4b71bf436f872 (patch)
tree1f2ff1cec1b0629f4ba5639729c9438bcdaf7d44 /install
parentacc783c8af5514083e542fe7d91be6a1c5920ad7 (diff)
downloadmkinitcpio-ea20a441f8fecc9fa84e0e1f12c4b71bf436f872.tar.gz
mkinitcpio-ea20a441f8fecc9fa84e0e1f12c4b71bf436f872.tar.xz
Hook updates and changes...
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@7 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install')
-rw-r--r--install/base32
-rw-r--r--install/encrypt15
-rw-r--r--install/filesystems18
-rw-r--r--install/ide22
-rw-r--r--install/ide-auto22
-rw-r--r--install/resume16
-rw-r--r--install/sata21
-rw-r--r--install/sata-auto20
-rw-r--r--install/scsi20
-rw-r--r--install/scsi-auto19
-rw-r--r--install/udev18
-rw-r--r--install/usb18
-rw-r--r--install/usb-auto17
13 files changed, 258 insertions, 0 deletions
diff --git a/install/base b/install/base
new file mode 100644
index 0000000..9cd2030
--- /dev/null
+++ b/install/base
@@ -0,0 +1,32 @@
+# vim:set ft=sh:
+
+install ()
+{
+ add_dir "/proc"
+ add_dir "/sys"
+ add_dir "/dev"
+
+ add_nod "/dev/null" 644 c 1 3
+ add_nod "/dev/zero" 644 c 1 5
+ add_nod "/dev/console" 644 c 5 1
+
+ for f in /lib -name klibc-*.so; do
+ add_file $f
+ done
+
+ for f in /usr/lib/klibc/bin/*; do
+ add_file $f /bin/$(basename $f)
+ done
+
+ add_file "/lib/initramfs/init" "/init"
+ add_file "${CONFIG}" "/config"
+}
+
+help ()
+{
+cat <<HELPEOF
+ This hook sets up all initial directories and installs base
+ klibc utilities and libraries. DO NOT remove this one unless
+ you know what you're doing.
+HELPEOF
+}
diff --git a/install/encrypt b/install/encrypt
new file mode 100644
index 0000000..e2087e4
--- /dev/null
+++ b/install/encrypt
@@ -0,0 +1,15 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" aes-i586 $(find "${MODULEDIR}/kernel/drivers/md" -name dm*.ko) "
+ BINARIES="cryptsetup.static"
+ FILES=""
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook allows for an encrypted root device.
+HELPEOF
+}
diff --git a/install/filesystems b/install/filesystems
new file mode 100644
index 0000000..c012d1b
--- /dev/null
+++ b/install/filesystems
@@ -0,0 +1,18 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(all_modules '/kernel/fs') "
+ BINARIES=""
+ FILES=""
+ SCRIPT="filesystems"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook is responsible for loading filesystems for the root device.
+ Detection will be done at runtime. If you would like to minimize the
+ modules installed in the image, use the -auto flavor.
+HELPEOF
+}
diff --git a/install/ide b/install/ide
new file mode 100644
index 0000000..1afedd9
--- /dev/null
+++ b/install/ide
@@ -0,0 +1,22 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=""
+ for m in $(all_modules | grep "/ide/");
+ do
+ MODULES="$MODULES $(basename $m)"
+ done
+ BINARIES=""
+ FILES=""
+ SCRIPT="ide"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an ide root device.
+ Detection will take place at runtime. To minimize the modules
+ in the image, use the -auto flavor.
+HELPEOF
+}
diff --git a/install/ide-auto b/install/ide-auto
new file mode 100644
index 0000000..8a5a247
--- /dev/null
+++ b/install/ide-auto
@@ -0,0 +1,22 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=""
+ for m in $(auto_modules | grep "/ide/");
+ do
+ MODULES="$MODULES $(basename $m)"
+ done
+ BINARIES=""
+ FILES=""
+ SCRIPT="ide"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an ide root device.
+ Detection will take place at runtime. To minimize the modules
+ in the image, use the -auto flavor.
+HELPEOF
+}
diff --git a/install/resume b/install/resume
new file mode 100644
index 0000000..b214b61
--- /dev/null
+++ b/install/resume
@@ -0,0 +1,16 @@
+# vim:set ft=sh:
+install ()
+{
+ MODULES=""
+ BINARIES=""
+ FILES=""
+ SCRIPT="resume"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook initializes support for resuming from Disk
+ and/or Memory. Supports suspend2 if found.
+HELPEOF
+}
diff --git a/install/sata b/install/sata
new file mode 100644
index 0000000..3c33376
--- /dev/null
+++ b/install/sata
@@ -0,0 +1,21 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(all_modules "scsi/.*ata") "
+ for m in $MODULES; do
+ [ "$m" == "ata_piix" ] && MODULES="$MODULES piix"
+ done
+ BINARIES=""
+ FILES=""
+ SCRIPT="sata"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an sata root device.
+ Detection will take place at runtime. To minimize the modules
+ in the image, use the -auto flavor.
+HELPEOF
+}
diff --git a/install/sata-auto b/install/sata-auto
new file mode 100644
index 0000000..d3e89b6
--- /dev/null
+++ b/install/sata-auto
@@ -0,0 +1,20 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(auto_modules "scsi/.*ata") "
+ for m in $MODULES; do
+ [ "$m" == "ata_piix" ] && MODULES="$MODULES piix"
+ done
+ BINARIES=""
+ FILES=""
+ SCRIPT="sata"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an sata root device.
+ Detection will take place at runtime.
+HELPEOF
+}
diff --git a/install/scsi b/install/scsi
new file mode 100644
index 0000000..3e6fa2f
--- /dev/null
+++ b/install/scsi
@@ -0,0 +1,20 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(all_modules "/scsi/" | grep -v "ata")
+ $(all_modules "/block/")
+ $(all_modules "/fusion/")"
+ BINARIES=""
+ FILES=""
+ SCRIPT="scsi"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an scsi root device.
+ Detection will take place at runtime. To minimize the modules
+ in the image, use the -auto flavor.
+HELPEOF
+}
diff --git a/install/scsi-auto b/install/scsi-auto
new file mode 100644
index 0000000..45b93ef
--- /dev/null
+++ b/install/scsi-auto
@@ -0,0 +1,19 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(auto_modules "/scsi/" | grep -v "ata")
+ $(auto_modules "/block/")
+ $(auto_modules "/fusion/")"
+ BINARIES=""
+ FILES=""
+ SCRIPT="scsi"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an scsi root device.
+ Detection will take place at runtime.
+HELPEOF
+}
diff --git a/install/udev b/install/udev
new file mode 100644
index 0000000..58b2448
--- /dev/null
+++ b/install/udev
@@ -0,0 +1,18 @@
+# vim:set ft=sh:
+
+install ()
+{
+ MODULES=""
+ BINARIES=""
+ FILES=" /etc/udev/rules.d/udev.rules /etc/udev/udev.conf "
+ add_file /lib/initramfs/udevd /bin/udevd
+}
+
+help ()
+{
+cat <<HELPEOF
+ This hook will use udev to create your root device node.
+ It is recommended to use this hook if you are using any
+ non ide/sata block device.
+HELPEOF
+}
diff --git a/install/usb b/install/usb
new file mode 100644
index 0000000..b7d1de8
--- /dev/null
+++ b/install/usb
@@ -0,0 +1,18 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(all_modules "/usb/") usb_storage usbhid"
+ BINARIES=""
+ FILES=""
+ SCRIPT="usb"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an usb root device.
+ Detection will take place at runtime. To minimize the modules
+ in the image, use the -auto flavor.
+HELPEOF
+}
diff --git a/install/usb-auto b/install/usb-auto
new file mode 100644
index 0000000..33932a2
--- /dev/null
+++ b/install/usb-auto
@@ -0,0 +1,17 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(auto_modules "/usb/") usb_storage usbhid"
+ BINARIES=""
+ FILES=""
+ SCRIPT="usb"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an usb root device.
+ Detection will take place at runtime.
+HELPEOF
+}