From: Srinath Iyengar Date: Mon, 10 Dec 2007 16:05:14 +0530 Subject: [U-Boot-Users] U-boot Single image which can handle multiple flash sector size In-Reply-To: <200712101125.03407.sr@denx.de> References: <2db382350712100155m6665b88dufd040e511c1b402d@mail.gmail.com> <200712101125.03407.sr@denx.de> Message-ID: <2db382350712100235rf78eaa5kb9d0550bceb01bdf@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, Sure I will post it to mailing list and try your suggestions. Thanks and Regards Srinath On 12/10/07, Stefan Roese wrote: > > 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. > > On Monday 10 December 2007, Srinath Iyengar wrote: > > 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 > > any of these flashes.* > > Should be possible with the CFI driver. > > > Currently I have found the means to get it work with compile time option > to > > 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. > > > (There should be some means by which I can determine > CFG_FLASH_SECT_SIZE, > > 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 > > with > > compile time option for finding CFG_FLASH_SECT_SIZE, CFG_ENV_SECT_SIZE > and > > dependent Macros) > > Yes, a dynamic sector size configuration would be good. > > > 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. > > 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