From: "Ian" <Relativity@HumanHeuristic.com>
To: "Nicolas Pitre" <nico@cam.org>
Cc: mtd@infradead.org, linuxbios@lanl.gov
Subject: Re: Problems with r/w on mtdblock0
Date: Wed, 6 Dec 2000 12:28:19 +1000 [thread overview]
Message-ID: <200012060228.MAA20125@singularity.tronunltd.com> (raw)
Well, that's how this started;
> bash# dd if=/dev/zero of=/dev/mtdblock0 bs=512 count=1
> end_request: I/O error, dev 1f:00 (mtdblock), sector 0
> dd: /dev/mtdblock0: Input/output error
> 1+0 records in
> 0+0 records out
>
> bash# /bin/dd if=/dev/mtdblock0 of=/dev/null bs=512 count=1
> end_request: I/O error, dev 1f:00 (mtdblock), sector 0
> /bin/dd: /dev/mtdblock0: Input/output error
> 0+0 records in
> 0+0 records out
.. and Ollie said ...
> The /dev/mtdblockN device the the "block device" node for MTD devices.
> In the DoC case, it can only read/write data in 8KB block (the erase size).
> You can not read/write 512B on itm it will get "cached" by the driver. If
> you are playing with the IPL stuff, WRITE TO /dev/mtd0.
... which then started a series of questions about whether or not its being cached
and I'm just rebooting too soon, if that's possible. *BUT* .. as above .. I'm getting
errors to that device (that I didn't used to).
See my next message (I'm currently writing) re access level via /dev/mtd0 ...
.. but then all of this thread is irrelevant (to me) if I can get my BIOS warez onto
the chip at the right location (which it appears the doc_loadbios has done), but
I still don't get my BIOS app touched ... so something still isn't sitting right ...
I'm doing testing at the moment ... there *shouldn't* be a driver error ... I'm
stickin' with the Wookie defence ... ;)
> However using /dev/mtdblock0 should produce the same result as if you wrote
> to a disk partition or a file. The latest MTD block interface always erase
> the flash region it is going to write to. Even for large erase sectors the
> code is backing the entire sector, patching the data to write into it and
> eventually rewriting the whole sector back.
>
> So doing
>
> dd if=some_file of=/dev/mtdblock0 bs=512 count=1
>
> or even
>
> cp foobar.fs /dev/mtdblock1
>
> should just work. If it doesn't then there is a bug. It actually works
> just fine with NOR flash devices.
>
>
> Nicolas
>
--
http://HumanHeuristic.com/
"Bringing people together in a world full of computers"
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next reply other threads:[~2000-12-06 2:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-06 2:28 Ian [this message]
2000-12-06 2:52 ` Problems with r/w on mtdblock0 Nicolas Pitre
-- strict thread matches above, loose matches on Subject: below --
2000-12-06 4:33 Ian
2000-12-06 3:07 Ian
2000-12-06 2:45 Ian
2000-12-06 0:19 Ian
2000-12-06 0:41 ` Ollie Lho
2000-12-06 2:18 ` Nicolas Pitre
2000-12-05 1:54 Ian
2000-12-05 9:15 ` David Woodhouse
2000-12-05 14:50 ` Ronald G Minnich
2000-12-05 14:54 ` David Woodhouse
2000-12-05 15:34 ` Nicolas Pitre
2000-12-05 15:36 ` David Woodhouse
2000-12-05 19:38 ` Ronald G Minnich
2000-12-05 0:42 Ian
2000-12-04 22:36 Ian
2000-12-05 1:10 ` Ollie Lho
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=200012060228.MAA20125@singularity.tronunltd.com \
--to=relativity@humanheuristic.com \
--cc=linuxbios@lanl.gov \
--cc=mtd@infradead.org \
--cc=nico@cam.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