aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/util.c')
-rw-r--r--util/cbfstool/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/cbfstool/util.c b/util/cbfstool/util.c
index f77b74634b..e1da4cb6fc 100644
--- a/util/cbfstool/util.c
+++ b/util/cbfstool/util.c
@@ -158,6 +158,11 @@ int open_rom(struct rom *rom, const char *filename)
}
rom->size = ntohl(rom->header->romsize);
+ /* compute a 32-bit value of rombase.
+ * This does the right thing on 64-bit machines.
+ */
+ rom->rombase = 0-rom->size;
+ rom->rombase &= 0xffffffff;
rom->fssize = rom->size - ntohl(rom->header->bootblocksize);
return 0;