This commit is contained in:
jacob.eva 2024-09-12 20:32:54 +01:00
parent a8af5314b7
commit 2cdf2951e6
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E
3 changed files with 4 additions and 5 deletions

View File

@ -259,14 +259,12 @@ void device_validate_partitions() {
// todo, add bootloader, partition table, or softdevice? // todo, add bootloader, partition table, or softdevice?
calculate_region_hash(APPLICATION_START, USER_DATA_START, dev_firmware_hash); calculate_region_hash(APPLICATION_START, USER_DATA_START, dev_firmware_hash);
#endif #endif
#if VALIDATE_FIRMWARE
for (uint8_t i = 0; i < DEV_HASH_LEN; i++) { for (uint8_t i = 0; i < DEV_HASH_LEN; i++) {
if (dev_firmware_hash_target[i] != dev_firmware_hash[i]) { if (dev_firmware_hash_target[i] != dev_firmware_hash[i]) {
fw_signature_validated = false; fw_signature_validated = false;
break; break;
} }
} }
#endif
} }
bool device_firmware_ok() { bool device_firmware_ok() {
@ -324,7 +322,8 @@ bool device_init() {
} else { } else {
return false; return false;
} }
#else //if VALIDATE_FIRMWARE is false #else
// Skip hash comparison and checking BT
return true; return true;
#endif #endif
} }

View File

@ -2562,7 +2562,7 @@ void sx128x::disableCrc()
setPacketParams(_preambleLength, _implicitHeaderMode, _payloadLength, _crcMode); setPacketParams(_preambleLength, _implicitHeaderMode, _payloadLength, _crcMode);
} }
byte sx128x::random() uint8_t sx128x::random()
{ {
// todo: implement // todo: implement
return 0x4; //chosen by fair die roll return 0x4; //chosen by fair die roll

View File

@ -1341,7 +1341,7 @@ bool eeprom_product_valid() {
#if PLATFORM == PLATFORM_ESP32 #if PLATFORM == PLATFORM_ESP32
if (rval == PRODUCT_RNODE || rval == BOARD_RNODE_NG_20 || rval == BOARD_RNODE_NG_21 || rval == PRODUCT_HMBRW || rval == PRODUCT_TBEAM || rval == PRODUCT_T32_10 || rval == PRODUCT_T32_20 || rval == PRODUCT_T32_21 || rval == PRODUCT_H32_V2 || rval == PRODUCT_H32_V3) { if (rval == PRODUCT_RNODE || rval == BOARD_RNODE_NG_20 || rval == BOARD_RNODE_NG_21 || rval == PRODUCT_HMBRW || rval == PRODUCT_TBEAM || rval == PRODUCT_T32_10 || rval == PRODUCT_T32_20 || rval == PRODUCT_T32_21 || rval == PRODUCT_H32_V2 || rval == PRODUCT_H32_V3) {
#elif PLATFORM == PLATFORM_NRF52 #elif PLATFORM == PLATFORM_NRF52
if (rval == PRODUCT_TECHO || rval == MODEL_16 || rval == MODEL_17 || rval == PRODUCT_RAK4631 || rval == PRODUCT_HMBRW || rval == PRODUCT_FREENODE) { if (rval == PRODUCT_TECHO || rval == PRODUCT_RAK4631 || rval == PRODUCT_HMBRW || rval == PRODUCT_FREENODE) {
#else #else
if (false) { if (false) {
#endif #endif