r3091 - trunk/src/target/u-boot/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Sat Oct 6 01:28:34 CEST 2007
Author: laforge
Date: 2007-10-06 01:28:33 +0200 (Sat, 06 Oct 2007)
New Revision: 3091
Added:
trunk/src/target/u-boot/patches/uboot-nand_write_yaffs.patch
Modified:
trunk/src/target/u-boot/patches/series
Log:
add an (untested) patch to correctly write yaffs2 oob data
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2007-10-05 11:57:08 UTC (rev 3090)
+++ trunk/src/target/u-boot/patches/series 2007-10-05 23:28:33 UTC (rev 3091)
@@ -77,3 +77,4 @@
unbusy-i2c.patch
usbtty-irq-racecondition-fix.patch
neo1973-gsmver.patch
+uboot-nand_write_yaffs.patch
Added: trunk/src/target/u-boot/patches/uboot-nand_write_yaffs.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-nand_write_yaffs.patch 2007-10-05 11:57:08 UTC (rev 3090)
+++ trunk/src/target/u-boot/patches/uboot-nand_write_yaffs.patch 2007-10-05 23:28:33 UTC (rev 3091)
@@ -0,0 +1,35 @@
+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"
More information about the commitlog
mailing list