Skip to contentSkip to conversation

u-boot: Update yaffs2 file system

PATCH New Charles Manning 2 participants 4 messages May 10, 2012 – Aug 13, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot: Update yaffs2 file system

This patch updates the yaffs2 in u-boot to correspond to
git://www.aleph1.co.uk/yaffs2
commit id 9ee5d0643e559568dbe62215f76e0a7bd5a63d93

---
 common/cmd_yaffs2.c            |  383 ++-
 fs/yaffs2/Makefile             |   31 +-
 fs/yaffs2/README-linux         |  201 -
 fs/yaffs2/devextras.h          |  275 --
 fs/yaffs2/stdio.h              |    1 +
 fs/yaffs2/stdlib.h             |    1 +
 fs/yaffs2/string.h             |    6 +
 fs/yaffs2/yaffs_allocator.c    |  357 ++
 fs/yaffs2/yaffs_allocator.h    |   30 +
 fs/yaffs2/yaffs_attribs.c      |  153 +
 fs/yaffs2/yaffs_attribs.h      |   28 +
 fs/yaffs2/yaffs_bitmap.c       |   97 +
 fs/yaffs2/yaffs_bitmap.h       |   33 +
 fs/yaffs2/yaffs_checkptrw.c    |  525 ++--
 fs/yaffs2/yaffs_checkptrw.h    |   15 +-
 fs/yaffs2/yaffs_ecc.c          |  148 +-
 fs/yaffs2/yaffs_ecc.h          |   46 +-
 fs/yaffs2/yaffs_error.c        |   58 +
 fs/yaffs2/yaffs_flashif.h      |   24 +-
 fs/yaffs2/yaffs_flashif2.h     |   35 +
 fs/yaffs2/yaffs_getblockinfo.h |   35 +
 fs/yaffs2/yaffs_guts.c         | 9213 +++++++++++++++-------------------------
 fs/yaffs2/yaffs_guts.h         | 1219 +++---
 fs/yaffs2/yaffs_hweight.c      |   53 +
 fs/yaffs2/yaffs_hweight.h      |   24 +
 fs/yaffs2/yaffs_list.h         |  126 +
 fs/yaffs2/yaffs_malloc.h       |   25 -
 fs/yaffs2/yaffs_mtdif.c        |  175 +-
 fs/yaffs2/yaffs_mtdif.h        |   12 +-
 fs/yaffs2/yaffs_mtdif2.c       |  270 +-
 fs/yaffs2/yaffs_mtdif2.h       |   17 +-
 fs/yaffs2/yaffs_nameval.c      |  208 +
 fs/yaffs2/yaffs_nameval.h      |   28 +
 fs/yaffs2/yaffs_nand.c         |  150 +-
 fs/yaffs2/yaffs_nand.h         |   31 +-
 fs/yaffs2/yaffs_nandemul2k.h   |   26 +-
 fs/yaffs2/yaffs_nandif.c       |  252 ++
 fs/yaffs2/yaffs_nandif.h       |   65 +
 fs/yaffs2/yaffs_osglue.h       |   42 +
 fs/yaffs2/yaffs_packedtags1.c  |   63 +-
 fs/yaffs2/yaffs_packedtags1.h  |   24 +-
 fs/yaffs2/yaffs_packedtags2.c  |  268 +-
 fs/yaffs2/yaffs_packedtags2.h  |   35 +-
 fs/yaffs2/yaffs_qsort.c        |   58 +-
 fs/yaffs2/yaffs_qsort.h        |   23 -
 fs/yaffs2/yaffs_ramdisk.h      |   32 -
 fs/yaffs2/yaffs_summary.c      |  313 ++
 fs/yaffs2/yaffs_summary.h      |   37 +
 fs/yaffs2/yaffs_tagscompat.c   |  573 +--
 fs/yaffs2/yaffs_tagscompat.h   |   34 +-
 fs/yaffs2/yaffs_tagsvalidity.c |   31 -
 fs/yaffs2/yaffs_tagsvalidity.h |   24 -
 fs/yaffs2/yaffs_trace.h        |   57 +
 fs/yaffs2/yaffs_uboot_glue.c   |  464 ++
 fs/yaffs2/yaffs_verify.c       |  529 +++
 fs/yaffs2/yaffs_verify.h       |   43 +
 fs/yaffs2/yaffs_yaffs1.c       |  422 ++
 fs/yaffs2/yaffs_yaffs1.h       |   22 +
 fs/yaffs2/yaffs_yaffs2.c       | 1532 +++++++
 fs/yaffs2/yaffs_yaffs2.h       |   39 +
 fs/yaffs2/yaffscfg.c           |  420 --
 fs/yaffs2/yaffscfg.h           |   24 +-
 fs/yaffs2/yaffsfs.c            | 3446 +++++++++++----
 fs/yaffs2/yaffsfs.h            |  282 +-
 fs/yaffs2/yaffsinterface.h     |   21 -
 fs/yaffs2/ydirectenv.h         |   82 +-
 fs/yaffs2/yportenv.h           |  393 ++-
 67 files changed, 13596 insertions(+), 10113 deletions(-)
 delete mode 100644 fs/yaffs2/README-linux
 delete mode 100644 fs/yaffs2/devextras.h
 create mode 100644 fs/yaffs2/stdio.h
 create mode 100644 fs/yaffs2/stdlib.h
 create mode 100644 fs/yaffs2/string.h
 create mode 100644 fs/yaffs2/yaffs_allocator.c
 create mode 100644 fs/yaffs2/yaffs_allocator.h
 create mode 100644 fs/yaffs2/yaffs_attribs.c
 create mode 100644 fs/yaffs2/yaffs_attribs.h
 create mode 100644 fs/yaffs2/yaffs_bitmap.c
 create mode 100644 fs/yaffs2/yaffs_bitmap.h
 create mode 100644 fs/yaffs2/yaffs_error.c
 create mode 100644 fs/yaffs2/yaffs_flashif2.h
 create mode 100644 fs/yaffs2/yaffs_getblockinfo.h
 create mode 100644 fs/yaffs2/yaffs_hweight.c
 create mode 100644 fs/yaffs2/yaffs_hweight.h
 create mode 100644 fs/yaffs2/yaffs_list.h
 delete mode 100644 fs/yaffs2/yaffs_malloc.h
 create mode 100644 fs/yaffs2/yaffs_nameval.c
 create mode 100644 fs/yaffs2/yaffs_nameval.h
 create mode 100644 fs/yaffs2/yaffs_nandif.c
 create mode 100644 fs/yaffs2/yaffs_nandif.h
 create mode 100644 fs/yaffs2/yaffs_osglue.h
 delete mode 100644 fs/yaffs2/yaffs_qsort.h
 delete mode 100644 fs/yaffs2/yaffs_ramdisk.h
 create mode 100644 fs/yaffs2/yaffs_summary.c
 create mode 100644 fs/yaffs2/yaffs_summary.h
 delete mode 100644 fs/yaffs2/yaffs_tagsvalidity.c
 delete mode 100644 fs/yaffs2/yaffs_tagsvalidity.h
 create mode 100644 fs/yaffs2/yaffs_trace.h
 create mode 100644 fs/yaffs2/yaffs_uboot_glue.c
 create mode 100644 fs/yaffs2/yaffs_verify.c
 create mode 100644 fs/yaffs2/yaffs_verify.h
 create mode 100644 fs/yaffs2/yaffs_yaffs1.c
 create mode 100644 fs/yaffs2/yaffs_yaffs1.h
 create mode 100644 fs/yaffs2/yaffs_yaffs2.c
 create mode 100644 fs/yaffs2/yaffs_yaffs2.h
 delete mode 100644 fs/yaffs2/yaffscfg.c
 delete mode 100644 fs/yaffs2/yaffsinterface.h
