From: Wolfgang Denk Date: Wed, 02 Apr 2008 12:39:50 +0200 Subject: [U-Boot-Users] make env In-Reply-To: Your message of "Wed, 02 Apr 2008 11:31:54 +0200." <47F3528A.3000202@feig.de> Message-ID: <20080402103950.98436243AB@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I have a very small mind and must live with it. -- Edsger Dijkstra