Re: [Yaffs] yaffs Digest, Vol 40, Issue 8

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Laurence Withers
Date:  
To: yaffs
Subject: Re: [Yaffs] yaffs Digest, Vol 40, Issue 8
On Wednesday 24 September 2008, Ignacio Molinero wrote:
> I have a the same problem but at the end of the boot's log I get a
> Kernel Panic, this is my bootlog:

[snip]
> yaffs: dev is 32505857 name is "mtdblock1"
> yaffs: passed flags ""
> yaffs: Attempting MTD mount on 31.1, "mtdblock1"
> block 22 is bad
> block 23 is bad
> block 234 is bad
> block 395 is bad
> VFS: Mounted root (yaffs2 filesystem).


Looks like the kernel is happy to mount your filesystem.

> Freeing init memory: 132K
> Warning: unable to open an initial console.


This often means that /dev/console doesn't exist on the underlying device.
Unless you're using initrd, /dev/console (and IIRC /dev/null) need to exist
as nodes on the actual filesystem.

Even if you're using udev or mdev or some other way of setting up /dev, this
method won't be called until a bit later in the boot process, and you
need /dev/console to begin with.

How are you putting files into your filesystem? One method involves creating a
yaffs2 image with mkyaffsimage or equivalent utility and then using the
bootloader or mtd_utils to write it to the flash device. If you're doing
that, you can simply put the device nodes into your image (use fakeroot if
you don't have root access).

> Kernel panic - not syncing: No init found. Try passing init= option to
> kernel.


In the kernel source, look at the function init_post() in init/main.c . You'll
see the kernel tries to execute /sbin/init, /etc/init, /bin/init and
finally /bin/sh . If it can't execute any of those, you'll get the error
message you just saw [also it shows you where the console message comes
from].

Should the image you are writing to the flash device actually contain these
files? If not, start by putting them in.

Bye for now,
-- 
Laurence Withers, <>  --  jabber:
http://www.lwithers.me.uk/                             tel:+447753988197