[U-Boot] U-Boot 2010.12 Cannot Successfully Save Variables with Redundant NAND Environment

Grant Erickson gerickson at nuovations.com
Sun Feb 6 21:41:02 CET 2011


I recently updated my TI AM37x EVM from U-Boot 2010.09 to 2010.12 and
noticed that, in doing so, saveenv / env save no longer seems to work. The
following example demonstrates:

    => version

    U-Boot 2010.12 (Feb 04 2011 - 16:12:51)
    => env print foo
    ## Error: "foo" not defined
    => env set foo bar
    => env save
    Saving Environment to NAND...
    Erasing redundant NAND...
    Erasing at 0x3a0000 -- 100% complete.
    Writing to redundant NAND... done
    => env print foo
    foo=bar
    => reset
    resetting ...

    ...

    Hit any key to stop autoboot:  0
    => env print foo
    ## Error: "foo" not defined

However, I can successfully read and write NAND, for example, updating
u-boot.

Anyone else noticed this on OMAP-based boards? With NAND? With NOR?

Running a few more experiments, I find that I can entirely whack the
environment, set a variable once thereafter, but never again:

    => printenv resetenv
    resetenv=nand erase 0x340000 0x1000 && nand erase 0x3a0000 0x1000
    => run resetenv

    NAND erase: device 0 offset 0x340000, size 0x1000
    Erasing at 0x340000 -- 100% complete.
    OK

    NAND erase: device 0 offset 0x3a0000, size 0x1000
    Erasing at 0x3a0000 -- 100% complete.
    OK
    => reset
    resetting ...

    ...
    *** Warning - bad CRC, using default environment
    ...
    Hit any key to stop autoboot:  0

    => saveenv
    Saving Environment to NAND...
    Erasing redundant NAND...
    Erasing at 0x3a0000 -- 100% complete.
    Writing to redundant NAND... done
    => setenv foo bar
    => printenv foo
    foo=bar
    => saveenv
    Saving Environment to NAND...
    Erasing NAND...
    Erasing at 0x340000 -- 100% complete.
    Writing to NAND... done
    => printenv foo
    foo=bar
    => reset
    resetting ...

    ...
    Hit any key to stop autoboot:  0
    => printenv foo
    foo=bar
    => env delete foo
    Not implemented yet
    => setenv foo
    => printenv foo
    ## Error: "foo" not defined
    => saveenv
    Saving Environment to NAND...
    Erasing redundant NAND...
    Erasing at 0x3a0000 -- 100% complete.
    Writing to redundant NAND... done
    => printenv foo
    ## Error: "foo" not defined
    => reset
    resetting ...

    ...
    Hit any key to stop autoboot:  0
    => printenv foo
    foo=bar
-- 
Principal
Nuovations

998 Alpine Terrace Suite 3
Sunnyvale, CA 94086-2469
US

T +1-408-749-0495
F +1-205-449-0495
M +1-408-489-5710

gerickson at nuovations.com
http://www.nuovations.com/


Best,

Grant




More information about the U-Boot mailing list