Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41122 )
Change subject: cbfstool: Add support for platform "fixups" when modifying bootblock ......................................................................
Patch Set 14:
(2 comments)
https://review.coreboot.org/c/coreboot/+/41122/8/util/cbfstool/platform_fixu... File util/cbfstool/platform_fixups.c:
https://review.coreboot.org/c/coreboot/+/41122/8/util/cbfstool/platform_fixu... PS8, Line 14: size_t search_end_size = MIN(0, buffer_size(in) - 32 * KiB);
Should we ensure buffer_size(in) >= 32KiB?
I don't think it's necessary? In practice bootblocks will probably always be larger than that but I don't see a need to restrict things here.
https://review.coreboot.org/c/coreboot/+/41122/8/util/cbfstool/platform_fixu... PS8, Line 29: return NULL; /* Doesn't seem to be a Qualcomm image. */
because it matched w/ too early?
No, this means that we haven't found anything in the first 32KB. search_end_size is the size that the buffer shrinks to after we have buffer_seek()ed over 32KB. Added a comment to explain that better.