* fail to boot with MTD root fs
@ 2002-05-25 0:06 Kunihiko IMAI
2002-05-25 17:53 ` Steven J. Hill
0 siblings, 1 reply; 3+ messages in thread
From: Kunihiko IMAI @ 2002-05-25 0:06 UTC (permalink / raw)
To: linux-mips
Hi,
I'm using Pb1500 evaluation board and met somewhat serious problem.
The problem is that failing to mount FlashROM filesystem as root fs
and go into infinite loop without any message. Does anyone have a
good (or better) solution?
I'm using SGI kernel source tree, linux-2.4.18 of linux_2_4 branch.
When booting with nfs root, and using MTD FlashROM fs, it works well.
I traced code from init/main.c with printk. It reached at schedule()
and go into infinite loop. I also used kernel gdb, but fail to trace.
It may be sensible with timing or interrupt. So printk trace may be
fake result, too.
Some month ago, I ported 2.4.16 kernel to L-Card+, a small VR4181
board. At this time, it can boot with FlashROM root fs. It works
well.
I compared 2.4.16 and 2.4.18 code. And I found a difference at
mount_root().
at 2.4.18:
for (p = fs_names; *p; p += strlen(p)+1) {
struct file_system_type * fs_type = get_fs_type(p);
if (!fs_type)
continue;
atomic_inc(&bdev->bd_count);
retval = blkdev_get(bdev, mode, 0, BDEV_FS); ///// <-
/// go into infinite loop at this line
if (retval)
goto Eio;
sb = read_super(ROOT_DEV, bdev, fs_type,
root_mountflags, root_mount_data);
put_filesystem(fs_type);
if (sb) {
blkdev_put(bdev, BDEV_FS);
goto mount_it;
}
}
panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV));
at 2.4.16:
for (p = fs_names; *p; p += strlen(p)+1) {
struct file_system_type * fs_type = get_fs_type(p);
if (!fs_type)
continue;
sb = read_super(ROOT_DEV, bdev, fs_type,
root_mountflags, root_mount_data);
if (sb)
goto mount_it;
put_filesystem(fs_type);
}
panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV));
Reverting this part as 2.4.16, then it can boot. But I'm afraid that
this reverting causes another problem...
Thanks.
_._. __._ _ . ... _ .___ ._. _____ _... ._ _._ _.._. .____ _ . ... _
Kunihiko IMAI
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fail to boot with MTD root fs
2002-05-25 0:06 fail to boot with MTD root fs Kunihiko IMAI
@ 2002-05-25 17:53 ` Steven J. Hill
2002-05-27 4:59 ` Kunihiko IMAI
0 siblings, 1 reply; 3+ messages in thread
From: Steven J. Hill @ 2002-05-25 17:53 UTC (permalink / raw)
To: Kunihiko IMAI; +Cc: linux-mips
Kunihiko IMAI wrote:
> Hi,
>
> I'm using Pb1500 evaluation board and met somewhat serious problem.
> The problem is that failing to mount FlashROM filesystem as root fs
> and go into infinite loop without any message. Does anyone have a
> good (or better) solution?
>
> I'm using SGI kernel source tree, linux-2.4.18 of linux_2_4 branch.
>
> When booting with nfs root, and using MTD FlashROM fs, it works well.
>
There was a bug in 2.4.18 with respect to the MTD code and using flash
as a root filesystem. It had to do with the MTD block devices. Make
the changes below and things will work again.
-Steve
Index: mtdblock.c
===================================================================
RCS file: /data/cvs/settop/drivers/mtd/mtdblock.c,v
retrieving revision 1.6
diff -u -r1.6 mtdblock.c
--- mtdblock.c 9 May 2002 13:35:40 -0000 1.6
+++ mtdblock.c 25 May 2002 16:52:14 -0000
@@ -371,8 +371,6 @@
if (inode == NULL)
release_return(-ENODEV);
- invalidate_device(inode->i_rdev, 1);
-
dev = MINOR(inode->i_rdev);
mtdblk = mtdblks[dev];
Index: mtdblock_ro.c
===================================================================
RCS file: /data/cvs/settop/drivers/mtd/mtdblock_ro.c,v
retrieving revision 1.2
diff -u -r1.2 mtdblock_ro.c
--- mtdblock_ro.c 3 Jan 2002 17:19:58 -0000 1.2
+++ mtdblock_ro.c 25 May 2002 16:53:01 -0000
@@ -79,8 +79,6 @@
if (inode == NULL)
release_return(-ENODEV);
- invalidate_device(inode->i_rdev, 1);
-
dev = MINOR(inode->i_rdev);
mtd = __get_mtd_device(NULL, dev);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fail to boot with MTD root fs
2002-05-25 17:53 ` Steven J. Hill
@ 2002-05-27 4:59 ` Kunihiko IMAI
0 siblings, 0 replies; 3+ messages in thread
From: Kunihiko IMAI @ 2002-05-27 4:59 UTC (permalink / raw)
To: linux-mips
Hi,
Thank you for your advice.
I followed your advice to fix the code. It goes well, boot with flash
ROM root fs.
Thank you.
_._. __._ _ . ... _ .___ ._. _____ _... ._ _._ _.._. .____ _ . ... _
Kunihiko IMAI
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-05-27 4:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-25 0:06 fail to boot with MTD root fs Kunihiko IMAI
2002-05-25 17:53 ` Steven J. Hill
2002-05-27 4:59 ` Kunihiko IMAI
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.