hi there I add some debug code in the (kernel 2.6.9) init/do_mounts.c,the output is below: RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize loop: loaded (max 8 devices) ******* VFS: test name = </dev/root> VFS: fs_name = <ext2> VFS: fs_name = <romfs> VFS: tried fs_name = <ext2> err= -14 (why it is -14??) VFS: Cannot open root device "ram0" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) what I have done for this: modify the vmlinux.lds.S , added: 81 *(.got) /* Global offset table */ 82 romfs_start = .; 83 romfs.o 84 romfs_end = .; then modify the arch /armnommu/kernel/setup.c ,make the cmdline like this: add : extern int romfs_start,romfs_end; add in the setup_arch(xxx) extern int romfs_start,romfs_end;
sprintf(default_command_line, "root=/dev/ram0 initrd=0x%08lx,%ldk keepinitrd", (unsigned long)&romfs_start,((unsigned long)&romfs_end - (unsigned long)&romfs_start)>>10); i also set initrd ,ramdisk,romfs support = y ******* but in the 2.4 kernel,the output is like this: ******* VFS: test name = </dev/root> VFS: fs_name = <ext2> VFS: fs_name = <romfs> VFS: root name <1f:02> ******* VFS: tried fs_name = <ext2> err= -22 VFS: tried fs_name = <romfs> err= 0 the debug code is here:(provided by Phil Wilshire SDCS System Design & Consulting Services [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> in the ucdot) static void __init mount_block_root(char *name, int flags) { char *fs_names = __getname(); char *p; get_fs_names(fs_names); // New debug code here printk("*******\nVFS: test name = <%s> \n",name); for (p = fs_names; *p; p += strlen(p)+1) { printk("VFS: fs_name = <%s> \n",p); } printk("VFS: root name <%s> \n*******\n",kdevname(ROOT_DEV)); //End of new debug code retry: for (p = fs_names; *p; p += strlen(p)+1) { int err = sys_mount(name, "/root", p, flags, root_mount_data); // More debug code here ( just a single line ) printk("VFS: tried fs_name = <%s> err= %d\n",p,err); switch (err) { regards, rui
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev