[U-Boot] Question about fw_printenv settings

Joe Culler joe.culler at gmail.com
Wed Mar 10 06:50:46 CET 2010


Hi,

I have problems with fw_env.config in NOR flash.
Would anyone please help me solve it? Thanks.

In my board config:

ifdef CONFIG_NAND
#define CFG_NO_FLASH
#define CONFIG_ENV_IS_IN_NAND           1
#define CONFIG_ENV_OFFSET               0x400000         /* add for 2008.10 */
#define CONFIG_ENV_OFFSET_REDUND        0x404000
#define CONFIG_ENV_SIZE                 0x4000
#else
#define CONFIG_ENV_IS_IN_FLASH          1
#define CONFIG_ENV_ADDR                 (CFG_FLASH_BASE + 0x000c0000)
#define PHYS_FLASH_SIZE                 0x1000000        /* 16 MB */
#define CONFIG_ENV_SIZE                 0x20000
#define CONFIG_ENV_SECT_SIZE            0x20000
#define CONFIG_ENV_ADDR_REDUND          (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
#endif

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00dc0000 00020000 "Linux"
mtd1: 00100000 00020000 "User"
mtd2: 00100000 00020000 "Boot"

My fw_env.config setting:
/dev/mtd2              0x400000        0x20000         0x20000

but it doesn't work :(
#fw_printenv
Read error on /dev/mtd2: Success

Best regards,
Joe.


More information about the U-Boot mailing list