Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42029 )
Change subject: drivers/vpd: Add a function that reads BIOS version from a VPD variable ......................................................................
Patch Set 4:
The story from that patch looks like they want to find a away for OS to read firmware version easily, without accessing SMBIOS. And that does not sound like a correct approach.
Oh... I think I may have figured out what these two patches are planning to do.
To identify the version of a static firmware image (file), currently (if no vboot) there's no easy way. But if we put version in VPD, then you have the 'vpd' utility that can read (even set) from firmware. So they may have put the vpd stuff in the build procedure for that purpose.
But the VPD by design (although not strictly enforced) was expected to be empty in build procedure, and only provisioned when being manufactured. Moreover, if you use the reference updater (futility update), VPD will be preserved when updating BIOS, which means you'll not get the right version string.
IMHO a more correct implementation is:
1. If you use FMAP, define a version section explicitly, and fill the section in your build procedure where you can still access CONFIG_LOCAL_VERSION.
2. If FMAP is not an option, create a file like 'coreboot_version' and put that into CBFS may be easier, so you can still extract and read using cbfstool.