Attention is currently required from: Arthur Heymans. Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/63035
to review the following change.
Change subject: util/ifittool: Fix clearing FIT when setting the pointer ......................................................................
util/ifittool: Fix clearing FIT when setting the pointer
When setting the FIT pointer, the FIT table is only known later in the boot process.
Change-Id: I658f4fffa997d1f7beaf6d6ae37d2885ae602e5c Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/cbfstool/ifittool.c 1 file changed, 15 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/63035/1
diff --git a/util/cbfstool/ifittool.c b/util/cbfstool/ifittool.c index c2a5221..88a973c 100644 --- a/util/cbfstool/ifittool.c +++ b/util/cbfstool/ifittool.c @@ -308,13 +308,12 @@ ERROR("FIT not found.\n"); return 1; } - } - - if (clear_table) { - if (fit_clear_table(fit)) { - partitioned_file_close(image_file); - ERROR("Failed to clear table.\n"); - return 1; + if (clear_table) { + if (fit_clear_table(fit)) { + partitioned_file_close(image_file); + ERROR("Failed to clear table.\n"); + return 1; + } } }
@@ -394,6 +393,15 @@ return 1; } fit = fit_get_table(&bootblock, convert_to_from_top_aligned, topswap_size); + + if (clear_table) { + if (fit_clear_table(fit)) { + partitioned_file_close(image_file); + ERROR("Failed to clear table.\n"); + return 1; + } + } + break; } case DEL_OP: