]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
NAND: Fix saving of redundand environment
authorAlexander Holler <holler@ahsoftware.de>
Thu, 20 Jan 2011 01:17:48 +0000 (02:17 +0100)
committerScott Wood <scottwood@freescale.com>
Wed, 2 Feb 2011 22:14:08 +0000 (16:14 -0600)
When redundand environments are used the serial needs
to get increased, otherwise the old one will still be used.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
common/env_nand.c

index 2682f07fdcd8c1173a2c89e160643138128924ba..a4480cb22bc520c72bdcd06a0b762ad46ccc1800 100644 (file)
@@ -205,7 +205,7 @@ int saveenv(void)
                return 1;
        }
        env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
                return 1;
        }
        env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
-       env_new.flags = ACTIVE_FLAG;
+       ++env_new.flags; /* increase the serial */
 
        if(gd->env_valid == 1) {
                puts("Erasing redundant NAND...\n");
 
        if(gd->env_valid == 1) {
                puts("Erasing redundant NAND...\n");