[U-Boot] first u-boot program
Wolfgang Denk
wd at denx.de
Wed Jun 2 14:07:44 CEST 2010
Dear Maxime Boure,
In message <AANLkTin86aE1ZzqYZI0UvyarrUex_0-gD5TAvPNtrsB3 at mail.gmail.com> 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...
> 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.
> 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 ;-)
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
Landing: a controlled mid-air collision with a planet.
More information about the U-Boot
mailing list