Dear Wolfgang Denk

On Wed, Jun 2, 2010 at 2:07 PM, Wolfgang Denk <[email protected]> wrote:
> Dear Maxime Boure,
>
> In message <[email protected]> you 
> wrote:
>>
>> >> #define CONFIG_SYS_ENV_SECT_SIZE      boot_flash_sec
>> >> #define CONFIG_ENV_OFFSET             boot_flash_off
>> >> #define ONENAND_ENV_OFFSET            0x200000 /* environment starts here 
>> >> */
>> >> #define CONFIG_ENV_ADDR                       ONENAND_ENV_OFFSET
>> >
>> > Well, and what are the seffings for boot_flash_sec, boot_flash_off ?
>> My settings :
>> boot_flash_base 0x20000000 boot_flash_off 0x200000 boot_flash_sec
>> 0x20000 boot_flash_env_addr 0x200000
>
> CONFIG_ENV_SIZE is still missing...

#define CONFIG_ENV_SIZE                 SZ_512K /* Total Size Environment *
and
#define SZ_512K           0x00080000

>
>> Device offset --> if I set /dev/mtd2 and this mtd is the one with the
>> environment it has to be set to 0x0000
>
> Right, this matches your MTD settings (partition mtd2 starts at the
> same offset 0x200000.
>
> However, in your board configuration above I see that CONFIG_ENV_ADDR
> (which is supposed to be an *address* is defined with an *offset*
> value. This looks wrong to me. I would be surprised if this works, but
> then - I haven't worked with OneNAND yet.
>
>> Env. size --> the size is 0x80000
>
> I cannot comment on this - I haven't seen the CONFIG_ENV_SIZE settings
> from your board config. It could be as well that you have two
> redundant copies (of smaller size, obviously) in your partition.
>
>> Flash sector size --> is the erase block size so in my case 0x40000
>
> Above you write that CONFIG_SYS_ENV_SECT_SIZE = boot_flash_sec =
> 0x20000. This is inconsistent, then.
>

I tried with this configuration in fw_env.config :
/dev/mtd2               0x0000          0x80000         0x20000

I had this error with the command fw_printenv :
Too few good blocks within range

>> Number of sectors ---> well ... I don't really know :)
>
> This depends on the sizes, and on how many redundant copies you
> maintain. We don't know your board config file...
>
>> I am wrong ?
>
> Yes - otherwise there would be no problems ;-)

Indeed...

>
> 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: [email protected]
> Landing: a controlled mid-air collision with a planet.
>

Best regards,

Maxime
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to