common/cmd_yaffs2.c +248 -135
index 0e22d90..d43a9d4 100644
@@ -1,18 +1,37 @@
+/* Yaffs commands.
+ * Modified by Charles Manning by adding ydevconfig command.
+ *
+ * Use ydevconfig to configure a mountpoint before use.
+ * For example:
+ *  # Configure mountpt xxx using nand device 0 using blocks 100-500
+ *  ydevconfig xxx 0 100 500
+ *  # Mount it
+ *  ymount xxx
+ *  # yls, yrdm etc
+ *  yls -l xxx
+ *  yrdm xxx/boot-image 82000000
+ *  ...
+ */
+
 #include <common.h>
 
 #include <config.h>
 #include <command.h>
 
-#ifdef  YAFFS2_DEBUG
-#define PRINTF(fmt,args...) printf (fmt ,##args)
+#ifdef YAFFS2_DEBUG
+#define PRINTF(fmt, args...) printf(fmt, ##args)
 #else
-#define PRINTF(fmt,args...)
+#define PRINTF(fmt, args...) do { } while (0)
 #endif
 
+extern void cmd_yaffs_dev_ls(void);
+extern void cmd_yaffs_tracemask(unsigned set, unsigned mask);
+extern void cmd_yaffs_devconfig(char *mp, int flash_dev,
+				int start_block, int end_block);
 extern void cmd_yaffs_mount(char *mp);
 extern void cmd_yaffs_umount(char *mp);
 extern void cmd_yaffs_read_file(char *fn);
-extern void cmd_yaffs_write_file(char *fn,char bval,int sizeOfFile);
+extern void cmd_yaffs_write_file(char *fn, char bval, int sizeOfFile);
 extern void cmd_yaffs_ls(const char *mountpt, int longlist);
 extern void cmd_yaffs_mwrite_file(char *fn, char *addr, int size);
 extern void cmd_yaffs_mread_file(char *fn, char *addr);
@@ -21,193 +40,287 @@ extern void cmd_yaffs_rmdir(const char *dir);
 extern void cmd_yaffs_rm(const char *path);
 extern void cmd_yaffs_mv(const char *oldPath, const char *newPath);
 
-extern int yaffs_DumpDevStruct(const char *path);
+extern int yaffs_dump_dev(const char *path);
+
+/* ytrace - show/set yaffs trace mask */
+int do_ytrace(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+	if (argc > 1)
+		cmd_yaffs_tracemask(1, simple_strtol(argv[1], NULL, 16));
+	else
+		cmd_yaffs_tracemask(0, 0);
 
+	return 0;
+}
 
-int do_ymount (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+/* ydevls - lists yaffs mount points. */
+int do_ydevls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *mtpoint = argv[1];
-    cmd_yaffs_mount(mtpoint);
+	cmd_yaffs_dev_ls();
 
-    return(0);
+	return 0;
 }
 
-int do_yumount (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+/* ydevconfig mount_pt mtd_dev_num start_block end_block */
+int do_ydevconfig(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *mtpoint = argv[1];
-    cmd_yaffs_umount(mtpoint);
+	char *mtpoint;
+	int mtd_dev;
+	int start_block;
+	int end_block;
+
+	if (argc != 5) {
+		printf
+		    ("Bad arguments: ydevconfig mount_pt mtd_dev start_block end_block\n");
+		return -1;
+	}
+
+	mtpoint = argv[1];
+	mtd_dev = simple_strtol(argv[2], NULL, 16);
+	start_block = simple_strtol(argv[3], NULL, 16);
+	end_block = simple_strtol(argv[4], NULL, 16);
 
-    return(0);
+	cmd_yaffs_devconfig(mtpoint, mtd_dev, start_block, end_block);
+
+	return 0;
 }
 
-int do_yls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ymount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *dirname = argv[argc-1];
+	char *mtpoint;
+
+	if (argc != 2) {
+		printf("Bad arguments: ymount mount_pt\n");
+		return -1;
+	}
+
+	mtpoint = argv[1];
+	printf("Mounting yaffs2 mount point %s\n", mtpoint);
 
-    cmd_yaffs_ls(dirname, (argc>2)?1:0);
+	cmd_yaffs_mount(mtpoint);
 
-    return(0);
+	return 0;
 }
 
-int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_yumount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *filename = argv[1];
-    printf ("Reading file %s ", filename);
+	char *mtpoint;
 
