MCPcopy Create free account
hub / github.com/coreboot/coreboot / ifwi_repack

Function ifwi_repack

util/cbfstool/ifwitool.c:1275–1289  ·  view source on GitHub ↗

* Calculate size and offset of each sub-partition again since it might have * changed because of add/delete operation. Also, re-create BPDT and S-BPDT * entries and write back the new IFWI image to file. */

Source from the content-addressed store, hash-verified

1273 * entries and write back the new IFWI image to file.
1274 */
1275static void ifwi_repack(void)
1276{
1277 bpdt_reset();
1278 bpdt_entries_init_header_order();
1279 bpdt_entries_init_pack_order();
1280
1281 struct bpdt *b = buffer_get(&ifwi_image.bpdt);
1282 bpdt_print_entries(&b->e[0], b->h.descriptor_count, "BPDT");
1283
1284 b = buffer_get(&ifwi_image.subpart_buf[S_BPDT_TYPE]);
1285 bpdt_print_entries(&b->e[0], b->h.descriptor_count, "S-BPDT");
1286
1287 DEBUG("Repack done.. writing image.\n");
1288 ifwi_write(param.image_name);
1289}
1290
1291static void init_subpart_dir_header(struct subpart_dir_header *hdr,
1292 size_t count, const char *name)

Callers 1

mainFunction · 0.70

Calls 6

bpdt_resetFunction · 0.85
buffer_getFunction · 0.85
bpdt_print_entriesFunction · 0.85
ifwi_writeFunction · 0.85

Tested by

no test coverage detected