* [U-Boot] Problems with fw_printenv
@ 2010-03-03 10:25 Ronald Kortekaas
2010-03-03 20:21 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Ronald Kortekaas @ 2010-03-03 10:25 UTC (permalink / raw)
To: u-boot
The problem was the definition of CONFIG_ENV_ADDR_REDUND after undefining this it works.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Problems with fw_printenv
2010-03-03 10:25 [U-Boot] Problems with fw_printenv Ronald Kortekaas
@ 2010-03-03 20:21 ` Wolfgang Denk
2010-03-04 6:14 ` Ronald Kortekaas
2010-03-04 7:26 ` Ronald Kortekaas
0 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Denk @ 2010-03-03 20:21 UTC (permalink / raw)
To: u-boot
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
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Niklaus Wirth has lamented that, whereas Europeans pronounce his name
correctly (Ni-klows Virt), Americans invariably mangle it into
(Nick-les Worth). Which is to say that Europeans call him by name,
but Americans call him by value.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Problems with fw_printenv
2010-03-03 20:21 ` Wolfgang Denk
@ 2010-03-04 6:14 ` Ronald Kortekaas
2010-03-04 8:55 ` Wolfgang Denk
2010-03-04 7:26 ` Ronald Kortekaas
1 sibling, 1 reply; 7+ messages in thread
From: Ronald Kortekaas @ 2010-03-04 6:14 UTC (permalink / raw)
To: u-boot
Op 3-3-2010 21:21, Wolfgang Denk schreef:
> 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
>
>
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Problems with fw_printenv
2010-03-03 20:21 ` Wolfgang Denk
2010-03-04 6:14 ` Ronald Kortekaas
@ 2010-03-04 7:26 ` Ronald Kortekaas
2010-03-04 8:57 ` Wolfgang Denk
1 sibling, 1 reply; 7+ messages in thread
From: Ronald Kortekaas @ 2010-03-04 7:26 UTC (permalink / raw)
To: u-boot
Op 3-3-2010 21:21, Wolfgang Denk schreef:
> 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
>
>
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Problems with fw_printenv
2010-03-04 6:14 ` Ronald Kortekaas
@ 2010-03-04 8:55 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2010-03-04 8:55 UTC (permalink / raw)
To: u-boot
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
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In an organization, each person rises to the level of his own incom-
petency - The Peter Principle
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Problems with fw_printenv
2010-03-04 7:26 ` Ronald Kortekaas
@ 2010-03-04 8:57 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2010-03-04 8:57 UTC (permalink / raw)
To: u-boot
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
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If there was anything that depressed him more than his own cynicism,
it was that quite often it still wasn't as cynical as real life.
- Terry Pratchett, _Guards! Guards!_
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Problems with fw_printenv
@ 2010-03-03 9:14 Ronald Kortekaas
0 siblings, 0 replies; 7+ messages in thread
From: Ronald Kortekaas @ 2010-03-03 9:14 UTC (permalink / raw)
To: u-boot
I have some problems with the fw_printenv tool. I use the following versions of u-boot, kernel and compiler:
- u-boot-2009.11.1
- linux-2.6.22
- gcc-3.4.3-glibc-2.3.2 arm-linux-
The problem is that the fw_printenv complains about: "Warning: Bad CRC, using default environment".
My U-boot configuration for the environment is:
#define PHYS_FLASH_1 0xc0000000
#define CONFIG_ENV_IS_IN_FLASH
#define CONFIG_ENV_OFFSET (0x40000)
#define CONFIG_ENV_SECT_SIZE 0x20000 /* Env sector Size */
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#define MTDIDS_DEFAULT "nor0=physmap-flash.0"
#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),4096k(kernel)"
Mtd in u-boot prints:
device nor0 <physmap-flash.0>, # parts = 3
#: name size offset mask_flags
0: uboot 0x00040000 0x00000000 1
1: ubootenv 0x00020000 0x00040000 0
2: kernel 0x00400000 0x00060000 0
active partition: nor0,0 - (uboot) 0x00040000 @ 0x00000000
defaults:
mtdids : nor0=physmap-flash.0
mtdparts: mtdparts=physmap-flash.0:256k(uboot)ro,128k(ubootenv),4096k(kernel)
So my environment is located at 0xc0040000. My /proc/mtd is:
dev: size erasesize name
mtd0: 00800000 00020000 "NOR flash on Clever"
mtd1: 00040000 00020000 "uboot"
mtd2: 00020000 00020000 "ubootenv"
mtd3: 00400000 00020000 "Kernel"
My fw_env.config is:
/dev/mtd2 0x0000 0x20000 0x20000
When I copy the /dev/mtd2 to a file I see the environment variables from U-Boot. This starts with "G?wbootdelay=5"
When I do a fw_setenv bootdelay 4, it says "Warning: Bad CRC, using default environment". But if I use then fw_printenv everything is fine.
If I copy the contents of /dev/mtd2 to a file is starts with: "? U(bootcmd=bootp". So I can write the environment from linux but not read it from u-boot.
If I restarts my board U-boot compains about a bad CRC (this is the expected result). So I looks like the offsets are wrong because my kernel image get damaged after saving the environment from linux.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-03-04 8:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 10:25 [U-Boot] Problems with fw_printenv Ronald Kortekaas
2010-03-03 20:21 ` Wolfgang Denk
2010-03-04 6:14 ` Ronald Kortekaas
2010-03-04 8:55 ` Wolfgang Denk
2010-03-04 7:26 ` Ronald Kortekaas
2010-03-04 8:57 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2010-03-03 9:14 Ronald Kortekaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.