-    cmd_yaffs_read_file(filename);
+	if (argc != 2) {
+		printf("Bad arguments: yumount mount_pt\n");
+		return -1;
+	}
 
-    printf ("done\n");
-    return(0);
+	mtpoint = argv[1];
+	printf("Unmounting yaffs2 mount point %s\n", mtpoint);
+	cmd_yaffs_umount(mtpoint);
+
+	return 0;
 }
 
-int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_yls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *filename = argv[1];
-    ulong value = simple_strtoul(argv[2], NULL, 16);
-    ulong numValues = simple_strtoul(argv[3], NULL, 16);
+	char *dirname;
+
+	if (argc < 2 || argc > 3 || (argc == 3 && strcmp(argv[1], "-l"))) {
+		printf("Bad arguments: yls [-l] dir\n");
+		return -1;
+	}
 
-    printf ("Writing value (%lx) %lx times to %s... ", value, numValues, filename);
+	dirname = argv[argc - 1];
 
-    cmd_yaffs_write_file(filename,value,numValues);
+	cmd_yaffs_ls(dirname, (argc > 2) ? 1 : 0);
 
-    printf ("done\n");
-    return(0);
+	return 0;
 }
 
-int do_yrdm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_yrd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *filename = argv[1];
-    ulong addr = simple_strtoul(argv[2], NULL, 16);
+	char *filename;
+
+	if (argc != 2) {
+		printf("Bad arguments: yrd file_name\n");
+		return -1;
+	}
 
-    cmd_yaffs_mread_file(filename, (char *)addr);
+	filename = argv[1];
 
-    return(0);
+	printf("Reading file %s ", filename);
+
+	cmd_yaffs_read_file(filename);
+
+	printf("done\n");
+	return 0;
 }
 
-int do_ywrm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ywr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *filename = argv[1];
-    ulong addr = simple_strtoul(argv[2], NULL, 16);
-    ulong size = simple_strtoul(argv[3], NULL, 16);
+	char *filename;
+	ulong value;
+	ulong numValues;
+
+	if (argc != 4) {
+		printf("Bad arguments: ywr file_name value n_values\n");
+		return -1;
+	}
 
-    cmd_yaffs_mwrite_file(filename, (char *)addr, size);
+	filename = argv[1];
+	value = simple_strtoul(argv[2], NULL, 16);
+	numValues = simple_strtoul(argv[3], NULL, 16);
 
-    return(0);
+	printf("Writing value (%lx) %lx times to %s... ", value, numValues,
+	       filename);
+
+	cmd_yaffs_write_file(filename, value, numValues);
+
+	printf("done\n");
+	return 0;
 }
 
-int do_ymkdir (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_yrdm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *dirname = argv[1];
+	char *filename;
+	ulong addr;
+
+	if (argc != 3) {
+		printf("Bad arguments: yrdm file_name addr\n");
+		return -1;
+	}
 
-    cmd_yaffs_mkdir(dirname);
+	filename = argv[1];
+	addr = simple_strtoul(argv[2], NULL, 16);
 
-    return(0);
+	cmd_yaffs_mread_file(filename, (char *)addr);
+
+	return 0;
 }
 
-int do_yrmdir (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ywrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *dirname = argv[1];
+	char *filename;
+	ulong addr;
+	ulong size;
+
+	if (argc != 4) {
+		printf("Bad arguments: ywrm file_name addr size\n");
+		return -1;
+	}
+
+	filename = argv[1];
+	addr = simple_strtoul(argv[2], NULL, 16);
+	size = simple_strtoul(argv[3], NULL, 16);
 
-    cmd_yaffs_rmdir(dirname);
+	cmd_yaffs_mwrite_file(filename, (char *)addr, size);
 
-    return(0);
+	return 0;
 }
 
-int do_yrm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ymkdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *path = argv[1];
+	char *dirname;
 
-    cmd_yaffs_rm(path);
+	if (argc != 2) {
+		printf("Bad arguments: ymkdir dir_name\n");
+		return -1;
+	}
 
-    return(0);
+	dirname = argv[1];
+	cmd_yaffs_mkdir(dirname);
+
+	return 0;
 }
 
-int do_ymv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_yrmdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *oldPath = argv[1];
-    char *newPath = argv[2];
+	char *dirname;
+
+	if (argc != 2) {
+		printf("Bad arguments: yrmdir dir_name\n");
+		return -1;
+	}
 
-    cmd_yaffs_mv(newPath, oldPath);
+	dirname = argv[1];
+	cmd_yaffs_rmdir(dirname);
 
-    return(0);
+	return 0;
 }
 
-int do_ydump (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_yrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-    char *dirname = argv[1];
-    if (yaffs_DumpDevStruct(dirname) != 0)
-	printf("yaffs_DumpDevStruct returning error when dumping path: , %s\n", dirname);
-    return 0;
+	char *name;
+
+	if (argc != 2) {
+		printf("Bad arguments: yrm name\n");
+		return -1;
+	}
+
+	name = argv[1];
+
+	cmd_yaffs_rm(name);
+
+	return 0;
+}
+
+int do_ymv(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+	char *oldPath;
+	char *newPath;
+
+	if (argc != 3) {
+		printf("Bad arguments: ymv old_path new_path\n");
+		return -1;
+	}
+
+	oldPath = argv[1];
+	newPath = argv[2];
+
+	cmd_yaffs_mv(newPath, oldPath);
+
+	return 0;
 }
 
