How to mount a root FS on Flash RAM?
pub.helmutjahns_at_gmx.de
Date: 11/25/05
- Previous message: GB: "Re: Embedded Linux Firmware/Driver Wiz?"
- Next in thread: giangiammy_at_gmail.com: "Re: How to mount a root FS on Flash RAM?"
- Reply: giangiammy_at_gmail.com: "Re: How to mount a root FS on Flash RAM?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Nov 2005 05:06:32 -0800
Hi to everybody!
I'm using kernel version 2.6.8.1 and target is an ARM922T processor.
I'd like to mount the root FS which is located on Flash memory instead
of using initrd during kernel startup.
The compilation process builds a rootfs.jffs2 which is put into the
Flash memory at the beginning of block 0. I changed the kernel command
string to
root=/dev/mtdblock0 rw mem=8M noinitrd console=ttyUA0,115200
ramdisk=3700
which is expected to match the requirements (I was testing some
modifications of this string, of course). I also adapted the Flash
device driver to use the right Flash memory base address (begin of
block 0).
When using initrd instead, I'm able to mount the Flash device using
shell commands, therefore I can rule out a Flash memory malfunction.
When booting I get a kernel panic:
VFS: Cannot open root device "mtdblock0" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)
It turned out to be that the device is not registered properly
(stackframe:
do_mount()=>do_new_mount()=>do_kern_mount()=>ext2_get_sb()=>get_sb_bdev()=>open_bdev_excl()=>blkdev_get()=>do_open()=>get_gendisk()=>kobj_lookup()
access the wrong block device, of course using ext2_get_sb() is also
suspicious in this case).
The reason for the device registration malfunction can be seen in
function filp_open() (stackframe:
do_exit()=>init()=>prepare_namespace()=>name_to_device_t()=>try_name()=>sys_open()=>filp_open()
). This function receives the file name '/sys/block/mtdblock0/dev' and
returns with error code 'no entry', indicating that this file is
nonexistent.
It seems to be that preparation of mounting root FS on Flash is
incomplete. Is there anybody who can tell me what's going wrong here?
Any help would be very appriciated!
Thanks a lot.
- Previous message: GB: "Re: Embedded Linux Firmware/Driver Wiz?"
- Next in thread: giangiammy_at_gmail.com: "Re: How to mount a root FS on Flash RAM?"
- Reply: giangiammy_at_gmail.com: "Re: How to mount a root FS on Flash RAM?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]