Bug 465288 - mtd modules not auto-loaded on OLPC
mtd modules not auto-loaded on OLPC
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks: FedoraOnXO
  Show dependency treegraph
 
Reported: 2008-10-02 12:06 EDT by Jeremy Katz
Modified: 2008-10-03 02:47 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-02 22:03:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jeremy Katz 2008-10-02 12:06:13 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
Comment 1 David Woodhouse 2008-10-02 12:23:24 EDT
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.
Comment 2 Jeremy Katz 2008-10-02 13:12:03 EDT
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.
Comment 3 David Woodhouse 2008-10-02 14:45:52 EDT
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).
Comment 4 David Woodhouse 2008-10-03 02:47:32 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.