* [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE
@ 2007-03-27 17:27 Robin Getz
2007-03-27 17:47 ` Wolfgang Denk
2007-03-27 21:07 ` Detlef Vollmann
0 siblings, 2 replies; 3+ messages in thread
From: Robin Getz @ 2007-03-27 17:27 UTC (permalink / raw)
To: u-boot
In [u-boot.git] / common / env_flash.c around line 171 there is a
#if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE
to be able to mix other data, and the environment info. (Where 'other data'
could be U-Boot code).
However, in an email a few days ago:
On 3/26/07, Wolfgang Denk <wd@denx.de> wrote:
> In message <46040C60.5070505@inaccessnetworks.com> you wrote:
> > I have a flash chip with equally sized sectors and I don't want to waste
> > an entire sector for the environment. I have the u-boot environment
> > embedded in the u-boot sector. The declarations in my board file are:
>
> Do not do this. Do NOT do this. DO NOT DO THIS.
>
> Please never mix U-Boot code and environment data in one sector.
> Always use a separate sector (or two) for the environment.
If that is the recommendation (which is fine), why have this code snippet in
there, and not add something like:
#error Do not do this. Do NOT do this. DO NOT DO THIS.
:)
This is just curiosity - no other reason.
-Robin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE
2007-03-27 17:27 [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE Robin Getz
@ 2007-03-27 17:47 ` Wolfgang Denk
2007-03-27 21:07 ` Detlef Vollmann
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2007-03-27 17:47 UTC (permalink / raw)
To: u-boot
In message <200703271327.00147.rgetz@blackfin.uclinux.org> you wrote:
> In [u-boot.git] / common / env_flash.c around line 171 there is a
>
> #if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE
>
> to be able to mix other data, and the environment info. (Where 'other data'
> could be U-Boot code).
No, this is NOT the intention.
The intention is to allow for having a resonable envrionment size
(say 8...16kB) even if you have big flash sectors (like 256kB or
more). This is needed to avoid slow bot times because otherwise you
would laways have to compute the CRC checksums for one or two such
big sectors when all you want to protect are a few kB of data.
> If that is the recommendation (which is fine), why have this code snippet in
> there, and not add something like:
>
> #error Do not do this. Do NOT do this. DO NOT DO THIS.
Because it is a very useful thing to have, just for a completely
different purpose (i. e. leave the rest of the sector empty and
unused).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Mike's Law: For a lumber company employing two men and a cut-off saw,
the marginal product of labor for any number of additional workers
equals zero until the acquisition of another cut-off saw. Let's not
even consider a chainsaw.
- Mike Dennison [You could always schedule the saw, though - ed.]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE
2007-03-27 17:27 [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE Robin Getz
2007-03-27 17:47 ` Wolfgang Denk
@ 2007-03-27 21:07 ` Detlef Vollmann
1 sibling, 0 replies; 3+ messages in thread
From: Detlef Vollmann @ 2007-03-27 21:07 UTC (permalink / raw)
To: u-boot
Robin Getz wrote:
> In [u-boot.git] / common / env_flash.c around line 171 there is a
>
> #if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE
>
> to be able to mix other data, and the environment info. (Where 'other data'
> could be U-Boot code).
>
> However, in an email a few days ago:
>
> On 3/26/07, Wolfgang Denk <wd@denx.de> wrote:
> > In message <46040C60.5070505@inaccessnetworks.com> you wrote:
> > > I have a flash chip with equally sized sectors and I don't want to waste
> > > an entire sector for the environment. I have the u-boot environment
> > > embedded in the u-boot sector. The declarations in my board file are:
> >
> > Do not do this. Do NOT do this. DO NOT DO THIS.
> >
> > Please never mix U-Boot code and environment data in one sector.
> > Always use a separate sector (or two) for the environment.
>
> If that is the recommendation (which is fine), why have this code snippet in
> there, and not add something like:
>
> #error Do not do this. Do NOT do this. DO NOT DO THIS.
There is other data that you can put into the same sector as the
U-Boot environment.
In our BSP, we use it for data written there at production,
in another project we use it for data that is read from Linux
but must stay outside the Linux kernel and filesystem image.
Detlef
--
Detlef Vollmann vollmann engineering gmbh
Linux and C++ for Embedded Systems http://www.vollmann.ch/
Linux for PXA270 Colibri module: http://www.vollmann.ch/en/colibri/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-27 21:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 17:27 [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE Robin Getz
2007-03-27 17:47 ` Wolfgang Denk
2007-03-27 21:07 ` Detlef Vollmann
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.