From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Schwarz Date: Thu, 31 Mar 2011 17:30:42 +0200 Subject: [U-Boot] data alignment problem with redundant env Message-ID: <4D949E22.5090000@matrix-vision.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, moving to latest U-Boot introduces some issues with the environment. Setup: - PowerPC based boards (52xx / 83xx) - Environments are in flash with redundancy Dumping flash the environments with dd and using hexdump shows : - crc32 - flags Data (first entry beginning with 'a'). 0000000: b0ea 7858 0100 64... 0000010: ... Regarding to include/environment.h data is "unsigned char" as well as data[]. To me it looks like 2-byte wide flags (or 16-bit alignment of data) is wrong. Although env modification within u-boot only is safe it breakother tools modifying the environment within e.g. Linux. This happened somewhere between v2010.9 and current master. Back then U-Boot env data started on byte 5. Do we need an attribute(packed) on the env struct ? Any help is welcome. Regards, Andr? MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner