DOC2000 flash: Do I miss something?
Ravi Vasarla
ravi.vasarla at sasken.com
Tue Mar 24 12:03:00 EDT 2009
Hi,
I guess, I'v overlooked the ioctl in given option. Anyway nice to hear that your problem seems to resolve.
Regards,
Ravi
________________________________________
From: Juergen Beisert [jbe at pengutronix.de]
Sent: Tuesday, March 24, 2009 19:30
To: linux-mtd at lists.infradead.org
Cc: Ravi Vasarla
Subject: Re: DOC2000 flash: Do I miss something?
Hi,
On Dienstag, 24. März 2009, Ravi Vasarla wrote:
> Check the MTD drivers write size, usually pagesize is same as the
> writesize. In nandwrite.c the ioctl will fired only when passed the option
> like -a (autoplace) -n (noecc) passed. I guess it should not give below
> error with -j option. Check with the latest version of mtd-util of
> nandwrite.c file
$ nandwrite -j /dev/mtd1 /root.jffs2 (from ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.2.0.tar.bz2)
fails in this block (from nandwrite.c):
[...]
/*
* force oob layout for jffs2 or yaffs ?
* Legacy support
*/
if (forcejffs2 || forceyaffs) {
struct nand_oobinfo *oobsel = forcejffs2 ? &jffs2_oobinfo : &yaffs_oobinfo;
if (autoplace) {
fprintf(stderr, "Autoplacement is not possible for legacy -j/-y options\n");
goto restoreoob;
}
if ((old_oobinfo.useecc == MTD_NANDECC_AUTOPLACE) && !forcelegacy) {
fprintf(stderr, "Use -f option to enforce legacy placement on autoplacement enabled mtd device\n");
goto restoreoob;
}
if (meminfo.oobsize == 8) {
if (forceyaffs) {
fprintf (stderr, "YAFSS cannot operate on 256 Byte page size");
goto restoreoob;
}
/* Adjust number of ecc bytes */
jffs2_oobinfo.eccbytes = 3;
}
if (ioctl (fd, MEMSETOOBSEL, oobsel) != 0) { <----- this one fails
perror ("MEMSETOOBSEL");
goto restoreoob;
}
}
[...]
Hmm, "Legacy support" sounds more like "do not use in recent implementations
any more".
BTW: Simply erasing, mounting, untar my rootfilesystem into the DOC works without these
CLEANMARKER and ECC error messages.
Regards,
Juergen
SASKEN BUSINESS DISCLAIMER
-------------------------
This message may contain confidential, proprietary or legally privileged information. In
case you are not the original intended Recipient of the message, you must not, directly or
indirectly, use, Disclose, distribute, print, or copy any part of this message and you are
requested to delete it and inform the sender. Any views expressed in this message are
those of the individual sender unless otherwise stated. Nothing contained in this message
shall be construed as an offer or acceptance of any offer by Sasken Communication
Technologies Limited ("Sasken") unless sent with that express intent and with due
authority of Sasken. Sasken has taken enough precautions to prevent the spread of
viruses. However the company accepts no liability for any damage caused by any virus
transmitted by this email
More information about the linux-mtd
mailing list