public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] data alignment problem with redundant env
@ 2011-03-31 15:30 Andre Schwarz
  2011-03-31 15:39 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Andre Schwarz @ 2011-03-31 15:30 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-06  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31 15:30 [U-Boot] data alignment problem with redundant env Andre Schwarz
2011-03-31 15:39 ` Wolfgang Denk
2011-03-31 15:48   ` Andre Schwarz
2011-03-31 16:01     ` Wolfgang Denk
2011-03-31 16:41       ` Andre Schwarz
2011-04-06  9:05       ` Andre Schwarz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox