Robert Murrell
|
Getting mcd to run on a minimal system
|
Robert Murrell
10/11/2010 3:28 PM
post70211
|
Getting mcd to run on a minimal system
I'm trying to get mcd to auto-detect when a USB memory stick is inserted. My boot image is small and does not use the
diskboot program and its associated syinit script. I'm booting from a compact flash card that installs as /dev/hd0 and
/dev/hd0t77. I can plug in a USB stick and it shows up as /dev/hd1 and /dev/hd1t6. I tried to configure devb-umass to
have it show up as the expected /dev/umass*, but this is poorly documented and I couldn't get it to work. So I tried to
trick mcd into mounting it as /fs/us0 with the following configuration:
mcd.conf:
vvvvvvvvvvvvvvvvvvv
[/dev/hd*]
Callout = PATH_MEDIA_PROCMGR
Argument = /proc/mount
Priority = 11,10
Start Rule = MOUNT
Stop Rule = UNMOUNT
[MOUNT]
Callout = MOUNT_FSYS
Argument = /etc/mcd.mnt
[UNMOUNT]
Callout = UNMOUNT_FSYS
[/dev/cd*]
Callout = CD_MEDIA_IOBLK
Argument = 1000,2000
Priority = 11,9
Start Rule = MOUNT
Stop Rule = UNMOUNT
[/fs/cd*]
Callout = PATH_MEDIA_PROCMGR
Argument = /proc/mount
Priority = 11,10
Start Rule = INSERTED
Stop Rule = EJECTED
[/fs/usb*]
Callout = PATH_MEDIA_PROCMGR
Argument = /proc/mount
Priority = 11,10
Start Rule = INSERTED
Stop Rule = EJECTED
[/fs/pfs*]
Callout = PATH_MEDIA_PROCMGR
Argument = /proc/mount
Priority = 11,10
Start Rule = INSERTED
Stop Rule = EJECTED
[INSERTED]
[EJECTED]
[AVAILABLE]
^^^^^^^^^^^^^
mcd.mnt:
vvvvvvvvvvvvvvvv
#----------------------------------------------------------------------
# Device Mountpt Type Options
#----------------------------------------------------------------------
/dev/cd[0-9] /fs/cd%# udf normv
/dev/hd[1-9] / enum
/dev/hd[1-9]t1[124] /fs/usb%0 dos normv,fsi=use
/dev/hd[1-9]t1[124].[0-9] /fs/usb%0 dos normv,fsi=use
/dev/hd[1-9]t[146] /fs/usb%0 dos normv,fsi=use
/dev/hd[1-9]t[146].[0-9] /fs/usb%0 dos normv,fsi=use
/dev/hd[1-9]t7[789] /fs/usb%0 qnx4 normv
/dev/hd[1-9]t17[789] /fs/usb%0 qnx6 normv,sync=optional
/dev/hd[1-9]t7 /fs/usb%0 nt normv,ro
/dev/hd[1-9]t175 /fs/usb%0 mac normv,ro
/dev/hd[1-9] /fs/usb%0 dos normv,fsi=use
^^^^^^^^^^^^^^^
This doesn't work and I don't see any errors in slogger. If I insert the stick and manually mount the device it shows
up:
# mount -t dos /dev/hd1t6 /fs/usb0
When I unplug the stick, /fs/usb0 and the devices disappear correctly.
Is what I am doing incorrect? Is there a better way? I've attached my build file as generated by the IDE.
Rob Murrell
|
|
|