projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move CBFS header to a safer place.
[coreboot.git]
/
util
/
cbfstool
/
util.c
diff --git
a/util/cbfstool/util.c
b/util/cbfstool/util.c
index 054436d8ca763472a130ac8319836d0f31209c64..aa7c2183fc88f3ea51d4156693d217f48f55d9bf 100644
(file)
--- a/
util/cbfstool/util.c
+++ b/
util/cbfstool/util.c
@@
-220,7
+220,7
@@
int create_rom(struct rom *rom, const unsigned char *filename,
/* This is a pointer to the header for easy access */
rom->header = (struct cbfs_header *)
/* This is a pointer to the header for easy access */
rom->header = (struct cbfs_header *)
- ROM_PTR(rom, rom->size -
16 -
bootblocksize - sizeof(struct cbfs_header));
+ ROM_PTR(rom, rom->size - bootblocksize - sizeof(struct cbfs_header));
rom->header->magic = htonl(HEADER_MAGIC);
rom->header->romsize = htonl(romsize);
rom->header->bootblocksize = htonl(bootblocksize);
rom->header->magic = htonl(HEADER_MAGIC);
rom->header->romsize = htonl(romsize);
rom->header->bootblocksize = htonl(bootblocksize);
@@
-233,7
+233,7
@@
int create_rom(struct rom *rom, const unsigned char *filename,
/* Write the cbfs master header address at the end of the ROM. */
ROM_WRITEL(rom, rom->size - 4,
/* Write the cbfs master header address at the end of the ROM. */
ROM_WRITEL(rom, rom->size - 4,
- 0xFFFFFFF
0 - bootblocksize - sizeof(struct cbfs_header)
);
+ 0xFFFFFFF
F - bootblocksize - sizeof(struct cbfs_header) + 1
);
/* write the empty header */
rom_set_header(rom, (struct cbfs_file *)rom->ptr, "", -1, CBFS_COMPONENT_NULL);
/* write the empty header */
rom_set_header(rom, (struct cbfs_file *)rom->ptr, "", -1, CBFS_COMPONENT_NULL);