From: Andre Schwarz <andre.schwarz@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] data alignment problem with redundant env
Date: Thu, 31 Mar 2011 17:30:42 +0200 [thread overview]
Message-ID: <4D949E22.5090000@matrix-vision.de> (raw)
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
next reply other threads:[~2011-03-31 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 15:30 Andre Schwarz [this message]
2011-03-31 15:39 ` [U-Boot] data alignment problem with redundant env 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D949E22.5090000@matrix-vision.de \
--to=andre.schwarz@matrix-vision.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox