thank you for your quick reply. But I'm afraid that didn't help at all. When I tried running the non-patched version on a 32-bit machine it worked fine. Well "fine" is an exaggeration. Some of the tests produce unclear outputs, some of the tests must be reconfigured to flash/flash path instead of /flash. But in general it works ok, on a 32-bit machine. 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 > yaffs@lists.aleph1.co.uk > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs >