summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Sacré <dominic.sacre@gmx.de>2014-11-05 00:30:18 +0100
committerTom Rini <trini@ti.com>2014-11-07 16:27:07 -0500
commitea19527c209b0d97b532a8dc5bf28f2cdd016888 (patch)
tree62c64e36bf5c74df3e896f809d3df5de8c3988e4
parentc4c2e14102de60806e573c7132dadfd967c76fab (diff)
downloadu-boot-imx-ea19527c209b0d97b532a8dc5bf28f2cdd016888.zip
u-boot-imx-ea19527c209b0d97b532a8dc5bf28f2cdd016888.tar.gz
u-boot-imx-ea19527c209b0d97b532a8dc5bf28f2cdd016888.tar.bz2
tools/env: Fix environment size and CRC on 64-bit hosts
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>
-rw-r--r--tools/env/fw_env.c2
1 files changed, 1 insertions, 1 deletions
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);