Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37262 )
Change subject: util: cbfstool: Check alignment at build time ......................................................................
Patch Set 7:
(3 comments)
https://review.coreboot.org/c/coreboot/+/37262/6//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37262/6//COMMIT_MSG@20 PS6, Line 20: FMAP%@0x1000 0x800
nit: I feel conceptually this would look better as […]
alignment actually applies to both offset and size but well, if you think that would make more sense I can also change to that. will be slightly harder to parsing but can be done.
One ambiguity is if we want to allow alignment to different values in future, '% size' and '%align' will e considered as same in current syntax (since we ate all spaces).
But well, let's worry about that when really seeing a need to specify different alignment.
One simple solution is to request the alignment always specified after %, e.g.,
%0 for unaligned.
https://review.coreboot.org/c/coreboot/+/37262/6/util/cbfstool/fmap_from_fmd... File util/cbfstool/fmap_from_fmd.c:
https://review.coreboot.org/c/coreboot/+/37262/6/util/cbfstool/fmap_from_fmd... PS6, Line 39: Non-CBFS
nit: doesn't really have anything to do with CBFS?
that's right. in my early version I've disabled alignment check for CBFS sections so that's why you'd see it.
Will remove.
https://review.coreboot.org/c/coreboot/+/37262/6/util/cbfstool/fmd_parser.y File util/cbfstool/fmd_parser.y:
https://review.coreboot.org/c/coreboot/+/37262/6/util/cbfstool/fmd_parser.y@... PS6, Line 112: $$.v = $1.v | $3.v;
I am unclear why this is $1 and $3 here but $1 and $2 in the seemingly equivalent case above. […]
$n means number of token, more like awk.
In this case ',' is $2.