-U_BOOT_CMD(
-    ymount, 3,  0,  do_ymount,
-    "mount yaffs",
-    ""
-);
-
-U_BOOT_CMD(
-    yumount, 3,  0,  do_yumount,
-    "unmount yaffs",
-    ""
-);
-
-U_BOOT_CMD(
-    yls,    4,  0,  do_yls,
-    "yaffs ls",
-    "[-l] name"
-);
-
-U_BOOT_CMD(
-    yrd,    2,  0,  do_yrd,
-    "read file from yaffs",
-    "filename"
-);
-
-U_BOOT_CMD(
-    ywr,    4,  0,  do_ywr,
-    "write file to yaffs",
-    "filename value num_vlues"
-);
-
-U_BOOT_CMD(
-    yrdm,   3,  0,  do_yrdm,
-    "read file to memory from yaffs",
-    "filename offset"
-);
-
-U_BOOT_CMD(
-    ywrm,   4,  0,  do_ywrm,
-    "write file from memory to yaffs",
-    "filename offset size"
-);
-
-U_BOOT_CMD(
-    ymkdir, 2,  0,  do_ymkdir,
-    "YAFFS mkdir",
-    "dirname"
-);
-
-U_BOOT_CMD(
-    yrmdir, 2,  0,  do_yrmdir,
-    "YAFFS rmdir",
-    "dirname"
-);
-
-U_BOOT_CMD(
-    yrm,    2,  0,  do_yrm,
-    "YAFFS rm",
-    "path"
-);
-
-U_BOOT_CMD(
-    ymv,    4,  0,  do_ymv,
-    "YAFFS mv",
-    "oldPath newPath"
-);
-
-U_BOOT_CMD(
-    ydump,  2,  0,  do_ydump,
-    "YAFFS device struct",
-    "dirname"
-);
+U_BOOT_CMD(ytrace, 2, 0, do_ytrace,
+	   "show/set yaffs trace mask",
+	   "ytrace [new_mask]  show/set yaffs trace mask");
+
+U_BOOT_CMD(ydevls, 1, 0, do_ydevls,
+	   "list yaffs mount points", "list yaffs mount points");
+
+U_BOOT_CMD(ydevconfig, 5, 0, do_ydevconfig,
+	   "configure yaffs mount point",
+	   "ydevconfig mtpoint mtd_id start_block end_block   configures a yaffs2 mount point");
+
+U_BOOT_CMD(ymount, 2, 0, do_ymount,
+	   "mount yaffs", "ymount mtpoint  mounts a yaffs2 mount point");
+
+U_BOOT_CMD(yumount, 2, 0, do_yumount,
+	   "unmount yaffs", "yunmount mtpoint  unmounts a yaffs2 mount point");
+
+U_BOOT_CMD(yls, 3, 0, do_yls, "yaffs ls", "yls [-l] dirname");
+
+U_BOOT_CMD(yrd, 2, 0, do_yrd,
+	   "read file from yaffs", "yrd path   read file from yaffs");
+
+U_BOOT_CMD(ywr, 4, 0, do_ywr,
+	   "write file to yaffs",
+	   "ywr filename value num_vlues   write values to yaffs file");
+
+U_BOOT_CMD(yrdm, 3, 0, do_yrdm,
+	   "read file to memory from yaffs",
+	   "yrdm filename offset    reads yaffs file into memory");
+
+U_BOOT_CMD(ywrm, 4, 0, do_ywrm,
+	   "write file from memory to yaffs",
+	   "ywrm filename offset size  writes memory to yaffs file");
+
+U_BOOT_CMD(ymkdir, 2, 0, do_ymkdir,
+	   "YAFFS mkdir", "ymkdir dir    create a yaffs directory");
+
+U_BOOT_CMD(yrmdir, 2, 0, do_yrmdir,
+	   "YAFFS rmdir", "yrmdir dirname   removes a yaffs directory");
+
+U_BOOT_CMD(yrm, 2, 0, do_yrm, "YAFFS rm", "yrm path   removes a yaffs file");
+
+U_BOOT_CMD(ymv, 4, 0, do_ymv,
+	   "YAFFS mv",
+	   "ymv old_path new_path   moves/rename files within a yaffs mount point");
fs/yaffs2/Makefile +23 -8
index 904d646..073088d 100644
@@ -16,28 +16,43 @@
 #
 # $Id: Makefile,v 1.15 2007/07/18 19:40:38 charles Exp $
 
-#EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
 include $(TOPDIR)/config.mk
 
 LIB = $(obj)libyaffs2.o
 
 COBJS-$(CONFIG_YAFFS2) := \
-	yaffscfg.o yaffs_ecc.o yaffsfs.o yaffs_guts.o yaffs_packedtags1.o \
-	yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o \
-	yaffs_nand.o yaffs_checkptrw.o yaffs_qsort.o yaffs_mtdif.o \
-	yaffs_mtdif2.o
+	yaffs_allocator.o yaffs_attribs.o yaffs_bitmap.o yaffs_uboot_glue.o\
+	yaffs_checkptrw.o yaffs_ecc.o yaffs_error.o \
+	yaffsfs.o yaffs_guts.o yaffs_hweight.o yaffs_nameval.o yaffs_nand.o\
+	yaffs_packedtags1.o yaffs_packedtags2.o yaffs_qsort.o \
+	yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \
+	yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o
 
 SRCS    := $(COBJS-y:.o=.c)
 OBJS    := $(addprefix $(obj),$(COBJS-y))
 
-# -DCONFIG_YAFFS_NO_YAFFS1
-CFLAGS +=    -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -DLINUX_VERSION_CODE=0x20622
+YCFLAGS =  -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM 
+YCFLAGS += -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE
+YCFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
+
+CFLAGS += $(YCFLAGS)
+CPPFLAGS +=  $(YCFLAGS)
 
 all:  $(LIB)
 
