[U-Boot] [PATCH] tools/envcrc: add --binary option to export embedded env
Wolfgang Denk
wd at denx.de
Tue Apr 28 00:15:58 CEST 2009
Dear Mike Frysinger,
In message <1239015670-28314-1-git-send-email-vapier at gentoo.org> you 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.
>
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
> tools/envcrc.c | 45 +++++++++++++++++++++++++++++++++++++++++----
> 1 files changed, 41 insertions(+), 4 deletions(-)
>
> diff --git a/tools/envcrc.c b/tools/envcrc.c
> index 4334cdf..ac24967 100644
> --- a/tools/envcrc.c
> +++ b/tools/envcrc.c
> @@ -24,6 +24,7 @@
> #include <stdio.h>
> #include <stdint.h>
> #include <stdlib.h>
> +#include <string.h>
> #include <unistd.h>
>
> #ifndef __ASSEMBLY__
> @@ -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?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all possible committee reactions to any given agenda item, the
reaction that will occur is the one which will liberate the greatest
amount of hot air. -- Thomas L. Martin
More information about the U-Boot
mailing list