From 1ef7f115459c49cb1d0669544d5af39930e315ea Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Wed, 23 Jun 2010 00:18:06 +0200 Subject: Add memdisk hook This hook creates a block device for virtual disks created by memdisk (http://syslinux.zytor.com/wiki/index.php/MEMDISK). --- hooks/memdisk | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 hooks/memdisk (limited to 'hooks') 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 +} -- cgit v1.2.3-24-g4f1b