All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] incremental environment updating
Date: Mon, 13 Apr 2009 09:57:54 -0400	[thread overview]
Message-ID: <49E344E2.3090709@ge.com> (raw)
In-Reply-To: <20090413130648.0EBAF83420E8@gemini.denx.de>

Wolfgang Denk wrote:
> Dear Jerry Van Baren,
> 
> In message <49E335BB.4050609@ge.com> you wrote:
>>> - it works only on NOR flash, not on any media that can be accessed
>>>   only in blocks
>> Not true: the offset merely needs to be aligned to the next block in 
>> that case:
>>    <next><crc><env><NUL>FFFFFFFFFFFF <next><crc><env><NUL>[undefined]
>>    ^^^^ offset of ------------------> ^^^^ 0xFFFFFFFF
>>
>> All flash that I can recall seeing allows at least a limited number of 
>> rewrites to a block (the limited number getting smaller on successive 
>> generations), so two writes to the env start block (once to write the 
>> new env, a second time to rewrite the 0xFFFFFFFF to point to the 
>> superceeding env).  If the flash didn't support two writes, that would 
>> be a show-stopper.  Due to how people use flash, I don't think the 
>> number will ever go to one write (IIRC, 4 is typical of current 
>> generation NAND).
> 
> So what do we save, then? Instead of a single write we now need
> actually two...

Well, I have a (NOR) flash with a 128Kbyte sector size.  If my env is 
~2K, I can do ~64 updates before I would need to erase the sector and 
start over.

 From a practical point of view, that probably isn't a big deal.  From a 
"bugs me" POV, it bugs me that I'm "wasting" 126K of that sector.  :-P

IIRC, redundant env lumps take two sectors so the redundant env isn't 
erased (need to check the code).  Depending on your acceptable risk 
tolerance, the "redundant" env lump would simply be lump(n-1).

[snip]

Best regards,
gvb

  reply	other threads:[~2009-04-13 13:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 10:09 [U-Boot] incremental environment updating Mike Frysinger
2009-04-13 10:15 ` Wolfgang Denk
2009-04-13 10:34   ` Mike Frysinger
2009-04-13 12:12     ` Jerry Van Baren
2009-04-13 12:26       ` Wolfgang Denk
2009-04-13 12:53         ` Jerry Van Baren
2009-04-13 13:06           ` Wolfgang Denk
2009-04-13 13:57             ` Jerry Van Baren [this message]
2009-04-13 12:34       ` Mike Frysinger
2009-04-13 13:04         ` Wolfgang Denk
2009-04-13 13:11         ` Jerry Van Baren
2009-04-13 13:30           ` Mike Frysinger

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=49E344E2.3090709@ge.com \
    --to=gerald.vanbaren@ge.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.