[Yaffs] Compile problems with Direct Interface

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Stephane Lesage
Date:  
To: yaffs
Subject: [Yaffs] Compile problems with Direct Interface

Hi,

First of all, thanks for this very useful opensource project.
I try to evaluate YAFFS2 with my 512 bytes page SLC NAND.
But I have some trouble to compile it on my platform using the direct
interface.

1. My embedded platform is neither Linux nor WinCE...
Can you make some minor adjustements to support it ?

- '#ifndef WIN32' are messy: it does not necessarily imply the platform
is linux !!!
- devextras.h tries to #include <sys/stat.h>, <linux/types.h>,
<linux/list.h>, <linux/fs.h>, <linux/stat.h>, which I don't have.
- YBUG() is defined twice !
- a lot of things are not defined, I think this should be included in
ydirectenv.h or devextras.h:
typedef long long loff_t;
typedef long off_t;
typedef long dev_t;
typedef unsigned long mode_t;
#define S_xxx mode flags
- I don't know what to do with S_ISFIFO(), S_ISCHR(), S_ISBLK(),
S_ISSOCK(), so I just commented 'case YAFFS_OBJECT_TYPE_SPECIAL' in
yaffs_guts.h

2. I have a lot of warnings/errors:
- signed/unsigned mismatch

- useless comparison of unsigned numbers vs 0 !!!
in yaffs_guts.c, line 494:
if(bi->blockState >=0 && bi->blockState < YAFFS_NUMBER_OF_BLOCK_STATES)

- cast int (bit-field) to enum
in yaffs_guts.c, line 5559:
state = bi->blockState;

- pointer cast mismatch, look at this line:
buf = dev->srCache = YMALLOC(srCacheBytes);
-> this would be better:
buf = (__u8 *) (dev->srCache = (yaffs_ChunkCache *) YMALLOC(srCacheBytes));

Anyway, everything above can be solved easily. The real question is:

3. My page size is 512 bytes.
So I tried to compile with CONFIG_YAFFS_YAFFS1.
And the problems begin here with yaffs_checkptrw.c.

error: struct "yaffs_DeviceStruct"
has no field "readChunkWithTagsFromNAND"
has no field "writeChunkWithTagsToNAND"
has no field "markNANDBlockBad"
has no field "queryNANDBlock"

Can I use small pages with CONFIG_YAFFS_YAFFS2 ?
How to compile with CONFIG_YAFFS_YAFFS1 ?

TIA.

--
Stephane Lesage
ATEIS International