On Wed, Jun 30, 2010 at 11:37 PM, Vipin KUMAR <vipin.ku...@st.com> wrote: > 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
I can't take credit for the idea -- it is Harald's. The original patch from Harald Welte wrote the env offset to bytes 8..15 explicitly. The location in the OOB to which the env offset is written was made implicit when I ported to write_oob using struct mtd_oob_ops with mode MTD_OOB_AUTO as suggested by Scott Wood in the review of Harald's patch [1]. With MTD_OOB_AUTO the reads+writes should be performed automatically in the 'free' region of the OOB (specified by the .oobfree member of nand_ecclayout). At least that's what is supposed to be happening... I welcome any further concerns that you may have. Best Regards, Ben Gardiner [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/43916 -- Nanometrics Inc. +1 (613) 592-6776 x239 http://www.nanometrics.ca _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot