lkml.org 
[lkml]   [2012]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectFail to mount a ext2 partition /dev/mmcblk0p1 on SD card as root file system in kernel 3.2
From
Hi,

Kernel 3.2 panic when I mount a ext2 partition /dev/mmcblk0p1 on SD
card as root file system.

My boot parameter line is "root=/dev/mmcblk0p1 rw rootwait
earlyprintk=serial,uart0,57600 console=ttyBF0,57600".

After reading init/do_mounts.c a bit, I find VFS folders "/dev" and
"/root" don't exist when mount_root() tries to create block device
node "/dev/root" and mount this device at path "/root". If I create
these folders by mkdir() before line create_dev() in function
mount_root(), kernel boots up on SD card properly.

Where should folders "/dev" and "/root" be created? Any hint?

Thanks

void __init mount_root(void)
{
.......
#ifdef CONFIG_BLOCK
create_dev("/dev/root", ROOT_DEV);
mount_block_root("/dev/root", root_mountflags);
#endif
}

static int __init do_mount_root(char *name, char *fs, int flags, void *data)
{
int err = sys_mount(name, "/root", fs, flags, data);
if (err)
return err;
......
}

Sonic Zhang


\
 
 \ /
  Last update: 2012-03-02 11:55    [W:0.156 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site