public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] where is the crc stored?
Date: Sat, 22 Dec 2012 00:09:36 +0100	[thread overview]
Message-ID: <20121221230936.F245C201213@gemini.denx.de> (raw)
In-Reply-To: <1356125251.28896.119.camel@genx>

Dear John Stile,

In message <1356125251.28896.119.camel@genx> you wrote:
>
> I am a total new-bee, but I have read there is a crc check in u-boot.

Actually there are several such checks, for several different
purposes.

> The crc check can result in a:
>   Warning: Bad CRC, using default environment

THis is when checking if there is a valid environment.  So we are
talkign about the CRC which protects the persistent environment copy.
The structure of this is defined in "include/environment.h", see
struct environment_s - as you can see, this is a CRC32.

> The crc is considered during the bootcmd.

No, this has absolutely nothing to do with bootcmd.

> I would like to know where this crc is stored.

In the first 4 bytes of the external representation of the
environment.

> I would like to know is it 8-bit, 16-bit, and 32-bit, or other.

32 bit.

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
The ultimate barrier is one's viewpoint.
                        - Terry Pratchett, _The Dark Side of the Sun_

      reply	other threads:[~2012-12-21 23:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 18:32 [U-Boot] where is the crc stored? John Stile
2012-12-21 19:54 ` Wolfgang Denk
2012-12-21 21:27   ` John Stile
2012-12-21 23:09     ` Wolfgang Denk [this message]

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=20121221230936.F245C201213@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /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