public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Markus Klotzbücher" <mk@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] make env
Date: Sun, 06 Apr 2008 19:37:32 +0200	[thread overview]
Message-ID: <87od8mvq8z.fsf@denx.de> (raw)
In-Reply-To: <47F36B7A.9080104@feig.de> (Manuel Sahm's message of "Wed\, 02 Apr 2008 13\:18\:18 +0200")

Manuel Sahm <Manuel.Sahm@feig.de> writes:

> how does uboot handle this flag byte ? (i I use redundant nand)

As you can't invalidate the old NAND environment as you can with NOR
flash, counters are used instead. So for NAND, the flag byte is a
counter which gets incremented for each write. This means the
environment with the flag containing the larger value is the valid one,
except for the case when the counter overflows and the valid environment
flag holds the value 0 and the former one 255.

Actually it would make sense to use this technique for NOR flash
identically, as it would avoid one write access to the flash.

Check out common/env_nand.c for details.

Best regards

Markus Klotzbuecher

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

      parent reply	other threads:[~2008-04-06 17:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 15:57 [U-Boot-Users] make env Manuel Sahm
2008-03-20 16:04 ` Wolfgang Denk
2008-03-20 17:56   ` Ladislav Michl
2008-03-20 20:02     ` Wolfgang Denk
2008-03-20 20:11       ` Ladislav Michl
2008-03-20 21:27         ` Wolfgang Denk
2008-03-20 21:33           ` Ladislav Michl
2008-03-25 12:56             ` Manuel Sahm
2008-03-25 13:36               ` Markus Klotzbücher
2008-03-25 16:19                 ` Manuel Sahm
2008-03-25 17:04                   ` Markus Klotzbücher
2008-03-25 20:11               ` Wolfgang Denk
2008-04-02  9:31                 ` Manuel Sahm
2008-04-02 10:39                   ` Wolfgang Denk
2008-04-02 11:18                     ` Manuel Sahm
2008-04-02 14:33                       ` Wolfgang Denk
2008-04-06 17:37                       ` Markus Klotzbücher [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=87od8mvq8z.fsf@denx.de \
    --to=mk@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