---
utils/Makefile | 4 ++--
utils/mkyaffs2image.c | 16 ++++++++--------
yaffs_packedtags2.c | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/utils/Makefile b/utils/Makefile
index 6760723..ef02aec 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -62,8 +62,8 @@ mkyaffsimage: $(MKYAFFSIMAGEOBJS) $(COMMONOBJS)
mkyaffs2image: $(MKYAFFS2IMAGEOBJS) $(COMMONOBJS)
$(CC) -o $@ $^
-rtems-mkyaffs2image: CFLAGS:= $(CFLAGS) -DRTEMS_MKYAFFS2IMAGE
-rtems-mkyaffs2image: $(MKYAFFS2IMAGEOBJS)
+nor-mkyaffs2image: CFLAGS:= $(CFLAGS) -DNOR_MKYAFFS2IMAGE
+nor-mkyaffs2image: $(MKYAFFS2IMAGEOBJS)
$(CC) -o $@ $(MKYAFFS2IMAGEOBJS)
clean:
diff --git a/utils/mkyaffs2image.c b/utils/mkyaffs2image.c
index 9c75fa9..2e62708 100644
--- a/utils/mkyaffs2image.c
+++ b/utils/mkyaffs2image.c
@@ -33,7 +33,7 @@
#include <assert.h>
#include "yaffs_guts.h"
-#ifndef RTEMS_MKYAFFS2IMAGE
+#ifndef NOR_MKYAFFS2IMAGE
#include "yaffs_ecc.h"
#endif
@@ -44,7 +44,7 @@ unsigned yaffs_trace_mask=0;
#define MAX_OBJECTS 10000
// Adjust these to match your NAND LAYOUT:
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
#define chunkSize 512
#define spareSize 16
#define blockSize (128*1024)
@@ -206,11 +206,11 @@ static void shuffle_oob(char *spareData, struct yaffs_packed_tags2_tags_only *pt
static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
{
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
u8 remainder[remainderSize];
#endif
struct yaffs_ext_tags t;
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
struct yaffs_packed_tags2_tags_only pt;
#else
struct yaffs_packed_tags2 pt;
@@ -237,7 +237,7 @@ static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
memset(&pt, 0, sizeof(pt));
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
yaffs_pack_tags2_tags_only(&pt,&t);
if (convert_endian)
@@ -255,7 +255,7 @@ static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
if (write(outFile,spareData,sizeof(spareData)) != sizeof(spareData))
fatal("write");
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
write_chunk_count++;
if (write_chunk_count == pagesPerBlock) {
write_chunk_count = 0;
@@ -372,7 +372,7 @@ static int write_object_header(int id, enum yaffs_obj_type t, struct stat *s, in
static void pad_image(void)
{
u8 data[chunkSize + spareSize];
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
u8 remainder[remainderSize];
#endif
int padPages = (nPages % pagesPerBlock);
@@ -387,7 +387,7 @@ static void pad_image(void)
}
}
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
memset(remainder, 0xff, sizeof(remainder));
if (write(outFile,remainder,sizeof(remainder)) != sizeof(remainder))
fatal("write");
diff --git a/yaffs_packedtags2.c b/yaffs_packedtags2.c
index b8546cf..18ff48b 100644
--- a/yaffs_packedtags2.c
+++ b/yaffs_packedtags2.c
@@ -97,7 +97,7 @@ void yaffs_pack_tags2(struct yaffs_packed_tags2 *pt,
{
yaffs_pack_tags2_tags_only(&pt->t, t);
-#ifndef RTEMS_MKYAFFS2IMAGE
+#ifndef NOR_MKYAFFS2IMAGE
if (tags_ecc)
yaffs_ecc_calc_other((unsigned char *)&pt->t,
sizeof(struct yaffs_packed_tags2_tags_only),
@@ -153,7 +153,7 @@ void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt,
int result;
-#ifdef RTEMS_MKYAFFS2IMAGE
+#ifdef NOR_MKYAFFS2IMAGE
result = 0;
#else
struct yaffs_ecc_other ecc;
--
1.7.4.1