分类:
2008-04-23 17:33:23
noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0 |
... yaffs: dev is 32505858 name is "mtdblock2" yaffs: Attempting MTD mount on 31.2, "mtdblock2" VFS: Mounted root (yaffs filesystem). ... |
... printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line); parse_early_param(); parse_args("Booting kernel", command_line, __start___param, __stop___param - __start___param, &unknown_bootoption); ... |
__early_begin = .; *(__early_param) __early_end = .; |
__setup("root=", root_dev_setup); |
static int __init obsolete_checksetup(char *line) { struct obs_kernel_param *p; p = __setup_start; do { int n = strlen(p->str); if (!strncmp(line, p->str, n)) { if (p->early) { /* Already done in parse_early_param? (Needs * exact match on param part) */ if (line[n] == '\0' || line[n] == '=') return 1; } else if (!p->setup_func) { printk(KERN_WARNING "Parameter %s is obsolete," " ignored\n", p->str); return 1; } else if (p->setup_func(line + n)) return 1; } p++; } while (p < __setup_end); return 0; } |
static int __init root_dev_setup(char *line) { strlcpy(saved_root_name, line, sizeof(saved_root_name)); return 1; } |
... kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND); numa_default_policy(); ... |
... /* * check if there is an early userspace init. If yes, let it do all * the work */ if (sys_access((const char __user *) "/init", 0) == 0) execute_command = "/init"; else prepare_namespace(); ... |
void __init prepare_namespace(void) { int is_floppy; mount_devfs(); if (root_delay) { printk(KERN_INFO "Waiting %dsec before mounting root device...\n", root_delay); ssleep(root_delay); } md_run_setup(); if (saved_root_name[0]) { root_device_name = saved_root_name; ROOT_DEV = name_to_dev_t(root_device_name); if (strncmp(root_device_name, "/dev/", 5) == 0) root_device_name += 5; } is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; if (initrd_load()) goto out; if (is_floppy && rd_doload && rd_load_disk(0)) ROOT_DEV = Root_RAM0; mount_root(); out: umount_devfs("/dev"); sys_mount(".", "/", NULL, MS_MOVE, NULL); sys_chroot("."); security_sb_post_mountroot(); mount_devfs_fs (); } |
void __init mount_block_root(char *name, int flags) { char *fs_names = __getname(); char *p; char b[BDEVNAME_SIZE]; get_fs_names(fs_names); retry: for (p = fs_names; *p; p += strlen(p)+1) { int err = do_mount_root(name, p, flags, root_mount_data); switch (err) { case 0: goto out; case -EACCES: flags |= MS_RDONLY; goto retry; case -EINVAL: continue; } /* * Allow the user to distinguish between failed sys_open * and bad superblock on root device. */ __bdevname(ROOT_DEV, b); printk("VFS: Cannot open root device \"%s\" or %s\n", root_device_name, b); printk("Please append a correct \"root=\" boot option\n"); panic("VFS: Unable to mount root fs on %s", b); } panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b)); out: putname(fs_names); } |
Kernel : try fs ext2 Kernel : try fs msdos Kernel : try fs vfat Kernel : try fs yaffs |
MMC: sd_app_op_cond locked busy. Probably have broken SD-Card. Kernel : try fs yaffs yaffs: dev is 32505858 name is "mtdblock2" yaffs: Attempting MTD mount on 31.2, "mtdblock2" |