Index: u-boot/common/cmd_nand.c =================================================================== --- u-boot.orig/common/cmd_nand.c +++ u-boot/common/cmd_nand.c @@ -378,6 +378,21 @@ opts.quiet = quiet; ret = nand_write_opts(nand, &opts); } + } else if (!read && s != NULL && + (!strcmp(s, ".yaffs") || !strcmp(s, ".yaffs1"))) { + nand_write_options_t opts; + memset(&opts, 0, sizeof(opts)); + opts.buffer = (u_char*) addr; + opts.length = size; + opts.offset = off; + opts.pad = 0; + opts.blockalign = 1; + opts.quiet = quiet; + opts.writeoob = 1; + opts.autoplace = 1; + if (s[6] == '1') + opts.forceyaffs = 1; + ret = nand_write_opts(nand, &opts); } else if (s != NULL && !strcmp(s, ".oob")) { /* read out-of-band data */ if (read) @@ -524,6 +539,8 @@ "nand read[.jffs2] - addr off|partition size\n" "nand write[.jffs2] - addr off|partiton size - read/write `size' bytes starting\n" " at offset `off' to/from memory address `addr'\n" + "nand write[.yaffs[1]] - addr off|partiton size - read/write `size' byte yaffs image\n" + " starting at offset `off' to/from memory address `addr' (.yaffs1 for 512+16 NAND)\n" "nand erase [clean] [off size] - erase `size' bytes from\n" " offset `off' (entire device if not specified)\n" "nand bad - show bad blocks\n"