-$(LIB): $(obj).depend $(OBJS)
+$(obj)libyaffs2.a: $(obj).depend $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+$(obj)libyaffs2.o: $(obj).depend $(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
+.PHONY: clean distclean
+clean:
+	rm -f $(OBJS)
+
+distclean:  clean
+	rm -f $(LIB) core *.bak .depend
+
 #########################################################################
 
 # defines $(obj).depend target
fs/yaffs2/README-linux deleted +0 -201

201 lines not on this page · raw message

fs/yaffs2/devextras.h deleted +0 -275

275 lines not on this page · raw message

fs/yaffs2/stdio.h new file +1 -0
new file mode 100644
index 0000000..9f379d7
@@ -0,0 +1 @@
+/* Dummy header for u-boot */
fs/yaffs2/stdlib.h new file +1 -0
new file mode 100644
index 0000000..9f379d7
@@ -0,0 +1 @@
+/* Dummy header for u-boot */
fs/yaffs2/string.h new file +6 -0
new file mode 100644
index 0000000..136716a
@@ -0,0 +1,6 @@
+#include <linux/stddef.h>
+#include <linux/string.h>
+#include <linux/stat.h>
+#include <common.h>
+
+
fs/yaffs2/yaffs_allocator.c new file +357 -0

357 lines not on this page · raw message

fs/yaffs2/yaffs_allocator.h new file +30 -0
new file mode 100644
index 0000000..a8cc322
@@ -0,0 +1,30 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __YAFFS_ALLOCATOR_H__
+#define __YAFFS_ALLOCATOR_H__
+
+#include "yaffs_guts.h"
+
+void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev);
+void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev);
+
+struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev);
+void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn);
+
+struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev);
+void yaffs_free_raw_obj(struct yaffs_dev *dev, struct yaffs_obj *obj);
+
+#endif
fs/yaffs2/yaffs_attribs.c new file +153 -0

153 lines not on this page · raw message

fs/yaffs2/yaffs_attribs.h new file +28 -0
new file mode 100644
index 0000000..5b21b08
@@ -0,0 +1,28 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __YAFFS_ATTRIBS_H__
+#define __YAFFS_ATTRIBS_H__
+
+#include "yaffs_guts.h"
+
+void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh);
+void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj);
+void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev);
+void yaffs_load_current_time(struct yaffs_obj *obj, int do_a, int do_c);
+int yaffs_set_attribs(struct yaffs_obj *obj, struct iattr *attr);
+int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr);
+
+#endif
fs/yaffs2/yaffs_bitmap.c new file +97 -0

97 lines not on this page · raw message

fs/yaffs2/yaffs_bitmap.h new file +33 -0
new file mode 100644
index 0000000..e26b37d
@@ -0,0 +1,33 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+/*
+ * Chunk bitmap manipulations
+ */
+
+#ifndef __YAFFS_BITMAP_H__
+#define __YAFFS_BITMAP_H__
+
+#include "yaffs_guts.h"
+
+void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk);
+void yaffs_clear_chunk_bits(struct yaffs_dev *dev, int blk);
+void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk);
+void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk);
+int yaffs_check_chunk_bit(struct yaffs_dev *dev, int blk, int chunk);
+int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk);
+int yaffs_count_chunk_bits(struct yaffs_dev *dev, int blk);
+
+#endif
fs/yaffs2/yaffs_checkptrw.c +264 -261

666 lines not on this page · raw message

fs/yaffs2/yaffs_checkptrw.h +7 -8
index e59d151..cdbaba7 100644
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2007 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <[email protected]>
@@ -18,17 +18,16 @@
 
 #include "yaffs_guts.h"
 
-int yaffs_CheckpointOpen(yaffs_Device *dev, int forWriting);
+int yaffs2_checkpt_open(struct yaffs_dev *dev, int writing);
 
-int yaffs_CheckpointWrite(yaffs_Device *dev,const void *data, int nBytes);
+int yaffs2_checkpt_wr(struct yaffs_dev *dev, const void *data, int n_bytes);
 
-int yaffs_CheckpointRead(yaffs_Device *dev,void *data, int nBytes);
+int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes);
 
-int yaffs_GetCheckpointSum(yaffs_Device *dev, __u32 *sum);
+int yaffs2_get_checkpt_sum(struct yaffs_dev *dev, u32 * sum);
 
-int yaffs_CheckpointClose(yaffs_Device *dev);
-
-int yaffs_CheckpointInvalidateStream(yaffs_Device *dev);
+int yaffs_checkpt_close(struct yaffs_dev *dev);
 
+int yaffs2_checkpt_invalidate_stream(struct yaffs_dev *dev);
 
 #endif
fs/yaffs2/yaffs_ecc.c +48 -100

274 lines not on this page · raw message

fs/yaffs2/yaffs_ecc.h +23 -23

62 lines not on this page · raw message

fs/yaffs2/yaffs_error.c new file +58 -0

58 lines not on this page · raw message

fs/yaffs2/yaffs_flashif.h +14 -10
index 4e5157e..e6e8979 100644
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2007 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <[email protected]>
@@ -18,14 +18,18 @@
 
 
 #include "yaffs_guts.h"
-int yflash_EraseBlockInNAND(yaffs_Device *dev, int blockNumber);
-int yflash_WriteChunkToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_Spare *spare);
-int yflash_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, yaffs_ExtendedTags *tags);
-int yflash_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_Spare *spare);
-int yflash_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags);
-int yflash_EraseBlockInNAND(yaffs_Device *dev, int blockNumber);
-int yflash_InitialiseNAND(yaffs_Device *dev);
-int yflash_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
-int yflash_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber);
+int yflash_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber);
+int yflash_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk,
+			const u8 *data, const struct yaffs_spare *spare);
+int yflash_WriteChunkWithTagsToNAND(struct yaffs_dev *dev, int nand_chunk,
+			const u8 *data, const struct yaffs_ext_tags *tags);
+int yflash_ReadChunkFromNAND(struct yaffs_dev *dev, int nand_chunk,
+			u8 *data, struct yaffs_spare *spare);
+int yflash_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev, int nand_chunk,
+			u8 *data, struct yaffs_ext_tags *tags);
+int yflash_InitialiseNAND(struct yaffs_dev *dev);
+int yflash_MarkNANDBlockBad(struct yaffs_dev *dev, int block_no);
+int yflash_QueryNANDBlock(struct yaffs_dev *dev, int block_no,
+			enum yaffs_block_state *state, u32 *seq_number);
 
 #endif
