rspro board and mounting root from SD

M. Warner Losh imp at bsdimp.com
Fri Feb 5 05:26:21 UTC 2010


In message: <d763ac661002042109o4522e5c1ia2eb51cf199bec75 at mail.gmail.com>
            Adrian Chadd <adrian.chadd at gmail.com> writes:
: Howdy,
: 
: I've been looking at using an SD card as a test root device but it
: unfortunately appears that device probing doesn't quite happen fast
: enough for the umass device to be enumerated.
: 
: description:
: 
: * system boots
: * usbus0 is created - root_mount_hold("usbus0") called
: * usbus0 is probed, and umass0 is found/createdcreated
: * umass0 probe begins
: * root_mount_rel() on usbus0 is called
: * nothing else is waiting, so VFS tries mounting the root device
: 
: The SD probe/attach doesn't occur until -after- the root is mounted
: and the system begins.
: 
: If I stick a root_mount_hold() call in umass_attach(), the umass
: device is given the opportunity to complete probe/attach but obviously
: then a lack of root_mount_rel() results in nothing completing.

Where did you put this?

: Any ideas? My knowledge of USB/CAM internals is currently
: non-existant. I couldn't find any particular function/callback which
: is called when the umass bus probe completes - as far as I can tell,
: attach kicks off some CAM messages which may eventually end up finding
: a device or not. I'm not sure of the "right" place to put the release;
: or whether I'm on the right track at all.

Maybe CAM should have something like this, but I'm not sure.

Warner


More information about the freebsd-mips mailing list