diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/cbfstool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 80e3895036..57db97c6e3 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -201,6 +201,8 @@ static int cbfs_add_component(const char *filename, return 1; } + uint32_t header_size = cbfs_calculate_file_header_size(name); + if (convert && convert(&buffer, &offset) != 0) { ERROR("Failed to parse file '%s'.\n", filename); buffer_delete(&buffer); @@ -211,7 +213,8 @@ static int cbfs_add_component(const char *filename, offset = convert_to_from_top_aligned(param.image_region, -offset); - if (cbfs_add_entry(&image, &buffer, name, type, offset, 0) != 0) { + if (cbfs_add_entry(&image, &buffer, name, type, offset, header_size) + != 0) { ERROR("Failed to add '%s' into ROM image.\n", filename); buffer_delete(&buffer); return 1; |