Kevin Chiu has uploaded this change for review. ( https://review.coreboot.org/28889
Change subject: google/grunt: extract OEM string from CBFS ......................................................................
google/grunt: extract OEM string from CBFS
In CBFS layout: oem.bin size is 10 bytes.
In cbfs_boot_load_file, buffer size will need to be larger than decompressed_size, otherwise CBFS data can not be extracted into buffer. Then we need to check buffer whether it's empty string separately.
BUG=b:79874904 BRANCH=master TEST=emerge-grunt coreboot Change-Id: I4f1bbb690ecca515ac920f5058ee19b5bfd8fa5e Signed-off-by: Kevin Chiu Kevin.Chiu@quantatw.com --- M src/mainboard/google/kahlee/variants/baseboard/mainboard.c 1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/28889/1
diff --git a/src/mainboard/google/kahlee/variants/baseboard/mainboard.c b/src/mainboard/google/kahlee/variants/baseboard/mainboard.c index d60023f..3e84a7b 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/mainboard.c +++ b/src/mainboard/google/kahlee/variants/baseboard/mainboard.c @@ -88,9 +88,10 @@ if (manuf) return manuf;
- if (cbfs_boot_load_file("oem.bin", oem_bin_data, - sizeof(oem_bin_data) - 1, - CBFS_TYPE_RAW)) + cbfs_boot_load_file("oem.bin", oem_bin_data, + sizeof(oem_bin_data), + CBFS_TYPE_RAW); + if(oem_bin_data[0] != '\0') manuf = &oem_bin_data[0]; else manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;