[U-Boot] [PATCH] tools/envcrc: add --binary option to export embedded env
Mike Frysinger
vapier at gentoo.org
Tue Apr 28 01:55:07 CEST 2009
On Monday 27 April 2009 18:15:58 Wolfgang Denk wrote:
> In message Mike Frysinger wrote:
> > The --binary option to envcrc can be used to export the embedded env as a
> > binary blob so that it can be manipulated/examined/whatever externally.
> >
> > @@ -77,19 +78,55 @@ extern unsigned char environment;
> > int main (int argc, char **argv)
> > {
> > #ifdef ENV_IS_EMBEDDED
> > + unsigned char pad = 0x00;
>
> Should we not rather use 0xFF for padding - given that the envrionment
> is frequently stored in NOR flash?
i would love to (and with the Blackfin stuff, i do just that), but the problem
is that there is no way of forcing the embedded environment to 0xff pad that i
know of ...
so, to keep the most common behavior from changing (the char[] env is embedded
in the .data section padded with 0x00), the padding defaults to 0x00. this
way `envcrc` outputs the right value (see common/Makefile).
for people (like me) who are using --binary to extract the env blob, we can do
--binary=0xff and get what you're talking about.
i could extend the behavior so that using plain "--binary" is the same thing
as "--binary=0xff" ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090427/e6a7a6cb/attachment-0001.pgp
More information about the U-Boot
mailing list