[oe] JFFS2 trouble

Valentin Longchamp valentin.longchamp at epfl.ch
Thu Jun 7 13:19:54 UTC 2007


I have been working with nfs root filesystems during last months for my 
openembeded targeted system. I am going to receive the first prototype of our 
custom design soon so I have tested the jffs2 images generated by OE for my 
bootstrap-image.

I can boot on the jffs2 images loading them into flash, which is nice. However 
I have noticed that these jffs2 images have several problems:

1) Running the nfsroot on the dev board, when I want to mount the jffs2 
filesystem from the corresponding mtd device, I have to use the corresponding 
mtdblock and not directly the mtd device. But I have no error in dmesg.

> root at mx31ads:/$ mount -t jffs2 /dev/mtd2 /media/flash
> mount: wrong fs type, bad option, bad superblock on /dev/mtd2,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
>
> root at mx31ads:/$ dmesg | tail
> <6>eth0: using half-duplex 10Base-T (RJ-45)
> <4>IP-Config: Complete:
> <4>      device=eth0, addr=128.178.145.106, mask=255.255.255.0,
> gw=128.178.145.1, <4>     host=128.178.145.106, domain=, nis-domain=(none),
> <4>     bootserver=128.178.145.68, rootserver=128.178.145.68, rootpath=
> <5>Looking up port of RPC 100003/2 on 128.178.145.68
> <5>Looking up port of RPC 100005/1 on 128.178.145.68
> <4>VFS: Mounted root (nfs filesystem).
> <6>Freeing init memory: 196K
> <6>w1_master_driver w1_bus_master1: Family 9 for 09.000003c61301.1d is not
> registered. root at mx31ads:/$ mount -t jffs2 /dev/mtdblock2 /media/flash
> root at mx31ads:/$ cd /media/flash/
> root at mx31ads:/media/flash$ ls -al
> drwxr-xr-x   16 root     root            0 Jan  1 00:00 .
> drwxr-xr-x   11 root     root         1024 Jun  7  2007 ..
> drwxr-xr-x    2 root     root            0 Jan  1 00:00 bin
> drwxr-xr-x    2 root     root            0 Jan  1 00:00 boot
> drwxr-xr-x    3 root     root            0 Jan  1  1970 dev
> drwxr-xr-x   26 root     root            0 Jan  1  1970 etc
> drwxr-xr-x    3 root     root            0 Jan  1 00:00 home
> drwxr-xr-x    5 root     root            0 Jan  1 00:00 lib
> drwxr-xr-x   10 root     root            0 Jan  1 00:00 media
> drwxr-xr-x    2 root     root            0 Jan  1 00:00 mnt
> drwxr-xr-x    2 root     root            0 Jan  1 00:00 proc
> drwxr-xr-x    2 root     root            0 Jan  1 00:00 sbin
> drwxr-xr-x    2 root     root            0 Jan  1 00:00 sys
> lrwxrwxrwx    1 root     root            8 Jan  1  1970 tmp -> /var/tmp
> drwxr-xr-x   10 root     root            0 Jan  1 00:00 usr
> drwxr-xr-x    7 root     root            0 Jan  1 00:00 var
> root at mx31ads:/media/flash$

However, according to the jffs2 documentation, I should use /dev/mtd2 and 
not /dev/mtdblock2:
http://www.linux-mtd.infradead.org/faq/jffs2.html#L_mtdblock

2) I have seen many times the problems described on the jffs2 help page:
- http://www.linux-mtd.infradead.org/faq/jffs2.html#L_magicnfound
- http://www.linux-mtd.infradead.org/faq/jffs2.html#L_messages

So has anyone experienced similar problems ? Could this be related to the 
mkfs.jffs2 used by openembedded which is to old ? I don't think so because I 
guess the mkfs.jffs2 used by OE is this one which seems up to date:

> valentin at lsro1pc307:/usr/local/OE/tmp/work/i686-linux/mtd-utils-native-1.0.
>0+git-r2/git$ ./mkfs.jffs2 --version mkfs.jffs2: revision 1.50

I want to precise that I am working on a imx31ads board, running a freescale 
2.6.19 kernel (I have recipe for it, it's not the one present by default on 
OE) and I am using the redboot bootloader.

Do you think my problems could be due to (bad) redboot usage ? Does anyone 
know what could be the cause of these (not so severe) issues ?

Thank you

-- 
Valentin Longchamp
PhD Student
http://people.epfl.ch/valentin.longchamp




More information about the Openembedded-devel mailing list