fs/yaffs2/yaffs_flashif2.h new file +35 -0
new file mode 100644
index 0000000..cfdbde9
@@ -0,0 +1,35 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __YAFFS_FLASH2_H__
+#define __YAFFS_FLASH2_H__
+
+
+#include "yaffs_guts.h"
+int yflash2_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber);
+int yflash2_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk,
+			const u8 *data, const struct yaffs_spare *spare);
+int yflash2_WriteChunkWithTagsToNAND(struct yaffs_dev *dev, int nand_chunk,
+			const u8 *data, const struct yaffs_ext_tags *tags);
+int yflash2_ReadChunkFromNAND(struct yaffs_dev *dev, int nand_chunk,
+			u8 *data, struct yaffs_spare *spare);
+int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev, int nand_chunk,
+			u8 *data, struct yaffs_ext_tags *tags);
+int yflash2_InitialiseNAND(struct yaffs_dev *dev);
+int yflash2_MarkNANDBlockBad(struct yaffs_dev *dev, int block_no);
+int yflash2_QueryNANDBlock(struct yaffs_dev *dev, int block_no,
+			enum yaffs_block_state *state, u32 *seq_number);
+
+#endif
fs/yaffs2/yaffs_getblockinfo.h new file +35 -0
new file mode 100644
index 0000000..8fd0802
@@ -0,0 +1,35 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __YAFFS_GETBLOCKINFO_H__
+#define __YAFFS_GETBLOCKINFO_H__
+
+#include "yaffs_guts.h"
+#include "yaffs_trace.h"
+
+/* Function to manipulate block info */
+static inline struct yaffs_block_info *yaffs_get_block_info(struct yaffs_dev
+							      *dev, int blk)
+{
+	if (blk < dev->internal_start_block || blk > dev->internal_end_block) {
+		yaffs_trace(YAFFS_TRACE_ERROR,
+			"**>> yaffs: get_block_info block %d is not valid",
+			blk);
+		BUG();
+	}
+	return &dev->block_info[blk - dev->internal_start_block];
+}
+
+#endif
fs/yaffs2/yaffs_guts.c +3458 -5755

112 lines not on this page · raw message

fs/yaffs2/yaffs_guts.h +642 -577

1,219 lines not on this page · raw message

fs/yaffs2/yaffs_hweight.c new file +53 -0

53 lines not on this page · raw message

fs/yaffs2/yaffs_hweight.h new file +24 -0
new file mode 100644
index 0000000..3f7c6c3

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_list.h new file +126 -0

126 lines not on this page · raw message

fs/yaffs2/yaffs_malloc.h deleted +0 -25
deleted file mode 100644
index 3ed6175..0000000

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_mtdif.c +47 -128

175 lines not on this page · raw message

fs/yaffs2/yaffs_mtdif.h +6 -6
index 317600c..1a12582 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_mtdif2.c +135 -135

270 lines not on this page · raw message

fs/yaffs2/yaffs_mtdif2.h +9 -8
index b67ba52..62be173 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_nameval.c new file +208 -0

208 lines not on this page · raw message

fs/yaffs2/yaffs_nameval.h new file +28 -0
new file mode 100644
index 0000000..951e64f

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_nand.c +68 -82

150 lines not on this page · raw message

fs/yaffs2/yaffs_nand.h +13 -18
index f3bedcf..7134662 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_nandemul2k.h +13 -13
index cd2e96f..cb0c4e6 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_nandif.c new file +252 -0

252 lines not on this page · raw message

fs/yaffs2/yaffs_nandif.h new file +65 -0

65 lines not on this page · raw message

fs/yaffs2/yaffs_osglue.h new file +42 -0

42 lines not on this page · raw message

fs/yaffs2/yaffs_packedtags1.c +32 -31

63 lines not on this page · raw message

fs/yaffs2/yaffs_packedtags1.h +13 -11
index 776c5c2..b80f0a5 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_packedtags2.c +140 -128

268 lines not on this page · raw message

fs/yaffs2/yaffs_packedtags2.h +22 -13
index c2242ff..675e719 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_qsort.c +29 -29

58 lines not on this page · raw message

fs/yaffs2/yaffs_qsort.h deleted +0 -23
deleted file mode 100644
index 19083da..0000000

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_ramdisk.h deleted +0 -32
deleted file mode 100644
index 3cff8be..0000000

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_summary.c new file +313 -0

313 lines not on this page · raw message

fs/yaffs2/yaffs_summary.h new file +37 -0
new file mode 100644
index 0000000..be141d0

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_tagscompat.c +224 -349

573 lines not on this page · raw message

fs/yaffs2/yaffs_tagscompat.h +15 -19
index a61e3ba..b3c6655 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_tagsvalidity.c deleted +0 -31
deleted file mode 100644
index f588d3a..0000000

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_tagsvalidity.h deleted +0 -24
deleted file mode 100644
index 2fd0c24..0000000

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_trace.h new file +57 -0

57 lines not on this page · raw message

fs/yaffs2/yaffs_uboot_glue.c new file +464 -0

464 lines not on this page · raw message

fs/yaffs2/yaffs_verify.c new file +529 -0

529 lines not on this page · raw message

fs/yaffs2/yaffs_verify.h new file +43 -0

43 lines not on this page · raw message

fs/yaffs2/yaffs_yaffs1.c new file +422 -0

422 lines not on this page · raw message

fs/yaffs2/yaffs_yaffs1.h new file +22 -0
new file mode 100644
index 0000000..97e2fdd

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffs_yaffs2.c new file +1532 -0

1,532 lines not on this page · raw message

fs/yaffs2/yaffs_yaffs2.h new file +39 -0
new file mode 100644
index 0000000..2363bfd

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffscfg.c deleted +0 -420

420 lines not on this page · raw message

fs/yaffs2/yaffscfg.h +9 -15
index 3503dc8..1ffaae9 100644

Lines of this file are not shown. View the raw message.

fs/yaffs2/yaffsfs.c +2577 -869

3,446 lines not on this page · raw message

fs/yaffs2/yaffsfs.h +130 -152

282 lines not on this page · raw message

fs/yaffs2/yaffsinterface.h deleted +0 -21
deleted file mode 100644
index 810837a..0000000

Lines of this file are not shown. View the raw message.

fs/yaffs2/ydirectenv.h +43 -39

82 lines not on this page · raw message

fs/yaffs2/yportenv.h +254 -139

393 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.0.4

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 1/1 u-boot: Update yaffs2 file system

