[U-Boot-Users] make env

Manuel Sahm
2008-04-02T11:18:18Z

Hello,

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

What initial value must this flag have?
Same value for enviroment1 and enviroment2 ?

If I make a "saveenv" which env. is used, and what values are then
written to the NAND flash to set it as aktiv/deactive ?

For example:

In Linux I want to write my own Enviroment to the redundant Env: What
must be the value of the flag byte to set this redundant enviroment
actik, so that UBoot will use this one ?
And: Which value do I have to write tho the other "old" enviroment in
NAND flash, so that this one becomes deactive ?

Thank you very much

Manuel Sahm

Wolfgang Denk schrieb:
> Dear Manuel,
>
> in message <47F3528A.3000202@feig.de> you wrote:
>
>> My problem the structure of the enviroment:
>> If I understand:
>> 4 byte crc; 1 byte flags, 0x20000-5 byte data.
>>
>
> Correct - the flag byte is only present if you use redundant
> environment.
>
>
>> The CRC is over the data bytes,( not the flags byte included) , right ??
>>
>
> Correct. That's because the flasg byte indicates the state of the
> environment copy (current -> bit = 1, or obsolete -> bit = 0). It
> relies on the feature of NOR flash that you can always program '1'
> bits to '0', even single bits in a single byte.
>
>
>> What about the flag byte, which values should I have to write here ?
>>
>
> See above. But you might have problems doing such a thing on NAND
> storage.
>
> Best regards,
>
> Wolfgang Denk
>
>

--
Freundliche Gr??e / Best regards

Manuel Sahm

Research & Development

FEIG ELECTRONIC GmbH
Lange Stra?e 4
35781 Weilburg
Germany

Tel.: +49 (0)6471-3109.492
Fax.: +49 (0)6471-3109.99
email: manuel.sahm at feig.de
internet: http://www.feig.de

------------------------------------------------------------------------
Amtsgericht Limburg HRB 3178
Gesch?ftsf?hrer: Dipl.-Ing. Wolfgang Feig
------------------------------------------------------------------------

------------------------------------------------------------------------
Diese Email (eingeschlossen die Anhaenge) unterliegt Urheberrecht, die
Informationen sind vertraulich und rechtswirksam privilegiert. Der
Gebrauch dieser Email oder der Anhaenge von einem anderen als den
Adressaten ist nicht gestattet und unrechtmaessig.

This email (including any attachments) is subject to copyright, the
information in it is confidential, and it is legally privileged. Use of
this email or of any information in it other than by the addressee is
unauthorised and unlawful.
------------------------------------------------------------------------