* [U-Boot] [PATCH] tools/env: Fix environment size and CRC on 64-bit hosts
@ 2014-11-04 23:30 Dominic Sacré
2014-11-10 21:27 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Dominic Sacré @ 2014-11-04 23:30 UTC (permalink / raw)
To: u-boot
On architectures where 'long' is 64 bit, the u-boot environment
as seen by the fw_env tools was missing 4 bytes.
This patch fixes getenvsize(), and thus also ensures that the
environment's CRC32 checksum is calculated correctly.
Signed-off-by: Dominic Sacr? <dominic.sacre@gmx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
---
tools/env/fw_env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 30d5b03..1173eea 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -125,7 +125,7 @@ static int get_config (char *);
#endif
static inline ulong getenvsize (void)
{
- ulong rc = CUR_ENVSIZE - sizeof(long);
+ ulong rc = CUR_ENVSIZE - sizeof(uint32_t);
if (HaveRedundEnv)
rc -= sizeof (char);
--
2.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-10 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 23:30 [U-Boot] [PATCH] tools/env: Fix environment size and CRC on 64-bit hosts Dominic Sacré
2014-11-10 21:27 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox