[U-Boot] Problems with fw_printenv

The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works.

Dear Ronald Kortekaas,
In message D94411866239F14CAE874E27A9B65CA88485E5E26E@exalg01.CHESS.INT you wrote:
The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works.
Do you understand the consequewnces of removing this definition? Are you sure you really want to do this?
Best regards,
Wolfgang Denk

Op 3-3-2010 21:21, Wolfgang Denk schreef:
Dear Ronald Kortekaas,
In messageD94411866239F14CAE874E27A9B65CA88485E5E26E@exalg01.CHESS.INT you wrote:
The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works.
Do you understand the consequewnces of removing this definition? Are you sure you really want to do this?
Best regards,
Wolfgang Denk
No, I'm not understanding the consequences of removing this definition. I can't find a description what is does. It was a suggestion of one of the other readers of the maillist.
But if I want to use the CONFIG_ENV_ADDR_REDUND. Is there a way to solve this problem?
This message refers to http://lists.denx.de/pipermail/u-boot/2010-March/068204.html.
Best regards,
Ronald

Dear Ronald Kortekaas,
In message 4B8F4FBB.8040204@chess.nl you wrote:
The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works.
Do you understand the consequewnces of removing this definition? Are you sure you really want to do this?
...
No, I'm not understanding the consequences of removing this definition. I can't find a description what is does.
Hm... You can't? Didn't you find the README ?
But if I want to use the CONFIG_ENV_ADDR_REDUND. Is there a way to solve this problem?
Of course there is. You just have to adapt the fw_config file for redundant environment, i. e. add entries for both copies of the environment data.
Best regards,
Wolfgang Denk

Op 3-3-2010 21:21, Wolfgang Denk schreef:
Dear Ronald Kortekaas,
In messageD94411866239F14CAE874E27A9B65CA88485E5E26E@exalg01.CHESS.INT you wrote:
The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works.
Do you understand the consequewnces of removing this definition? Are you sure you really want to do this?
Best regards,
Wolfgang Denk
I think I found the solution. I changed my configuration als follows:
Removed the #undef CONFIG_ENV_ADDR_REDUND Added
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
Changed my mtdparts to:
#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),128k(ubootenv_re),4096k(kernel)"
So mtd in u-boot showd:
device nor0 <physmap-flash.0>, # parts = 3 #: name size offset mask_flags 0: uboot 0x00040000 0x00000000 1 1: ubootenv 0x00020000 0x00040000 0 2: ubootenv 0x00020000 0x00060000 0 3: kernel 0x00400000 0x00080000 0
I changed fw_env.h to #define HAVE_REDUND.
And the fw_env.config:
/dev/mtd2 0x0000 0x20000 0x20000 /dev/mtd3 0x0000 0x20000 0x20000
So now it's working with the redundant environment partitions. Thanks for your support

Dear Ronald Kortekaas,
In message 4B8F60A1.4070105@chess.nl you wrote:
I think I found the solution. I changed my configuration als follows:
...
Changed my mtdparts to:
#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),128k(ubootenv_re),4096k(kernel)"
So mtd in u-boot showd:
device nor0 <physmap-flash.0>, # parts = 3 #: name size offset mask_flags 0: uboot 0x00040000 0x00000000 1 1: ubootenv 0x00020000 0x00040000 0 2: ubootenv 0x00020000 0x00060000 0 3: kernel 0x00400000 0x00080000 0
I changed fw_env.h to #define HAVE_REDUND.
And the fw_env.config:
/dev/mtd2 0x0000 0x20000 0x20000 /dev/mtd3 0x0000 0x20000 0x20000
This is one way to address this. You can also keep both copies of the environment variables in a single MTD partition - just provide the correct device name, offset and size data.
Best regards,
Wolfgang Denk
participants (3)
-
Ronald Kortekaas
-
Ronald Kortekaas
-
Wolfgang Denk