Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37262 )
Change subject: util: cbfstool: Check alignment at build time ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37262/11/Documentation/lib/flashmap... File Documentation/lib/flashmap.md:
https://review.coreboot.org/c/coreboot/+/37262/11/Documentation/lib/flashmap... PS11, Line 114: must be aligned to erase block (e.g., 4k).
This tests both offset and size alignment, maybe we should make the documentation more explicit abou […]
To tie this to true erase block sizes, we could factor out the erase size definitions from src/drivers/spi/$vendor.c so cbfstool can link them in, and pass the Kconfig flags that say which of these drivers to use into cbfstool as well: that way it could verify against real world data at compile time.
Could (and should) be a follow-up, but my main thrust was mostly that there are several places were the CL talks about "e.g. 4k" without ever stating what it is actually using).