Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41209 )
Change subject: fw_config: Add firmware configuration interface ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41209/2/src/include/fw_config.h File src/include/fw_config.h:
https://review.coreboot.org/c/coreboot/+/41209/2/src/include/fw_config.h@9 PS2, Line 9:
mainboards themselves can't include code to static.c currently
I'd be curious why that is, what was the exact problem? I thought static.c is treated like any other stage source file once it is generated.
It is because static.c is entirely generated and the only #includes come from other chips. (except mainboard because it is special) So if you try to provide something from the mainboard itself it has to be included indirectly from another chip.
I did manage to get this to work with a chip.h in the mainboard directory with one small change to sconfig. Not needed now but this wasn't as bad as it seemed.
The devicetree approach is actually looking good after some more work with sconfig today, I appreciate the pushback and forcing me to re-evaluate because I like how it integrates now.
This also makes it easy for variants to add new fields and new options to existing fields in overridetree.cb.
It will take a few days to get everything else done and update the docs.