Red Hat Bugzilla – Bug 465288
mtd modules not auto-loaded on OLPC
Last modified: 2008-10-03 02:47:32 EDT
The MTD modules for the internal nand (cafe-nand and then the varioud mtd*) aren't getting auto-loaded by udev on the OLPC
The CAFÉ driver should be automatically loaded by PCI hotplug, and it should appear in /proc/mtd. That's enough for you to mount a JFFS2 file system on it and start using it.
Neither mtdblock nor mtdchar drivers will get loaded by default though, so you'll have no user-visible device nodes, and won't be able to write images to it, etc.
For the installer, I suspect you just want to autoload the mtdchar module if there are MTD devices in the system?
MTD devices won't appear in the device model yet; I have code to fix that but it isn't ready to ship yet. You need to look in /proc/mtd.
Hmmm, yeah, cafe-nand is getting auto-loaded (although it didn't look to be last time; not sure why. I blame gremlins). But I have no /proc/mtd at all.
FWIW, this isn't necessarily about the installer (although eventually it might be), but more about making the nand available when running off of a live image.
It was gremlins that ate your /proc/mtd too. You can't have MTD devices in the system without /proc/mtd being present.
The NAND can be available and mounted as a file system, without either character or block device access being enabled. Just 'mount -tjffs2 mtd0 /mnt' or, by partition name, 'mount -tjffs2 mtd:rootfs /mnt' (not sure if you're using partitions).
Well, arguably it _is_ a bug that the underlying MTD devices don't turn up in sysfs and HAL -- we could do something about that, and I'm working on it.
Attaching a character or block device to expose them to userspace is probably always going to be optional in the general case -- there will be people who just don't want that at all, because they only want to mount the file system.
Maybe we could automatically load the mtdchar.ko module whenever there are any MTD devices in the system for Fedora though?
How much does your problem get easier if you just autoload mtdchar.ko whenever mtd.ko is loaded? The char device should turn up in sysfs then, and a lot of stuff might 'just work' a little more as expected.