From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Wegner Date: Wed, 7 Sep 2011 13:07:20 +0200 Subject: [U-Boot] environment in NAND In-Reply-To: References: <201109061623.08797.marek.vasut@gmail.com> <20110907070232.GG21272@leila.ping.de> <20110907093556.GJ21272@leila.ping.de> Message-ID: <20110907110720.GK21272@leila.ping.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 07, 2011 at 12:20:51PM +0200, Arno Steffen wrote: > > There is a question left for redundancy, which is imho a bug (or maybe > I don't get the design concept of redundancy): > If I have an empty environment (both standard and redund - env1 and > env2 ) and boot, it recognizes CRC error (which is ok). > A "save" write it to redundand environment (0x10.0000). This is > probably as it recognice an CRCerror in env1 and doesn't check this > for env2 > > If I add some settings ("set test true") and do "save" a second time - > it writes ONLY to default env (0xc.0000) ?!? > What happens, that it will change location? Or shouldn't it write to > both locations ? there is only one location written. I don't remember exactly how it works, but there is an algorithm in place to check which block is newer upon initial read. Have a look at common/env_nand.c, env_init() to see how it works exactly. Best regards, Wolfgang