[Yaffs] Problems when making yaffs direct

Reggiani, Adamo areggiani@ferrari.it
Fri, 8 Oct 2004 11:24:25 +0200


My approach to yaffs_direct was a little bit different.
AFAIK yaffs_direct is made to be compiled inside your apps/os, instead =
of using the standard yaffs kernel module.

I've tested it last year with a small rtos (named TargetOS) and i've =
done this steps:
- make a new directory with this files: devextras.h dtest.c yaffs_ecc.c =
yaffs_ecc.h yaffs_flashif.c yaffs_flashif.h yaffs_guts.c yaffs_guts.h =
yaffs_ramdisk.c yaffs_ramdisk.h yaffscfg.c yaffscfg.h yaffsfs.c =
yaffsfs.h yaffsinterface.h yportenv.h

- puts file reference in your makefile/project environment (this depend =
on the toolchain, etc.)

- modify the yaffscfg.c and yaffscfg.h to fit your environment; this =
normally means to define a way to lock/unlock yaffs access (through =
semaphore, mutex, etc.), and eventually your customized init

- call somewhere in your app some test function (cache_read_test, =
long_test, ...)

- compile it

That's all, and works well for me.

Note that in the reported file list i've mentioned yaffs_ramdisk.c, this =
because i've tested yaffs in ram.
I suggest to do the same the first time, it's simpler than using nand =
drivers.
After you've set up correctly your environment you can switch to =
nand/mtd or whatever.

Regards
Adamo


> -----Original Message-----
> From: Daniel Gustafsson [mailto:daniel.gustafsson@space.se]
> Sent: venerd=EC 8 ottobre 2004 09.47
> To: Reggiani, Adamo; yaffs@stoneboat.aleph1.co.uk
> Subject: RE: [Yaffs] Problems when making yaffs direct
>=20
>=20
> =20
> I want to test yaffs using the direct approach. When=20
> downloading yaffs and
> extracting the tarball I get several directorys and files(of=20
> course). When
> reading on the yaffs homepage they explain how to make and=20
> mount yaffs.
> Everything works fine when running the Makefile in the yaffs=20
> dir. If I want
> to compile and run with "yaffs/direct" instead I assume that=20
> I should use
> the Makefile in yaffs/direct. When doing so I get some=20
> strange errors that I
> dont understand and see a solution to.=20
>=20
> An minor example of the errors:
>=20
> [gustad@tuxsrv1 work]$ make clean
> rm -f dtest.o yaffscfg.o yaffsfs.o yaffs_ramdisk.o core
> [gustad@tuxsrv1 work]$ make
> gcc -c -Wall -DCONFIG_YAFFS_DIRECT=20
> -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -g
> dtest.c -o dtest.o
> In file included from yaffscfg.h:12,
>                  from yaffsfs.h:10,
>                  from dtest.c:9:
> yaffs_guts.h:204: warning: no semicolon at end of struct or union
> yaffs_guts.h:204: parse error before '.' token
> yaffs_guts.h:205: parse error before '.' token
> yaffs_guts.h:206: parse error before '.' token
> yaffs_guts.h:229: parse error before '}' token
> yaffs_guts.h:229: warning: type defaults to `int' in declaration of
> `yaffs_ObjectHeader'
> yaffs_guts.h:229: warning: data definition has no type or=20
> storage class
> yaffs_guts.h:353: warning: no semicolon at end of struct or union
> yaffs_guts.h:353: parse error before '.' token
> yaffs_guts.h:354: parse error before '.' token
> yaffs_guts.h:355: parse error before '.' token
> yaffs_guts.h:372: parse error before '}' token
>=20
>=20
> I have not modified any of the files.
>=20
> What is wrong???
>=20
>=20
> >-----Original Message-----
> >From: Reggiani, Adamo [mailto:areggiani@ferrari.it]=20
> >Sent: Friday, October 08, 2004 9:32 AM
> >To: Daniel Gustafsson; yaffs@stoneboat.aleph1.co.uk
> >Subject: RE: [Yaffs] Problems when making yaffs direct
> >
> >
> >Hi Daniel,
> >could you be more precise?
> >What you mean for "problems when making the direct directory"?
> >What kind of problem you have?
> >
> >Regards
> >Adamo
> >
> >
> >> -----Original Message-----
> >> From: yaffs-admin@stoneboat.aleph1.co.uk
> >> [mailto:yaffs-admin@stoneboat.aleph1.co.uk]On Behalf Of Daniel
> >> Gustafsson
> >> Sent: gioved=EC 7 ottobre 2004 17.03
> >> To: yaffs@stoneboat.aleph1.co.uk
> >> Subject: [Yaffs] Problems when making yaffs direct
> >>=20
> >>=20
> >> I am trying to use yaffs direct. Having problems when making=20
> >> the direct
> >> directory. If anyone how have tried the direct approach can=20
> >> give me some
> >> tips I would be extreamly greateful.
> >>=20
> >> //Daniel
> >>=20
> >>=20
> >> _______________________________________________
> >> yaffs mailing list
> >> yaffs@stoneboat.aleph1.co.uk
> >> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >>=20
> >
> >
>=20
>=20