From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlef Vollmann Date: Tue, 27 Mar 2007 23:07:15 +0200 Subject: [U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE References: <200703271327.00147.rgetz@blackfin.uclinux.org> Message-ID: <46098783.715A4905@vollmann.ch> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Robin Getz wrote: > In [u-boot.git] / common / env_flash.c around line 171 there is a > > #if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE > > to be able to mix other data, and the environment info. (Where 'other data' > could be U-Boot code). > > However, in an email a few days ago: > > On 3/26/07, Wolfgang Denk wrote: > > In message <46040C60.5070505@inaccessnetworks.com> you wrote: > > > I have a flash chip with equally sized sectors and I don't want to waste > > > an entire sector for the environment. I have the u-boot environment > > > embedded in the u-boot sector. The declarations in my board file are: > > > > Do not do this. Do NOT do this. DO NOT DO THIS. > > > > Please never mix U-Boot code and environment data in one sector. > > Always use a separate sector (or two) for the environment. > > If that is the recommendation (which is fine), why have this code snippet in > there, and not add something like: > > #error Do not do this. Do NOT do this. DO NOT DO THIS. There is other data that you can put into the same sector as the U-Boot environment. In our BSP, we use it for data written there at production, in another project we use it for data that is read from Linux but must stay outside the Linux kernel and filesystem image. Detlef -- Detlef Vollmann vollmann engineering gmbh Linux and C++ for Embedded Systems http://www.vollmann.ch/ Linux for PXA270 Colibri module: http://www.vollmann.ch/en/colibri/