[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] uclinux boot problem (kernel panic)
Hi,
Sanjay Patel wrote:
> We tried the options & debug solutions given on the following link:
>
> http://www.ucdot.org/article.pl?sid=03/01/11/1049210&mode=thread.
>
> We obtain the following log on the hyperterminal:
>
> Log File:
... 8< ...
> VFS: test name = </dev/root>
> VFS: fs_name = <ext2>
> VFS: fs_name = <romfs>
> VFS: root name <1f:09>
> VFS: tried fs_name = <ext2> err= -6
>
> VFS: Cannot open root device "" or 1f:09
... 8< ...
> It is not trying to mount the romfs partition. What could be the
> problem? Are there any changes required in any source file?
> Is there any
> step missing for kernel compilation? Please guide us.
I also had that error.
My first solution was to do an ugly hack in the filesystem probe order
(do_mounts.c) and I moved "romfs" in the string list to be the first one
(see my attached patch).
This prevents the err=-6 thing with ext2. Well, but later I realized I don't
need ext2 at all, and I unchecked it 'make menuconfig'. You know, I just
need romfs and jffs2.
Hope that helps
Cheers, F@lk
Index: do_mounts.c
===================================================================
RCS file: /repository1/uclinux_dist/linux-2.4.x/init/do_mounts.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- do_mounts.c 15 Nov 2005 05:33:35 -0000 1.3
+++ do_mounts.c 16 Mar 2006 10:56:25 -0000 1.4
@@ -324,6 +324,7 @@
char *s = page;
if (root_fs_names) {
+ printk("VFS: *1\n");
strcpy(page, root_fs_names);
while (*s++) {
if (s[-1] == ',')
@@ -349,11 +350,40 @@
{
char *fs_names = __getname();
char *p;
+ int i, len;
get_fs_names(fs_names);
+
+
+ //
+ // HACK to let "romfs" be the first entry (fbr 16/03/2006)
+ //
+ // (move string a bit to the right and copy "romfs" in the new gap)
+ for (p = fs_names; *p; p += strlen(p)+1);
+ len = p-fs_names;
+ i = len + strlen("romfs")+1;
+ while (len >= 0) {
+ *(fs_names+i) = *(fs_names+len);
+ i--; len--;
+ }
+ strcpy(fs_names, "romfs");
+
+#if 0 //---------debug output
+ printk("******\nVFS: test name = <%s> \n", name);
+ printk("VFS: root name <%s> \n******\n", kdevname(ROOT_DEV));
+ for (p = fs_names; *p; p += strlen(p)+1) {
+ printk("VFS: fs_name = <%s> \n", p);
+ }
+#endif //---------debug output
+
retry:
for (p = fs_names; *p; p += strlen(p)+1) {
int err = sys_mount(name, "/root", p, flags, root_mount_data);
+
+#if 0 //debug output
+ printk("VFS: tried fs_name = <%s> err= %d\n",p,err);
+#endif //debug output
+
switch (err) {
case 0:
goto out;