Re: [Yaffs] Yaffs Direct problem

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Zavi
Date:  
To: Charles Manning
CC: yaffs
Subject: Re: [Yaffs] Yaffs Direct problem
1. On the same note, Is there a simple straightforward tutorial on how
to reconfigure the Yaffs direct emulation to 512 byte pages, different
device sizes (32 MB, 256Mb, 1GB) etc.?
I went over the mailing list and only found vague references, and
couldn't make out a clear explanation out of them.

I tried to change the relevant PAGE_DATA_SIZE defines etc. in
yaffs_fileem2k.h, and running the default test (dtes.c:
resize_stress_test_no_grow) but kept getting errors about tags
corruption, data mismatch and much more.
Also tried to follow an advice from one of the posts and add the
CONFIG_AUTO_YAFFS2 to the maekfile defines.
didn't work either.

2. Also I'd like to know what are the ways to configure the amount of
RAM allocated when the program is running (and static structures and
buffers) to be able to control the memory footprint?

Thank you

On Nov 18, 2007 9:59 PM, Charles Manning <> wrote:
> On Monday 19 November 2007 05:40:01 Zavi wrote:
> > I'm trying to compile Yaffs direct on a 64-bit linux machine in the
> > emulation mode, using the Makefile in the direct sub-directory.
> >
> > 1. When I tried to run the default test in direct/dtest.c-
> > resize_stress_test_no_grow("/flash/flash",20);
> >
> > I got an error message: "yaffs_Tnode should be 32 but is 64."
> > When I change the following line
> > #define YAFFS_NTNODES_INTERNAL                (YAFFS_NTNODES_LEVEL0 / 2)
> > to
> > #define YAFFS_NTNODES_INTERNAL                (YAFFS_NTNODES_LEVEL0 / 4)
> > the test executes fine. Could the problem have something to do with
> > the fact my machine is 64-bit?

>
> I expect so. I don't think you should try to fix it like this though.
>
> The problem is most likely due to the tnode allocations not being wide enough
> to hold 64-bit pointers. Try this patch instead.
>
> --- yaffs_guts.c.old       2007-11-19 08:48:44.000000000 +1300
> +++ yaffs_guts.c        2007-11-19 08:48:44.000000000 +1300
> @@ -1146,6 +1146,10 @@
>          * Must be a multiple of 32-bits  */
>         tnodeSize = (dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8;

>
> +       if(tnodeSize < sizeof(yaffs_Tnode))
> +               tnodeSize = sizeof(yaffs_Tnode);
> +
> +
>         /* make these things */

>
>         newTnodes = YMALLOC(nTnodes * tnodeSize);

>
>
>
> >
> > 2. Even after this I'm still having problems with all the following
> > tests (last tests in dtest.c) -
> > long_test_on_path("/ram2k");
> > long_test_on_path("/flash");
> > simple_rw_test("/flash/flash");
> > fill_disk_test("/flash/flash");
> > rename_over_test("/flash");
> > ...
> >
> > I keep getting a segmentation fault, and trying to trace it led me to
> > the return statement of yaffs_write for no apparent reason.
> > What could be the reason? can it be it's again related to the 64-bit issue?
>
> I think it was most likely caused by the way you tried to fix it.
>
> Try the above patch instead. Please get back to me as to how this works.
>
> -- CHarles
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>