Dear Charles Manning,

Quoted 105 lines · In message <[email protected]> you wrote:

This patch updates the yaffs2 in u-boot to correspond to
git://www.aleph1.co.uk/yaffs2
commit id 9ee5d0643e559568dbe62215f76e0a7bd5a63d93

---
 common/cmd_yaffs2.c            |  383 ++-
 fs/yaffs2/Makefile             |   31 +-
 fs/yaffs2/README-linux         |  201 -
 fs/yaffs2/devextras.h          |  275 --
 fs/yaffs2/stdio.h              |    1 +
 fs/yaffs2/stdlib.h             |    1 +
 fs/yaffs2/string.h             |    6 +
 fs/yaffs2/yaffs_allocator.c    |  357 ++
 fs/yaffs2/yaffs_allocator.h    |   30 +
 fs/yaffs2/yaffs_attribs.c      |  153 +
 fs/yaffs2/yaffs_attribs.h      |   28 +
 fs/yaffs2/yaffs_bitmap.c       |   97 +
 fs/yaffs2/yaffs_bitmap.h       |   33 +
 fs/yaffs2/yaffs_checkptrw.c    |  525 ++--
 fs/yaffs2/yaffs_checkptrw.h    |   15 +-
 fs/yaffs2/yaffs_ecc.c          |  148 +-
 fs/yaffs2/yaffs_ecc.h          |   46 +-
 fs/yaffs2/yaffs_error.c        |   58 +
 fs/yaffs2/yaffs_flashif.h      |   24 +-
 fs/yaffs2/yaffs_flashif2.h     |   35 +
 fs/yaffs2/yaffs_getblockinfo.h |   35 +
 fs/yaffs2/yaffs_guts.c         | 9213 +++++++++++++++-------------------------
 fs/yaffs2/yaffs_guts.h         | 1219 +++---
 fs/yaffs2/yaffs_hweight.c      |   53 +
 fs/yaffs2/yaffs_hweight.h      |   24 +
 fs/yaffs2/yaffs_list.h         |  126 +
 fs/yaffs2/yaffs_malloc.h       |   25 -
 fs/yaffs2/yaffs_mtdif.c        |  175 +-
 fs/yaffs2/yaffs_mtdif.h        |   12 +-
 fs/yaffs2/yaffs_mtdif2.c       |  270 +-
 fs/yaffs2/yaffs_mtdif2.h       |   17 +-
 fs/yaffs2/yaffs_nameval.c      |  208 +
 fs/yaffs2/yaffs_nameval.h      |   28 +
 fs/yaffs2/yaffs_nand.c         |  150 +-
 fs/yaffs2/yaffs_nand.h         |   31 +-
 fs/yaffs2/yaffs_nandemul2k.h   |   26 +-
 fs/yaffs2/yaffs_nandif.c       |  252 ++
 fs/yaffs2/yaffs_nandif.h       |   65 +
 fs/yaffs2/yaffs_osglue.h       |   42 +
 fs/yaffs2/yaffs_packedtags1.c  |   63 +-
 fs/yaffs2/yaffs_packedtags1.h  |   24 +-
 fs/yaffs2/yaffs_packedtags2.c  |  268 +-
 fs/yaffs2/yaffs_packedtags2.h  |   35 +-
 fs/yaffs2/yaffs_qsort.c        |   58 +-
 fs/yaffs2/yaffs_qsort.h        |   23 -
 fs/yaffs2/yaffs_ramdisk.h      |   32 -
 fs/yaffs2/yaffs_summary.c      |  313 ++
 fs/yaffs2/yaffs_summary.h      |   37 +
 fs/yaffs2/yaffs_tagscompat.c   |  573 +--
 fs/yaffs2/yaffs_tagscompat.h   |   34 +-
 fs/yaffs2/yaffs_tagsvalidity.c |   31 -
 fs/yaffs2/yaffs_tagsvalidity.h |   24 -
 fs/yaffs2/yaffs_trace.h        |   57 +
 fs/yaffs2/yaffs_uboot_glue.c   |  464 ++
 fs/yaffs2/yaffs_verify.c       |  529 +++
 fs/yaffs2/yaffs_verify.h       |   43 +
 fs/yaffs2/yaffs_yaffs1.c       |  422 ++
 fs/yaffs2/yaffs_yaffs1.h       |   22 +
 fs/yaffs2/yaffs_yaffs2.c       | 1532 +++++++
 fs/yaffs2/yaffs_yaffs2.h       |   39 +
 fs/yaffs2/yaffscfg.c           |  420 --
 fs/yaffs2/yaffscfg.h           |   24 +-
 fs/yaffs2/yaffsfs.c            | 3446 +++++++++++----
 fs/yaffs2/yaffsfs.h            |  282 +-
 fs/yaffs2/yaffsinterface.h     |   21 -
 fs/yaffs2/ydirectenv.h         |   82 +-
 fs/yaffs2/yportenv.h           |  393 ++-
 67 files changed, 13596 insertions(+), 10113 deletions(-)
 delete mode 100644 fs/yaffs2/README-linux
 delete mode 100644 fs/yaffs2/devextras.h
 create mode 100644 fs/yaffs2/stdio.h
 create mode 100644 fs/yaffs2/stdlib.h
 create mode 100644 fs/yaffs2/string.h
 create mode 100644 fs/yaffs2/yaffs_allocator.c
 create mode 100644 fs/yaffs2/yaffs_allocator.h
 create mode 100644 fs/yaffs2/yaffs_attribs.c
 create mode 100644 fs/yaffs2/yaffs_attribs.h
 create mode 100644 fs/yaffs2/yaffs_bitmap.c
 create mode 100644 fs/yaffs2/yaffs_bitmap.h
 create mode 100644 fs/yaffs2/yaffs_error.c
 create mode 100644 fs/yaffs2/yaffs_flashif2.h
 create mode 100644 fs/yaffs2/yaffs_getblockinfo.h
 create mode 100644 fs/yaffs2/yaffs_hweight.c
 create mode 100644 fs/yaffs2/yaffs_hweight.h
 create mode 100644 fs/yaffs2/yaffs_list.h
 delete mode 100644 fs/yaffs2/yaffs_malloc.h
 create mode 100644 fs/yaffs2/yaffs_nameval.c
 create mode 100644 fs/yaffs2/yaffs_nameval.h
 create mode 100644 fs/yaffs2/yaffs_nandif.c
 create mode 100644 fs/yaffs2/yaffs_nandif.h
 create mode 100644 fs/yaffs2/yaffs_osglue.h
 delete mode 100644 fs/yaffs2/yaffs_qsort.h
 delete mode 100644 fs/yaffs2/yaffs_ramdisk.h
 create mode 100644 fs/yaffs2/yaffs_summary.c
 create mode 100644 fs/yaffs2/yaffs_summary.h
 delete mode 100644 fs/yaffs2/yaffs_tagsvalidity.c
 delete mode 100644 fs/yaffs2/yaffs_tagsvalidity.h
 create mode 100644 fs/yaffs2/yaffs_trace.h
 create mode 100644 fs/yaffs2/yaffs_uboot_glue.c
