|
|
Mozy Online Backup: 2GB Free. Automatic. Secure.
Subject: Re: mkyaffs utility for yaffs2 large block NAND flash - msg#00011
List: linux.file-systems.yaffs
> On Monday 06 August 2007 21:17, Siddharth Choudhuri wrote:
> > I tried using the nandwrite (mkyaffs2image -> erase flash ->
> > nandwrite -a -o /dev/mtdN yaffs2.img), but every time I
> > mount/umount, I get a series of "gc prioritised messages" for
> > every block that the image was written to. However, if I erase
> > the flash and copy the files, the same messages does not
> > appear. Are these messages a notification or error ?
>
> I don't see how nandwrite can be formating the oob data correctly.
> I've made a small change to the oob scatter loop, see if this
> does anything for you. Apply the patch to mtd-utils-1.0.0.
>
> -imcd
>
> diff -uar mtd-utils-1.0.0/nandwrite.c mtd-utils-1.0.0-x/nandwrite.c
> --- mtd-utils-1.0.0/nandwrite.c 2006-04-30 16:59:15.000000000 -0400
> +++ mtd-utils-1.0.0-x/nandwrite.c 2007-08-07 10:03:04.000000000 -0400
> ...
> ...
>
Thanks for the patch. It did not work for me though. My current solution is to
make a standard
ext2 fs image, mount it in loopback mode and copy the image to a mounted
NAND-yaffs2 directory:
1. eraseall /dev/mtdN
2. mount -t yaffs2 /dev/mtdblockN /dest/dir
3. mount -t ext2 -o loopback ext2_image /source/dir
4. cp source to dest
This is similar to what Brian suggested.
thanks,
-siddharth
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: mkyaffs utility for yaffs2 large block NAND flash
Siddharth,
On Monday 06 August 2007 21:17, Siddharth Choudhuri wrote:
> I tried using the nandwrite (mkyaffs2image -> erase flash ->
> nandwrite -a -o /dev/mtdN yaffs2.img), but every time I
> mount/umount, I get a series of "gc prioritised messages" for
> every block that the image was written to. However, if I erase
> the flash and copy the files, the same messages does not
> appear. Are these messages a notification or error ?
I don't see how nandwrite can be formating the oob data correctly.
I've made a small change to the oob scatter loop, see if this
does anything for you. Apply the patch to mtd-utils-1.0.0.
-imcd
diff -uar mtd-utils-1.0.0/nandwrite.c mtd-utils-1.0.0-x/nandwrite.c
--- mtd-utils-1.0.0/nandwrite.c 2006-04-30 16:59:15.000000000 -0400
+++ mtd-utils-1.0.0-x/nandwrite.c 2007-08-07 10:03:04.000000000 -0400
@@ -392,7 +392,7 @@
goto closeall;
}
if (!noecc) {
- int i, start, len;
+ int i, start, len, off = 0;
/*
* We use autoplacement and have the oobinfo
with the autoplacement
* information from the kernel available
@@ -402,12 +402,12 @@
*/
if (!oobinfochanged && (old_oobinfo.useecc ==
MTD_NANDECC_AUTOPLACE)) {
for (i = 0;old_oobinfo.oobfree[i][1];
i++) {
- /* Set the reserved bytes to
0xff */
start =
old_oobinfo.oobfree[i][0];
len = old_oobinfo.oobfree[i][1];
memcpy(oobbuf + start,
- oobreadbuf + start,
+ oobreadbuf + off,
len);
+ off += len;
}
} else {
/* Set at least the ecc byte positions
to 0xff */
Next Message by Date:
click to view message preview
yaffsVersion meaning
Hi,
If yaffsVersion is never set to 2 (ie. always set to 1), does that mean
that a partition that was written with ancient yaffs1 code on a 2.4
kernel will be able to be read/written using modern yaffs2 code and a 2.6.22
kernel with a 512/16 part?
Thanks for any help or info in advance.
Rick Bronson
Previous Message by Thread:
click to view message preview
Re: mkyaffs utility for yaffs2 large block NAND flash
Siddharth,
On Monday 06 August 2007 21:17, Siddharth Choudhuri wrote:
> I tried using the nandwrite (mkyaffs2image -> erase flash ->
> nandwrite -a -o /dev/mtdN yaffs2.img), but every time I
> mount/umount, I get a series of "gc prioritised messages" for
> every block that the image was written to. However, if I erase
> the flash and copy the files, the same messages does not
> appear. Are these messages a notification or error ?
I don't see how nandwrite can be formating the oob data correctly.
I've made a small change to the oob scatter loop, see if this
does anything for you. Apply the patch to mtd-utils-1.0.0.
-imcd
diff -uar mtd-utils-1.0.0/nandwrite.c mtd-utils-1.0.0-x/nandwrite.c
--- mtd-utils-1.0.0/nandwrite.c 2006-04-30 16:59:15.000000000 -0400
+++ mtd-utils-1.0.0-x/nandwrite.c 2007-08-07 10:03:04.000000000 -0400
@@ -392,7 +392,7 @@
goto closeall;
}
if (!noecc) {
- int i, start, len;
+ int i, start, len, off = 0;
/*
* We use autoplacement and have the oobinfo
with the autoplacement
* information from the kernel available
@@ -402,12 +402,12 @@
*/
if (!oobinfochanged && (old_oobinfo.useecc ==
MTD_NANDECC_AUTOPLACE)) {
for (i = 0;old_oobinfo.oobfree[i][1];
i++) {
- /* Set the reserved bytes to
0xff */
start =
old_oobinfo.oobfree[i][0];
len = old_oobinfo.oobfree[i][1];
memcpy(oobbuf + start,
- oobreadbuf + start,
+ oobreadbuf + off,
len);
+ off += len;
}
} else {
/* Set at least the ecc byte positions
to 0xff */
Next Message by Thread:
click to view message preview
yaffsVersion meaning
Hi,
If yaffsVersion is never set to 2 (ie. always set to 1), does that mean
that a partition that was written with ancient yaffs1 code on a 2.4
kernel will be able to be read/written using modern yaffs2 code and a 2.6.22
kernel with a 512/16 part?
Thanks for any help or info in advance.
Rick Bronson
|
|