mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
Add hwid digest field to GBB header
This adds a field in the GBB header to store the sha256 digest of the HWID string, and updates gbb_utility so that it stores the digest when it modifies the HWID. Because this is a new field, the GBB_MINOR_VER is incremented. BUG=chromium:415227 BRANCH=ToT TEST=make runtests, VBOOT2=1 make runtests Since the GBB is in the RO firmware, there should be no side effects for existing devices (but even without that, they should handle a minor version change without complaint). Change-Id: Icdb2a0b564677b0b65e58df897d2ec5af3964998 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/221360
This commit is contained in:
committed by
chrome-internal-fetch
parent
8bb3689d42
commit
6df3e33912
@@ -26,7 +26,8 @@
|
||||
* return default values for those fields.
|
||||
*/
|
||||
#define GBB_MAJOR_VER 1
|
||||
#define GBB_MINOR_VER 1
|
||||
#define GBB_MINOR_VER 2
|
||||
/* v1.2 - added field to hold sha256 digest of the HWID */
|
||||
|
||||
/* Maximum length of a HWID in bytes, counting terminating null. */
|
||||
#define GBB_HWID_MAX_SIZE 256
|
||||
@@ -86,8 +87,10 @@ typedef struct GoogleBinaryBlockHeader
|
||||
uint32_t bmpfv_size;
|
||||
uint32_t recovery_key_offset; /* Recovery key */
|
||||
uint32_t recovery_key_size;
|
||||
/* Added in version 1.2 */
|
||||
uint8_t hwid_digest[32]; /* sha256 */
|
||||
|
||||
uint8_t pad[80]; /* To match GBB_HEADER_SIZE. Initialize to 0. */
|
||||
uint8_t pad[48]; /* To match GBB_HEADER_SIZE. Initialize to 0. */
|
||||
} __attribute__((packed)) GoogleBinaryBlockHeader;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user