Skip to contentSkip to conversation

Booting from /dev/mtdblock/0

DISCUSSION Murtada Shah 3 participants 4 messages Apr 25, 2002 – Apr 29, 2002 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to boot from /dev/mtdblock/0 (root=/dev/mtdblock/0 in cmdline options)

When I boot from nfs, I can mount /dev/mtdblock/0 no problem from command line & unmount etc.

But if I pass it as the root= option, while booting it gets stuck.

With mtd debug level to 3 I see that it tries mtdblock_open twice... which it shouldnt..

"mtdblock_open
ok
mtdblock_open
mtdblock_release"

Then it hangs here for a long time.
What could be the cause?

Murtada

#1 lore raw

G'day,

Have not got to the bottom of this yet, but having the same problem. We had a development board which worked fine using kernel version 2.4.3 but since updating to 2.4.18 we are now seeing the same problem.

Does anyone know of any required patches for this?

Thanks

John Weston

Quoted 26 lines · Mutada Shah

Hi,

I'm trying to boot from /dev/mtdblock/0 (root=/dev/mtdblock/0 in cmdline options)

When I boot from nfs, I can mount /dev/mtdblock/0 no problem from command line & unmount etc.

But if I pass it as the root= option, while booting it gets stuck.

With mtd debug level to 3 I see that it tries mtdblock_open twice... which it shouldnt..

"mtdblock_open
ok
mtdblock_open
mtdblock_release"

Then it hangs here for a long time.
What could be the cause?

Murtada

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#2 lore raw

Hi again,

Pardon my last message. Having looked up the mail archive found the solution there. Seems to be a problem calling the invalidate_device function call in the mtdblock.c code.

Seems like I had better look harder next time.

Thanks anyway.

John Weston

Quoted 40 lines · John Weston

G'day,

Have not got to the bottom of this yet, but having the same problem. We had a development board which worked fine using kernel version 2.4.3 but since updating to 2.4.18 we are now seeing the same problem.

Does anyone know of any required patches for this?

Thanks

John Weston

Quoted 26 lines · Mutada Shah

Hi,

I'm trying to boot from /dev/mtdblock/0 (root=/dev/mtdblock/0 in cmdline options)

When I boot from nfs, I can mount /dev/mtdblock/0 no problem from command line & unmount etc.

But if I pass it as the root= option, while booting it gets stuck.

With mtd debug level to 3 I see that it tries mtdblock_open twice... which it shouldnt..

"mtdblock_open
ok
mtdblock_open
mtdblock_release"

Then it hangs here for a long time.
What could be the cause?

Murtada

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#3 lore raw
In reply to John Weston

Its a one-line fix.

    static release_t mtdblock_release(struct inode *inode, struct file *file)
    {
	    int dev;
	    struct mtdblk_dev *mtdblk;
	    DEBUG(MTD_DEBUG_LEVEL1, "mtdblock_release\n", inode);

	    if (inode == NULL)
		    release_return(-ENODEV);

    #if 0
	    invalidate_device(inode->i_rdev, 1);
    #endif
Quoted 42 lines · John Weston

G'day,

Have not got to the bottom of this yet, but having the same problem. We had a development board which worked fine using kernel version 2.4.3 but since updating to 2.4.18 we are now seeing the same problem.

Does anyone know of any required patches for this?

Thanks

John Weston

Quoted 26 lines · Mutada Shah

Hi,

I'm trying to boot from /dev/mtdblock/0 (root=/dev/mtdblock/0 in cmdline options)

When I boot from nfs, I can mount /dev/mtdblock/0 no problem from command line & unmount etc.

But if I pass it as the root= option, while booting it gets stuck.

With mtd debug level to 3 I see that it tries mtdblock_open twice... which it shouldnt..

"mtdblock_open
ok
mtdblock_open
mtdblock_release"

Then it hangs here for a long time.
What could be the cause?

Murtada

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Signature · 2 lines
"Life begins when you can spend your spare time programming
instead of watching television."  -- Cal Keegan