Hello all,
Is there a way to read the coreboot version (as a string or as binary chain) from inside the build coreboot.rom file.
We wish to upgrade the binary in the flash ROM (by a userspace tool calling 'flashrom') only when necessary. Reading the flashed version can be made by a 'cat /sys/class/dmi/id/bios_version'. What is missing is the version of the "new" binary to compare them.
Kind regards, Patrick Agrain
Am 2015-01-28 15:39, schrieb Patrick Agrain:
Is there a way to read the coreboot version (as a string or as binary chain) from inside the build coreboot.rom file.
On x86, it's stored through src/arch/x86/lib/id.inc
It's a somewhat arcane format (historically grown), and is typically ends 0x80 bytes before the end of the image. The last 4 qwords are the .long values from which you can calculate the address of the version field
http://review.coreboot.org/gitweb?p=filo.git;a=blob;f=flashupdate/flashupdat...
test_id_section() and its caller provide an example for parsing that.
Regards, Patrick