All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthias Weißer" <weisserm@arcor.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFD] store env size in env area (+ cookie + len)
Date: Thu, 12 Aug 2010 10:11:18 +0200	[thread overview]
Message-ID: <4C63ACA6.6080303@arcor.de> (raw)
In-Reply-To: <AANLkTi=LrEok8wT0Q0bt+rXYckPtFZasBRf=_1oeKCk4@mail.gmail.com>

Am 12.08.2010 09:54, schrieb Frans Meulenbroeks:
> 2010/8/12 Matthias Wei?er<weisserm@arcor.de>:
>> Why not store the size of the environment sector as env variable? The size
>> should be only needed for storing the environment and not for loading (as it
>> is terminated by a '\0'). So we could load the environment, check for
>> "env_size" and if its not there take the value from fw_env.config
>
> Currently the crc of the environment is calculated and if it does not
> match with the stored crc the default environment is used.
> For determining the crc the size is needed so storing the size in the
> env creates some form of catch-22. Of course the code could be
> modified to first peek at the unverified env to find the size.
> That is a different approach. Imho not too neat.

I see. I was thinking that the CRC is only calculated over the 
environment until the '\0' end mark is reached. But after checking my 
environment code I see that the CRC is calculated over the whole sector.

> Wrt the format: I understood from the mail from Reinhard that the way
> the env is stored is going to change anyway. I saw the patches of
> Wolfgang pass by, but didn't have time to study them yet.

I also didn't go that deep into Wolfgangs patches but from what I 
understand the "on disk format" will not change. Will it?

Maybe the size could be added at the end of the environment (behind the 
'\0'). So we wouldn't loose compatibility.

Matthias

  parent reply	other threads:[~2010-08-12  8:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12  6:43 [U-Boot] [RFD] store env size in env area (+ cookie + len) Frans Meulenbroeks
2010-08-12  6:57 ` Reinhard Meyer
2010-08-12  7:27 ` Matthias Weißer
2010-08-12  8:07   ` Alexander Stein
2010-08-12  8:41     ` Wolfgang Denk
     [not found]   ` <AANLkTi=LrEok8wT0Q0bt+rXYckPtFZasBRf=_1oeKCk4@mail.gmail.com>
2010-08-12  8:11     ` Matthias Weißer [this message]
2010-08-12  8:17       ` Reinhard Meyer
2010-08-12  8:35         ` Reinhard Meyer
2010-08-12  8:50           ` Wolfgang Denk
2010-08-12  8:47         ` Wolfgang Denk
2010-08-12  9:03           ` Reinhard Meyer
2010-08-12 10:15             ` Wolfgang Denk
2010-08-12  8:46       ` Wolfgang Denk
2010-08-12  8:38 ` Wolfgang Denk

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=4C63ACA6.6080303@arcor.de \
    --to=weisserm@arcor.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 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.