
Dear Mike Frysinger,
In message 1239015670-28314-1-git-send-email-vapier@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@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