#
# NB Warning this Makefile does not include header dependencies.
#
-# $Id: Makefile,v 1.19 2008-11-07 00:32:21 charles Exp $
+# $Id: Makefile,v 1.20 2008-11-11 01:48:47 charles Exp $
#EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
CFLAGS = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2
CFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES -DNO_Y_INLINE
-CFLAGS += -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing -fno-strict-aliasing
-CFLAGS += -O0
+CFLAGS += -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing
+#CFLAGS += -fno-strict-aliasing
+CFLAGS += -O3
#CFLAGS += -DVALGRIND_TEST
#CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
static void UpdateCounter(const char *name, unsigned *val, int initialise)
{
- int inh;
- int outh;
+ int inh=-1;
+ int outh=-1;
unsigned x[2];
int nread = 0;
int nwritten = 0;
if((s.st_mode & S_IFMT) == S_IFDIR && recursive)
dump_directory_tree_worker(str,1);
+
+ if(s.st_ino > 10000)
+ FatalError();
}
*
*/
-const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.1 2008-11-07 00:34:47 charles Exp $";
+const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.2 2008-11-11 01:48:47 charles Exp $";
#include "yaffs_norif1.h"
#define FORMAT_VALUE 0x1234
#define DATA_BYTES_PER_CHUNK 1024
-#define BLOCKS_IN_DEVICE (32*1024/256)
+#define BLOCKS_IN_DEVICE (8*1024/256)
#define YNOR_PREMARKER (0xF6)
m18_1Dev.nChunksPerBlock =248;
m18_1Dev.nReservedBlocks = 2;
m18_1Dev.startBlock = 0; // Can use block 0
- m18_1Dev.endBlock = 127; // Last block
+ m18_1Dev.endBlock = 31; // Last block
m18_1Dev.useNANDECC = 0; // use YAFFS's ECC
m18_1Dev.nShortOpCaches = 10; // Use caches
m18_1Dev.genericDevice = (void *) 1; // Used to identify the device in fstat.
//#define YNORSIM_BIT_CHANGES 15
#define YNORSIM_BIT_CHANGES 1
+#if 0
/* Simulate 32MB of flash in 256k byte blocks.
* This stuff is x32.
*/
#define YNORSIM_BLOCK_SIZE_U32 (256*1024/4)
#define YNORSIM_DEV_SIZE_U32 (32*1024 * 1024/4)
+#else
+/* Simulate 8MB of flash in 256k byte blocks.
+ * This stuff is x32.
+ */
+
+#define YNORSIM_BLOCK_SIZE_U32 (256*1024/4)
+#define YNORSIM_DEV_SIZE_U32 (8*1024 * 1024/4)
+#endif
static __u32 word[YNORSIM_DEV_SIZE_U32];
return;
srand(time(NULL));
remaining_ops = 1000000000;
- remaining_ops = (rand() % 10000) * 10000;
+ remaining_ops = (rand() % 10000) * 3000 * YNORSIM_BIT_CHANGES;
ynorsim_RestoreImage();
}