From: Dan Brown <dan_brown@ieee.org>
To: "Joseph M Dupre (AVAB Inc.)" <dupre@avab.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: docboot: nandwrite: Input file is not page aligned
Date: Tue, 11 Oct 2005 14:02:11 -0400 [thread overview]
Message-ID: <434BFE23.4060701@ieee.org> (raw)
In-Reply-To: <434B98B0.776.50BEDB@localhost>
Joseph M Dupre (AVAB Inc.) wrote:
>3 bootstub sectors, 10 real-mode sectors, 2420 kernel sectors, 1737
>initrd sectors
>
>
Seems reasonable...
>The generated doc_spl is 2201760 bytes.
>
>
Also reasonable. Each page is 512 data + 16 OOB
2201760 = 4170 * (512 + 16)
4170 = 3 + 10 + 2420 + 1737
>I am using the uClibc "Buildroot" toolchain. Dev machine is i686 and
>target is i486 with a DOC 2000 (MD2202-D128)
>
>Originally I was using the MTD utils generated by Buildroot to erase
>and load the DOC, but they were using mtd source from Debian's
>archive dated 22/1/05. I built the current versions of the MTD utils
>but have the same error.
>
>
>
Well, I guess the next step is to examine the code in nandwrite carefully. What it does is query the device (in your case /dev/mtd1) to find out the size of the data (should be 512) and oob (should be 16) portions of a page. It also queries the size of the file to be written, and verifies that the filesize is an integer multiple of the pagesize. We can get at much of the same info using mtd_debug:
./mtd_debug info /dev/mtd1
Could you send me the output from that? On my DOC device it says (among other things):
mtd.erasesize = 16384 (16K)
mtd.oobblock = 512
mtd.oobsize = 16
If you get the same result, then we're in really weird territory, and I'd start to wonder if the mtd tools just don't build (or run) properly under uClibc. Is there any chance you can use a standard glibc environment to doublecheck?
-Dan
next prev parent reply other threads:[~2005-10-11 18:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 0:04 docboot: nandwrite: Input file is not page aligned Joseph M Dupre (AVAB Inc.)
2005-10-11 13:42 ` Dan Brown
2005-10-11 17:49 ` Joseph M Dupre (AVAB Inc.)
2005-10-11 18:02 ` Dan Brown [this message]
2005-10-11 21:44 ` Joseph M Dupre (AVAB Inc.)
2005-10-13 16:44 ` Joseph M Dupre (AVAB Inc.)
2005-10-21 17:45 ` Joseph M Dupre (AVAB Inc.)
2005-10-24 13:15 ` Dan Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=434BFE23.4060701@ieee.org \
--to=dan_brown@ieee.org \
--cc=dupre@avab.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox