Skip to content

Commit 4863a3b

Browse files
committed
Print firmware SHA1. Intel Read Version event contains a TLV(0x32) having firmware sha1 in operational image.
1 parent 00e061c commit 4863a3b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

IntelBluetoothFirmware/BtIntel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ typedef struct __attribute__((packed)) {
7676
uint8_t min_fw_build_yy;
7777
uint8_t limited_cce;
7878
uint8_t sbe_type;
79+
uint32_t git_sha1;
7980
bdaddr_t otp_bd_addr;
8081
} IntelVersionTLV;
8182

IntelBluetoothFirmware/IntelBluetoothOpsGen3.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,9 @@ parseVersionTLV(IntelVersionTLV *version, const uint8_t *versionDataPtr, int len
555555
case INTEL_TLV_OTP_BDADDR:
556556
memcpy(&version->otp_bd_addr, tlv->val, tlv->len);
557557
break;
558+
case INTEL_TLV_GIT_SHA1:
559+
version->git_sha1 = get_unaligned_le32(tlv->val);
560+
break;
558561
default:
559562
/* Ignore rest of information */
560563
break;
@@ -680,6 +683,9 @@ versionInfoTLV(IntelVersionTLV *version)
680683
2000 + (version->timestamp >> 8), version->timestamp & 0xff,
681684
version->build_type, version->build_num);
682685

686+
if (version->img_type == 0x03)
687+
XYLog("Firmware SHA1: 0x%8.8x\n", version->git_sha1);
688+
683689
return true;
684690
}
685691

IntelBluetoothFirmware/IntelBluetoothOpsGen3.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ enum {
4646
INTEL_TLV_LIMITED_CCE,
4747
INTEL_TLV_SBE_TYPE,
4848
INTEL_TLV_OTP_BDADDR,
49-
INTEL_TLV_UNLOCKED_STATE
49+
INTEL_TLV_UNLOCKED_STATE,
50+
INTEL_TLV_GIT_SHA1
5051
};
5152

5253
class IntelBluetoothOpsGen3 : public IntelBluetoothOpsGen2 {

0 commit comments

Comments
 (0)