Skip to contentSkip to conversation

U-boot Single image which can handle multiple flash sector size

U-Boot-Users Srinath Iyengar 1 participant 1 message Dec 10, 2007 2 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive

Hi Stefan,

Sure I will post it to mailing list and try your suggestions.

Thanks and Regards
Srinath

Quoted 58 lines · Stefan Roese

Hi Srinath,

one note in front. Please send such questions to the mailing list. So a lot of
other talented people have to opportunity answer our questions.

Quoted 11 lines · Srinath Iyengar

I have an arm based board which can have one of the following serial flashes

8 MB flash with 64K sector size

16 MB flash with 64K sector size
16 MB flash with 265K sector size

*My objective is to have a single u-boot binary (Image) which can

handle

Quoted 1 line

any of these flashes.*

Should be possible with the CFI driver.

Quoted 1 line

Currently I have found the means to get it work with compile time option

to

Quoted 5 lines

differentiate between 64KB and 256KB sector size of Flash.

I am finding it difficult to fix the issues with CFG_FLASH_SECT_SIZE and CFG_ENV_SECT_SIZE
or CFG_ENV_SIZE values dynamically.

Correct. Currently this is not supported.

Quoted 1 line

(There should be some means by which I can determine

CFG_FLASH_SECT_SIZE,

Quoted 3 lines

eventually CFG_ENV_SECT_SIZE and CFG_ENV_SIZE
after knowing the details about FLASH (probe).Even though we are filling flash_info structure data after probing about flash we still have to

live

Quoted 2 lines

with
compile time option for finding CFG_FLASH_SECT_SIZE, CFG_ENV_SECT_SIZE

and

Quoted 1 line

dependent Macros)

Yes, a dynamic sector size configuration would be good.

Quoted 2 lines

Please let me know if my requirement is conflating with U-boot design objectives in handling flash and any suggestions to fix this issue.

An easy way to handle all your flash chips in one image (without this dynamic
sector size detection) would be, if you set the CFG_ENV_SECT_SIZE to the max
size you can have, that is 256k. You should set CFG_ENV_SIZE to a smaller size, something like 16k, so that saving the environment doesn't take too long.

Quoted 9 lines

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071210/d3547d9d/attachment.htm