From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 27 Nov 2012 16:04:15 -0600 Subject: [U-Boot] [PATCH 2/4] env_nand.c: support falling back to redundant env when writing In-Reply-To: <1353502761-12640-2-git-send-email-phil.sutter@viprinet.com> (from phil.sutter@viprinet.com on Wed Nov 21 06:59:19 2012) References: <1353502761-12640-1-git-send-email-phil.sutter@viprinet.com> <1353502761-12640-2-git-send-email-phil.sutter@viprinet.com> Message-ID: <1354053855.2317.10@tyr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/21/2012 06:59:19 AM, Phil Sutter wrote: > Without this patch, when the currently chosen environment to be > written > has bad blocks, saveenv fails completely. Instead, when there is > redundant environment fall back to the other copy. Environment reading > needs no adjustment, as the fallback logic for incomplete writes > applies > to this case as well. > > Signed-off-by: Phil Sutter Isn't this what CONFIG_ENV_RANGE is supposed to deal with? Redundant environment is to deal with other problems such as a power failure during saveenv. If you just fall back to the other copy, you're silently losing the redundancy. -Scott