summaryrefslogtreecommitdiffstats
path: root/hooks/memdisk
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-06-23 00:18:06 +0200
committerThomas Bächler <thomas@archlinux.org>2010-06-23 00:18:06 +0200
commit1ef7f115459c49cb1d0669544d5af39930e315ea (patch)
tree65e1f30dc54429cbeb41ad5578d3542030a8986b /hooks/memdisk
parentbe2270384ce03d7a17e2cf6a0ec0c5a1f861c1ff (diff)
downloadmkinitcpio-1ef7f115459c49cb1d0669544d5af39930e315ea.tar.gz
mkinitcpio-1ef7f115459c49cb1d0669544d5af39930e315ea.tar.xz
Add memdisk hook
This hook creates a block device for virtual disks created by memdisk (http://syslinux.zytor.com/wiki/index.php/MEMDISK).
Diffstat (limited to 'hooks/memdisk')
-rw-r--r--hooks/memdisk11
1 files changed, 11 insertions, 0 deletions
diff --git a/hooks/memdisk b/hooks/memdisk
new file mode 100644
index 0000000..2c3642e
--- /dev/null
+++ b/hooks/memdisk
@@ -0,0 +1,11 @@
+# vim:set ft=sh:
+run_hook ()
+{
+ MEMDISK=$(/usr/bin/memdiskfind)
+ if [ $? -eq 0 ]; then
+ # We found a memdisk, set up phram
+ /sbin/modprobe phram phram=memdisk,${MEMDISK}
+ # Load mtdblock, the memdisk will be /dev/mtdblock0
+ /sbin/modprobe mtdblock
+ fi
+}