* [U-Boot] R: Re: Question about md output
@ 2012-05-12 16:12 ffileppo at libero.it
2012-05-29 20:37 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: ffileppo at libero.it @ 2012-05-12 16:12 UTC (permalink / raw)
To: u-boot
>
>Ditto.
>
>Have a look at itest; if you still make no progress then please
>describe what you actually want to do, so we can show you how to do it
>efficiently - without need to modify code.
>
>Best regards,
>
>Wolfgang Denk
>
Dear Wolfgang,
thanks for your support.
Let me understand if I get this right.
for example, I have a block of 8 words, starting at 0x0:
00000000: a b c d
00000010: e f g h
where a is the crc32 computed on b,c,d,e,f,g,h
Within uboot, I would like to compute the crc32 of b,c,d,e,f,g,h and compare
it with a.
-- Compute CRC and store at address 20
crc 1 7 20
-- Compare CRCs
if itest *0 == *20; then echo CRC ok; else echo CRC bad; fi
Is that correct?
Thanks and best regards,
FF
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] R: Re: Question about md output
2012-05-12 16:12 [U-Boot] R: Re: Question about md output ffileppo at libero.it
@ 2012-05-29 20:37 ` Wolfgang Denk
2012-05-30 5:40 ` Anthony Foiani
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2012-05-29 20:37 UTC (permalink / raw)
To: u-boot
Dear "ffileppo at libero.it",
In message <809266.7065381336839126651.JavaMail.defaultUser@defaultHost> you wrote:
>
> for example, I have a block of 8 words, starting at 0x0:
>
> 00000000: a b c d
> 00000010: e f g h
>
> where a is the crc32 computed on b,c,d,e,f,g,h
>
> Within uboot, I would like to compute the crc32 of b,c,d,e,f,g,h and compare
> it with a.
>
> -- Compute CRC and store at address 20
> crc 1 7 20
> -- Compare CRCs
> if itest *0 == *20; then echo CRC ok; else echo CRC bad; fi
>
>
> Is that correct?
Basicly yes, except that the crc32 command does not operate on 32 bit
"words", but on an area of memory (i. e. a number of octets).
Depending on your expectations on endianess etc. this may or may bot
be the same. The "32" in the crc32 command name is just an indication
for the size of the computed checksum.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I am not now, nor have I ever been, a member of the demigodic party.
-- Dennis Ritchie
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] R: Re: Question about md output
2012-05-29 20:37 ` Wolfgang Denk
@ 2012-05-30 5:40 ` Anthony Foiani
0 siblings, 0 replies; 3+ messages in thread
From: Anthony Foiani @ 2012-05-30 5:40 UTC (permalink / raw)
To: u-boot
Wolfgang Denk <wd@denx.de> writes:
> Basicly yes, except that the crc32 command does not operate on 32
> bit "words", but on an area of memory (i. e. a number of octets).
> Depending on your expectations on endianess etc. this may or may bot
> be the same. The "32" in the crc32 command name is just an
> indication for the size of the computed checksum.
I don't know if the usage is the same in German, but in (USA) English
Computer Science, "crc32" most often refers specifically to the
algorithm implemented for Ethernet checksumming (which, with slight
variants is the same used in zlib, u-boot, and many others.)
CRC32 is not the only 32-bit CRC, but it is one of the most popular,
and was chosen for certain desirable properties.
(Wolfgang, I am sure you know all this, I am mostly clarifying for the
original poster.)
Lots of good info here:
http://en.wikipedia.org/wiki/Crc32#Commonly_used_and_standardized_CRCs
Happy hacking!
Best regards,
Anthony Foiani
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-30 5:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-12 16:12 [U-Boot] R: Re: Question about md output ffileppo at libero.it
2012-05-29 20:37 ` Wolfgang Denk
2012-05-30 5:40 ` Anthony Foiani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox