From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reda MIMOUNE Date: Fri, 17 Sep 2010 14:48:21 +0200 Subject: [U-Boot] RE : RE : Davinci DM365 custom design : Problem when reading uBoot environment variables In-Reply-To: <20100917123721.0A2D015242D@gemini.denx.de> References: <1918F436C366B34BB245DD28389E039453ADFAAD1E@mars.easii.fr> <20100915131514.7792c2ea@schlenkerla.am.freescale.net> <1918F436C366B34BB245DD28389E039453ADFAAD1F@mars.easii.fr>, <20100916115516.131b884d@schlenkerla.am.freescale.net> <1918F436C366B34BB245DD28389E039453ADFAAD25@mars.easii.fr>, <20100917123721.0A2D015242D@gemini.denx.de> Message-ID: <1918F436C366B34BB245DD28389E039453ADFAAD2A@mars.easii.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Wolfgang Thanks for answering. Good to see that mkimage would be ok with both versions. What do I fear ? I traditionnaly saw many problems of version coherence between binaries and tools generating them. Now I prefer to ask. Concerning the #define, I made a mistake when recopying. this should be OK. #define CFG_ENV_SECT_SIZE SZ_128K /* Env sector Size = 128KB*/ #define CFG_ENV_SIZE SZ_128K /* 128KB is 1-Block size without counting spare*/ Concerning the size of 128KB. Obviously it is too much. I think it too. But reading the README file, here is what I read: Note: CFG_ENV_OFFSET and CFG_ENV_OFFSET_REDUND must be aligned to a block boundary, and CFG_ENV_SIZE must be a multiple of the NAND devices block size. Since my sectors/blocks are 128KB, I must be at least 128KB! Is the README file wrong ? Thanks for your help. Reda ________________________________________ De : Wolfgang Denk [wd at denx.de] Date d'envoi : vendredi 17 septembre 2010 14:37 ? : Reda MIMOUNE Cc : Scott Wood; u-boot at lists.denx.de Objet : Re: [U-Boot] RE : Davinci DM365 custom design : Problem when reading uBoot environment variables Dear Reda MIMOUNE, In message <1918F436C366B34BB245DD28389E039453ADFAAD25@mars.easii.fr> you wrote: > > Have a question about it, if I upgrade to a new version of uBoot. Is it guaranteed that mkimage > will wrap the uboot binary the same way. Is mkimage the same version ? Of course mkimage is not the same version. When upgrade to a new version of U-Boot, you also get a new version of mkimage. > If yes, I think I will upgrade. Where would you expect problems? You can build and test the new version of mkimage before updating the U-Boot image on your target board. And you can keep the old mkimage tool around for reference as well. > Of course, I understood that. My question was in the config file. I put this: > > #define CFG_ENV_SECT_SIZE SZ_16K > #define CFG_ENV_SIZE SZ_128K This makes no sense. I doubt that your NAND flash has 16 kB sectors. Also I seriously doubt that you need 128 kB for environment. > I saw something equivalent in the Evalution board of Davinci DM365 so it should not be > impossible. Please do not copy code without thinking. 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 All this doesn't alter anything, you know. The world is still full of stupid people. They don't use their brains. They don't seem to want to think straight. - Terry Pratchett, _Soul Music_