From: "Ian" <Relativity@HumanHeuristic.com>
To: "Ronald G Minnich" <rminnich@lanl.gov>
Cc: <mtd@infradead.org>, <linuxbios@lanl.gov>
Subject: Re: Problems with r/w on mtdblock0
Date: Wed, 6 Dec 2000 10:19:30 +1000 [thread overview]
Message-ID: <200012060019.KAA19472@singularity.tronunltd.com> (raw)
Ok - I have more info (and I retract my self-scumbagging from yesterday :-)
In the cases where you can "dd if=any_file of=/dev/mtd0 bs=512 count=1" and
get *no* change in the DoC content (verified with a "hexdump -v /dec/mtd0") ..
If you, instead, try a "doc_loadbios /dev/mtd0 any_file" you should see your
"any_file" contents stick to /dev/mtd0's content. See here, result of;
#cat crt0.bin crt0.bin > bios
#doc_loadbios /dev/mtd0 bios
#hdexdump -v /dev/mtd0 | more
0000000 69b0 80e6 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0000 0000 0000 0000 0000 0000 0000
0000050 0000 0000 0000 0000 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000070 0000 0000 0000 0000 0000 0000 0000 0000
0000080 0000 0000 0000 0000 0000 0000 0000 0000
0000090 0000 0000 0000 0000 0000 0000 0000 0000
00000a0 0000 0000 0000 0000 0000 0000 0000 0000
00000b0 0000 0000 0000 0000 0000 0000 0000 0000
00000c0 0000 0000 0000 0000 0000 0000 0000 0000
00000d0 0000 0000 0000 0000 0000 0000 0000 0000
00000e0 0000 0000 0000 0000 0000 0000 0000 0000
00000f0 0000 0000 0000 0000 0000 0000 0000 0000
0000100 0000 0000 0000 0000 0000 0000 0000 0000
0000110 0000 0000 0000 0000 0000 0000 0000 0000
0000120 0000 0000 0000 0000 0000 0000 0000 0000
0000130 0000 0000 0000 0000 0000 0000 0000 0000
0000140 0000 0000 0000 0000 0000 0000 0000 0000
0000150 0000 0000 0000 0000 0000 0000 0000 0000
0000160 0000 0000 0000 0000 0000 0000 0000 0000
0000170 0000 0000 0000 0000 0000 0000 0000 0000
0000180 0000 0000 0000 0000 0000 0000 0000 0000
0000190 0000 0000 0000 0000 0000 0000 0000 0000
00001a0 0000 0000 0000 0000 0000 0000 0000 0000
00001b0 0000 0000 0000 0000 0000 0000 0000 0000
00001c0 0000 0000 0000 0000 0000 0000 0000 0000
00001d0 0000 0000 0000 0000 0000 0000 0000 0000
00001e0 0000 0000 0000 0000 0000 0000 0000 0000
00001f0 00ea 0000 f4fe 0000 0000 0000 0000 ffff
0000200 69b0 80e6 0000 0000 0000 0000 0000 0000
0000210 0000 0000 0000 0000 0000 0000 0000 0000
0000220 0000 0000 0000 0000 0000 0000 0000 0000
0000230 0000 0000 0000 0000 0000 0000 0000 0000
0000240 0000 0000 0000 0000 0000 0000 0000 0000
0000250 0000 0000 0000 0000 0000 0000 0000 0000
0000260 0000 0000 0000 0000 0000 0000 0000 0000
0000270 0000 0000 0000 0000 0000 0000 0000 0000
0000280 0000 0000 0000 0000 0000 0000 0000 0000
0000290 0000 0000 0000 0000 0000 0000 0000 0000
00002a0 0000 0000 0000 0000 0000 0000 0000 0000
00002b0 0000 0000 0000 0000 0000 0000 0000 0000
00002c0 0000 0000 0000 0000 0000 0000 0000 0000
00002d0 0000 0000 0000 0000 0000 0000 0000 0000
00002e0 0000 0000 0000 0000 0000 0000 0000 0000
00002f0 0000 0000 0000 0000 0000 0000 0000 0000
0000300 0000 0000 0000 0000 0000 0000 0000 0000
0000310 0000 0000 0000 0000 0000 0000 0000 0000
0000320 0000 0000 0000 0000 0000 0000 0000 0000
0000330 0000 0000 0000 0000 0000 0000 0000 0000
0000340 0000 0000 0000 0000 0000 0000 0000 0000
0000350 0000 0000 0000 0000 0000 0000 0000 0000
0000360 0000 0000 0000 0000 0000 0000 0000 0000
0000370 0000 0000 0000 0000 0000 0000 0000 0000
0000380 0000 0000 0000 0000 0000 0000 0000 0000
0000390 0000 0000 0000 0000 0000 0000 0000 0000
00003a0 0000 0000 0000 0000 0000 0000 0000 0000
00003b0 0000 0000 0000 0000 0000 0000 0000 0000
00003c0 0000 0000 0000 0000 0000 0000 0000 0000
00003d0 0000 0000 0000 0000 0000 0000 0000 0000
00003e0 0000 0000 0000 0000 0000 0000 0000 0000
00003f0 00ea 0000 f4fe 0000 0000 0000 0000 ffff
However! If you *then* do a dd and transfer any_other_file
into /dev/mtd0, the new contents are logically "and"ed with
the old contents of /dev/mtd0. Ie;
#dd if=doc_loadbios of=/dev/mtd0 bs=512 count=2
#hexdump -v /dev/mtd0 | more
0000000 4130 0044 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0000 0000 0000 0000 0000 0000 0000
0000050 0000 0000 0000 0000 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000070 0000 0000 0000 0000 0000 0000 0000 0000
0000080 0000 0000 0000 0000 0000 0000 0000 0000
0000090 0000 0000 0000 0000 0000 0000 0000 0000
00000a0 0000 0000 0000 0000 0000 0000 0000 0000
00000b0 0000 0000 0000 0000 0000 0000 0000 0000
00000c0 0000 0000 0000 0000 0000 0000 0000 0000
00000d0 0000 0000 0000 0000 0000 0000 0000 0000
00000e0 0000 0000 0000 0000 0000 0000 0000 0000
00000f0 0000 0000 0000 0000 0000 0000 0000 0000
0000100 0000 0000 0000 0000 0000 0000 0000 0000
0000110 0000 0000 0000 0000 0000 0000 0000 0000
0000120 0000 0000 0000 0000 0000 0000 0000 0000
0000130 0000 0000 0000 0000 0000 0000 0000 0000
0000140 0000 0000 0000 0000 0000 0000 0000 0000
0000150 0000 0000 0000 0000 0000 0000 0000 0000
0000160 0000 0000 0000 0000 0000 0000 0000 0000
0000170 0000 0000 0000 0000 0000 0000 0000 0000
0000180 0000 0000 0000 0000 0000 0000 0000 0000
0000190 0000 0000 0000 0000 0000 0000 0000 0000
00001a0 0000 0000 0000 0000 0000 0000 0000 0000
00001b0 0000 0000 0000 0000 0000 0000 0000 0000
00001c0 0000 0000 0000 0000 0000 0000 0000 0000
00001d0 0000 0000 0000 0000 0000 0000 0000 0000
00001e0 0000 0000 0000 0000 0000 0000 0000 0000
00001f0 0022 0000 0012 0000 0000 0000 0000 0804
0000200 0020 0000 0000 0000 0000 0000 0000 0000
0000210 0000 0000 0000 0000 0000 0000 0000 0000
0000220 0000 0000 0000 0000 0000 0000 0000 0000
0000230 0000 0000 0000 0000 0000 0000 0000 0000
0000240 0000 0000 0000 0000 0000 0000 0000 0000
0000250 0000 0000 0000 0000 0000 0000 0000 0000
0000260 0000 0000 0000 0000 0000 0000 0000 0000
0000270 0000 0000 0000 0000 0000 0000 0000 0000
0000280 0000 0000 0000 0000 0000 0000 0000 0000
0000290 0000 0000 0000 0000 0000 0000 0000 0000
00002a0 0000 0000 0000 0000 0000 0000 0000 0000
00002b0 0000 0000 0000 0000 0000 0000 0000 0000
00002c0 0000 0000 0000 0000 0000 0000 0000 0000
00002d0 0000 0000 0000 0000 0000 0000 0000 0000
00002e0 0000 0000 0000 0000 0000 0000 0000 0000
00002f0 0000 0000 0000 0000 0000 0000 0000 0000
0000300 0000 0000 0000 0000 0000 0000 0000 0000
0000310 0000 0000 0000 0000 0000 0000 0000 0000
0000320 0000 0000 0000 0000 0000 0000 0000 0000
0000330 0000 0000 0000 0000 0000 0000 0000 0000
0000340 0000 0000 0000 0000 0000 0000 0000 0000
0000350 0000 0000 0000 0000 0000 0000 0000 0000
0000360 0000 0000 0000 0000 0000 0000 0000 0000
0000370 0000 0000 0000 0000 0000 0000 0000 0000
0000380 0000 0000 0000 0000 0000 0000 0000 0000
0000390 0000 0000 0000 0000 0000 0000 0000 0000
00003a0 0000 0000 0000 0000 0000 0000 0000 0000
00003b0 0000 0000 0000 0000 0000 0000 0000 0000
00003c0 0000 0000 0000 0000 0000 0000 0000 0000
00003d0 0000 0000 0000 0000 0000 0000 0000 0000
00003e0 0000 0000 0000 0000 0000 0000 0000 0000
00003f0 0028 0000 0406 0000 0000 0000 0000 0000
So if I take a hexdump of the first line of the "doc_loadbios" binary;
#hexdump -v doc_loadbios | more
0000000 457f 464c 0101 0001 0000 0000 0000 0000
.. the first line of my bios image;
#hdexdump -v bios | more
0000000 69b0 80e6 0000 0000 0000 0000 0000 0000
.. and "and" the two;
0110100110110000 = 69b0h
0100010101111111 = 4575h
================
0100000100110000
... I get the first word displayed by /dev/mtd0 after the dd (see above)
0100000100110000 = 4130h
Is /dev/mtd0 supposed to behave like this, or have I just rediscovered a
deliberate "feature" ... ?
> I was confused too. All I can tell you is I have seen cases where the
> write doesn't "stick".
>
> ron
--
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 0:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-06 0:19 Ian [this message]
2000-12-06 0:41 ` Problems with r/w on mtdblock0 Ollie Lho
2000-12-06 2:18 ` 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 2:28 Ian
2000-12-06 2:52 ` 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=200012060019.KAA19472@singularity.tronunltd.com \
--to=relativity@humanheuristic.com \
--cc=linuxbios@lanl.gov \
--cc=mtd@infradead.org \
--cc=rminnich@lanl.gov \
/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