Re: [U-Boot] first u-boot program

Dear Maxime Boure,
please keep the mailing list on Cc:
In message AANLkTin4majod0Rc-nCxbgHrCdY4VY2OlptQyAQS4cjE@mail.gmail.com you wrote:
Sorry to have sent my mail in HTML I forgot to take it off.
You might also want to quote the previous message so everybody knows what you are referring to. It may be obvious foir you, but I'm replying to _many_ messages per day, and a bit of context would be welcome. Please see http://www.netmeister.org/news/learn2quote.html
This is my uboot env :
This is not what I asked for. What I menat was: how are the envrionemnt sectors configured in your flash, i. e. what are the CONFIG.*ENV settings?
I am currently using a IGEP board based on an omap3530 with a onenand of 512mo (don't realy know what kind of information you need :))
It tells me that it's an out of tree port, so we cannot help you.
Best regards,
Wolfgang Denk

Dear Wolfgang Denk
Dear Maxime Boure,
please keep the mailing list on Cc:
In message AANLkTin4majod0Rc-nCxbgHrCdY4VY2OlptQyAQS4cjE@mail.gmail.com you wrote:
Sorry to have sent my mail in HTML I forgot to take it off.
You might also want to quote the previous message so everybody knows what you are referring to. It may be obvious foir you, but I'm replying to _many_ messages per day, and a bit of context would be welcome. Please see http://www.netmeister.org/news/learn2quote.html
Sorry again not my daily routine...
This is my uboot env :
This is not what I asked for. What I menat was: how are the envrionemnt sectors configured in your flash, i. e. what are the CONFIG.*ENV settings?
Is this it ?
#define PISMO1_ONEN_SIZE GPMC_SIZE_128M /* Configure the PISMO */
#define CONFIG_SYS_FLASH_BASE boot_flash_base
#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
#define CONFIG_ENV_IS_IN_ONENAND 1
#define CONFIG_ENV_SIZE SZ_512K /* Total Size Environment */
#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
#define CONFIG_MTD_ONENAND_2X_PROGRAM
/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN SZ_256K /* Reserve 2 sectors */
I am currently using a IGEP board based on an omap3530 with a onenand of 512mo (don't realy know what kind of information you need :))
It tells me that it's an out of tree port, so we cannot help you.
Well thank you for your time !
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@denx.de Certainly there are things in life that money can't buy, but it's very funny - Did you ever try buying them without money? - Ogden Nash

Dear Maxime Boure,
In message AANLkTikp1Id70dTzpOwc1KrcpkQxjYAPzTYvB_lbCFJM@mail.gmail.com you wrote:
This is not what I asked for. What I menat was: how are the envrionemnt sectors configured in your flash, i. e. what are the CONFIG.*ENV settings?
Is this it ?
Nearly...
#define CONFIG_ENV_IS_IN_ONENAND 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Your environment is in OneNAND?
#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 ?
Eventually you want to check the tools/env/ code if it really supports OneNAND as well, and try to debug it. I don't think this has ever been tested with OneNAND yet.
Best regards,
Wolfgang Denk

Dear Wolfgang Denk
Dear Maxime Boure,
In message AANLkTikp1Id70dTzpOwc1KrcpkQxjYAPzTYvB_lbCFJM@mail.gmail.com you wrote:
This is not what I asked for. What I menat was: how are the envrionemnt sectors configured in your flash, i. e. what are the CONFIG.*ENV settings?
Is this it ?
Nearly...
#define CONFIG_ENV_IS_IN_ONENAND 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Your environment is in OneNAND?
#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
Eventually you want to check the tools/env/ code if it really supports OneNAND as well, and try to debug it. I don't think this has ever been tested with OneNAND yet.
I don't want to bother you to much I will look into that. But can you enlighten me on the fields of the fw_env.config.
Device offset --> if I set /dev/mtd2 and this mtd is the one with the environment it has to be set to 0x0000 Env. size --> the size is 0x80000 Flash sector size --> is the erase block size so in my case 0x40000 Number of sectors ---> well ... I don't really know :)
I am wrong ?
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@denx.de Many aligators will be slain, but the swamp will remain.
Best regards,
Maxime

Dear Maxime Boure,
In message AANLkTin86aE1ZzqYZI0UvyarrUex_0-gD5TAvPNtrsB3@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

Dear Wolfgang Denk
On Wed, Jun 2, 2010 at 2:07 PM, Wolfgang Denk wd@denx.de wrote:
Dear Maxime Boure,
In message AANLkTin86aE1ZzqYZI0UvyarrUex_0-gD5TAvPNtrsB3@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...
#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: wd@denx.de Landing: a controlled mid-air collision with a planet.
Best regards,
Maxime
participants (2)
-
Maxime Boure
-
Wolfgang Denk