diff options
Diffstat (limited to 'util/cbfstool/util.c')
-rw-r--r-- | util/cbfstool/util.c | 5 |
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; |