Quoted 8 lines
 create mode 100644 fs/yaffs2/yaffs_verify.c
 create mode 100644 fs/yaffs2/yaffs_verify.h
 create mode 100644 fs/yaffs2/yaffs_yaffs1.c
 create mode 100644 fs/yaffs2/yaffs_yaffs1.h
 create mode 100644 fs/yaffs2/yaffs_yaffs2.c
 create mode 100644 fs/yaffs2/yaffs_yaffs2.h
 delete mode 100644 fs/yaffs2/yaffscfg.c
 delete mode 100644 fs/yaffs2/yaffsinterface.h

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"One day," said a dull voice from down below, "I'm going to  be  back
in  form again and you're going to be very sorry you said that. For a
very long time. I might even go so far as to make even more Time just
for you to be sorry in."              - Terry Pratchett, _Small Gods_
#2 lore raw

PATCH 1/1 u-boot: Update yaffs2 file system

Dear Charles,

Quoted 5 lines · In message <[email protected]> I wrote:
Quoted 3 lines · In message <[email protected]> you wrote:

This patch updates the yaffs2 in u-boot to correspond to
git://www.aleph1.co.uk/yaffs2
commit id 9ee5d0643e559568dbe62215f76e0a7bd5a63d93

...

Quoted 1 line

Applied, thanks.

Unfortunately, this code causes a TON of errors and warnings, like these:

In file included from yportenv.h:80:0,

                 from yaffs_guts.h:19,
                 from yaffs_allocator.h:19,
                 from yaffs_allocator.c:14:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default] /work/wd/u-boot/include/common.h:160:0: note: this is the location of the previous definition ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the previous definition ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the previous definition

In file included from yportenv.h:80:0,

                 from yaffscfg.h:26,
                 from yaffs_uboot_glue.c:26:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default] /work/wd/u-boot/include/common.h:160:0: note: this is the location of the previous definition ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the previous definition ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the previous definition ydirectenv.h:66:0: warning: "kmalloc" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:20:0: note: this is the location of the previous definition ydirectenv.h:67:0: warning: "kfree" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:23:0: note: this is the location of the previous definition ydirectenv.h:68:0: warning: "vmalloc" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:22:0: note: this is the location of the previous definition ydirectenv.h:69:0: warning: "vfree" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:24:0: note: this is the location of the previous definition

In file included from yportenv.h:80:0,

                 from yaffs_guts.c:14:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default] /work/wd/u-boot/include/common.h:160:0: note: this is the location of the previous definition ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the previous definition ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the previous definition yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used [-Wunused-but-set-variable] yaffs_guts.c:3179:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used [-Wunused-but-set-variable]

and so on and on.

Please provide a fix, ideally soon, as this breaking builds! Thanks!

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You can't have everything... where would you put it?  - Steven Wright
#3 lore raw

PATCH 1/1 u-boot: Update yaffs2 file system

Dear Charles,

Quoted 66 lines · In message <[email protected]> I wrote:

Dear Charles,

Quoted 5 lines · In message <[email protected]> I wrote:
Quoted 3 lines · In message <[email protected]> you wrote:

This patch updates the yaffs2 in u-boot to correspond to
git://www.aleph1.co.uk/yaffs2
commit id 9ee5d0643e559568dbe62215f76e0a7bd5a63d93

...

Quoted 1 line

Applied, thanks.

Unfortunately, this code causes a TON of errors and warnings, like these:

In file included from yportenv.h:80:0,

                 from yaffs_guts.h:19,
                 from yaffs_allocator.h:19,
                 from yaffs_allocator.c:14:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default] /work/wd/u-boot/include/common.h:160:0: note: this is the location of the previous definition ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the previous definition ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the previous definition

In file included from yportenv.h:80:0,

                 from yaffscfg.h:26,
                 from yaffs_uboot_glue.c:26:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default] /work/wd/u-boot/include/common.h:160:0: note: this is the location of the previous definition ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the previous definition ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the previous definition ydirectenv.h:66:0: warning: "kmalloc" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:20:0: note: this is the location of the previous definition ydirectenv.h:67:0: warning: "kfree" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:23:0: note: this is the location of the previous definition ydirectenv.h:68:0: warning: "vmalloc" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:22:0: note: this is the location of the previous definition ydirectenv.h:69:0: warning: "vfree" redefined [enabled by default] /work/wd/u-boot/include/linux/compat.h:24:0: note: this is the location of the previous definition

In file included from yportenv.h:80:0,

                 from yaffs_guts.c:14:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default] /work/wd/u-boot/include/common.h:160:0: note: this is the location of the previous definition ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the previous definition ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default] /work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the previous definition yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used [-Wunused-but-set-variable] yaffs_guts.c:3179:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used [-Wunused-but-set-variable]

Quoted 4 lines

and so on and on.

Please provide a fix, ideally soon, as this breaking builds! Thanks!

Ping...

This needs to be fixed, or we will have to revert this commit.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There is no statute of limitations on stupidity."
- Randomly produced by a computer program called Markov3.