From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vipin KUMAR Date: Thu, 01 Jul 2010 09:07:00 +0530 Subject: [U-Boot] [PATCH v3] NAND: environment offset in OOB (CONFIG_ENV_OFFSET_OOB) In-Reply-To: <1277933528-8335-1-git-send-email-bengardiner@nanometrics.ca> References: <1275341386-25583-1-git-send-email-bengardiner@nanometrics.ca> <1277933528-8335-1-git-send-email-bengardiner@nanometrics.ca> Message-ID: <4C2C0D5C.7010702@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 7/1/2010 3:02 AM, Ben Gardiner wrote: > This is a re-submission of the patch by Harald Welte > with minor modifications for rebase and changes > as suggested by Scott Wood [1] [2]. > > This patch enables the environment partition to have a run-time dynamic > location (offset) in the NAND flash. The reason for this is simply that > all NAND flashes have factory-default bad blocks, and a fixed compile > time offset would mean that sometimes the environment partition would > live inside factory bad blocks. Since the number of factory default > blocks can be quite high (easily 1.3MBytes in current standard > components), it is not economic to keep that many spare blocks inside > the environment partition. > > With this patch and CONFIG_ENV_OFFSET_OOB enabled, the location of the > environment partition is stored in the out-of-band (OOB) data of the > first block in flash. Since the first block is where most systems boot > from, the vendors guarantee that the first block is not a factory > default block. > > This patch introduces the 'nand env.oob' command, which can be called from > the u-boot command line. 'nand env.oob get' reads the address of the > environment partition from the OOB data, > 'nand env.oob set {offset,partition-name}' allows the setting of the marker > by specifying a numeric offset or a partition name. > Hello Ben, This is a nice idea. I see that the logic needs 8bytes at offset 0 in block 0 oob area. This means that it would also overwrite the offset 5 (which is the bad block marker in case of small page devices) and offset 0 (bad block marker in large page devs) Am I missing something here Regards Vipin