This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: jffs2 missing files
On Thu, Dec 11, 2003 at 09:26:11AM +0100, Andrew Lunn wrote:
> On Wed, Dec 10, 2003 at 12:35:04PM -0800, Brian Pomerantz wrote:
> > I'm trying to get jffs2 working in redboot on an xscale platform with
> > Intel flash (and yes, I'm using gcc 3.3.2). I am able to mount the
> > file system, though only with the "-d /dev/flash1" and not
> > "-f <partition>". However, some or all of the files that were created
> > with Linux are not accessible with redboot. I've turned on the jffs2
> > debugging printfs and it appears that those inodes for the missing
> > files are never read in. When I create files in redboot, I am able to
> > access them in Linux just fine. Anyone have any ideas what may be
> > wrong or where I might start looking for problems?
>
> Any pattern to the files that are missing?
>
> Anything under /dev will not be accessible. eCos's own /dev will take
> preference.
>
After a bit more searching, I found that the call to
cyg_io_get_config() in jffs2_read_super for getting the device size is
returning a completely wrong number. It was returning the size as
0x100000 when in fact the size of the partition is 0xF60000. If I
hard code the size to be 0xF60000 then I get this:
RedBoot> mount -t jffs2 -d /dev/flash1
jffs2_read_super 473: /dev/flash1
jffs2_read_super 476: 1048576
jffs2_do_mount_fs 304: 123 16121856 131072
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0000: 0x5265 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0004: 0x6f6f instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0010: 0x5000 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0014: 0x5000 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0018: 0x0008 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0100: 0x5265 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0104: 0x6f6f instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0108: 0x636f instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee010c: 0x6967 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00ee0110: 0x50ff instead
<5>Further such events for this erase block will not be printed
<4>Empty flash at 0x00efe3f8 ends at 0x00eff000
** command abort - illegal memory access?
RedBoot>
If I hard code the size to 0xF00000, then I don't get the illegal
memory access (which I'm not sure what that means). The mount happens
just fine and I see all my files. One other problem I ran into was
the fact that <pkgconf/fs_jffs2.h>, which defines various options, is
not included in compr.c. Without that being included, compression
does not work. After including that, I was able to load a kernel and
filesystem image from flash in to ram and boot Linux (which was my
goal all along :).
Today I'll see if I can figure out why the size is being reported
wrong. I would certainly appreciate some ideas on why when I hard
code the partition size to the size that it should be, I get this
illegal memory access.
BAPper
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss