Recent changes to our bl33 binary have resulted in some data
getting rearranged in the binary's data section. The bfver script
uses the Linux "strings" utility to parse the "BId" string from the
raw binary and, depending on the data that is next to that string in the
binary, can sometimes include unexpected bytes as part of the
located string.
For example, the following shows how there is an "a" character
prepended before the expected build ID string:
The fix is to update the sed regex used to cut out the build ID number
which should never contain letters or special characters. The new regex
will cut out all characters before and after the actual build ID number.
Note that using "strings" to search for these versions in the binary is prone to errors. In the future we may want to put these values in an EFI variable that bfver can read instead.
Recent changes to our bl33 binary have resulted in some data getting rearranged in the binary's data section. The bfver script uses the Linux "strings" utility to parse the "BId" string from the raw binary and, depending on the data that is next to that string in the binary, can sometimes include unexpected bytes as part of the located string.
For example, the following shows how there is an "a" character prepended before the expected build ID string:
And this results in the BSP version displayed by bfver to have a corrupted build ID:
The fix is to update the sed regex used to cut out the build ID number which should never contain letters or special characters. The new regex will cut out all characters before and after the actual build ID number.
Note that using "strings" to search for these versions in the binary is prone to errors. In the future we may want to put these values in an EFI variable that bfver can read instead.
RM #3948954