From: Tom Rini Date: Mon, 15 Aug 2016 21:11:19 -0400 Subject: [U-Boot] [U-Boot, RFC:, v2] tools/env: ensure environment starts at erase block boundary In-Reply-To: <1470944357-3745-1-git-send-email-andreas.fenkart@digitalstrom.com> References: <1470944357-3745-1-git-send-email-andreas.fenkart@digitalstrom.com> Message-ID: <20160816011119.GR5342@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Aug 11, 2016 at 09:39:17PM +0200, Andreas Fenkart wrote: > 56086921 added support for unaligned environments access. > U-boot itself does not support this: > - env_nand.c fails when using an unaligned offset. It produces an > error in nand_erase_opts{drivers/mtd/nand/nand_util.c} > - in env_sf/env_flash the unused space at the end is preserved, but > not in the beginning. block alignment is assumed > - env_sata/env_mmc aligns offset/length to the block size of the > underlying device. data is silently redirected to the beginning of > a block > > There is seems no use case for unaligned environment. If there is > some useful data at the beginning of the the block (e.g. end of u-boot) > that would be very unsafe. If the redundant environments are hosted by > the same erase block then that invalidates the idea of double buffering. > It might be that unaligned access was allowed in the past, and that > people with legacy u-boot are trapped. But at the time of 56086921 > it wasn't supported and due to reasons above I guess it was never > introduced. > I prefer to remove that (unused) feature in favor of simplicity > > Signed-off-by: Andreas Fenkart > Acked-by: Stefan Agner Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: