refactor(bootloader): lower down the log level to reduce the bootloader size

This commit is contained in:
laokaiyao
2024-08-20 19:04:52 +08:00
parent f7f1a222cc
commit 34ebd4943f
3 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -67,14 +67,14 @@ esp_err_t bootloader_common_check_efuse_blk_validity(uint32_t min_rev_full, uint
uint32_t major_rev = revision / 100; uint32_t major_rev = revision / 100;
uint32_t minor_rev = revision % 100; uint32_t minor_rev = revision % 100;
if (IS_FIELD_SET(min_rev_full) && !ESP_EFUSE_BLK_REV_ABOVE(revision, min_rev_full)) { if (IS_FIELD_SET(min_rev_full) && !ESP_EFUSE_BLK_REV_ABOVE(revision, min_rev_full)) {
ESP_LOGE(TAG, "Image requires efuse blk rev >= v%"PRIu32".%"PRIu32", but chip is v%"PRIu32".%"PRIu32, ESP_LOGE(TAG, "efuse blk rev = v%"PRIu32".%"PRIu32" < min rev v%"PRIu32".%"PRIu32,
min_rev_full / 100, min_rev_full % 100, major_rev, minor_rev); major_rev, minor_rev, min_rev_full / 100, min_rev_full % 100);
err = ESP_FAIL; err = ESP_FAIL;
} }
// If burnt `disable_blk_version_major` bit, skip the max version check // If burnt `disable_blk_version_major` bit, skip the max version check
if ((IS_FIELD_SET(max_rev_full) && (revision > max_rev_full) && !efuse_hal_get_disable_blk_version_major())) { if ((IS_FIELD_SET(max_rev_full) && (revision > max_rev_full) && !efuse_hal_get_disable_blk_version_major())) {
ESP_LOGE(TAG, "Image requires efuse blk rev <= v%"PRIu32".%"PRIu32", but chip is v%"PRIu32".%"PRIu32, ESP_LOGE(TAG, "efuse blk rev = v%"PRIu32".%"PRIu32" > max rev v%"PRIu32".%"PRIu32,
max_rev_full / 100, max_rev_full % 100, major_rev, minor_rev); major_rev, minor_rev, max_rev_full / 100, max_rev_full % 100);
err = ESP_FAIL; err = ESP_FAIL;
} }
#endif #endif

View File

@@ -57,7 +57,7 @@ config ESP_REV_MAX_FULL
config ESP_EFUSE_BLOCK_REV_MIN_FULL config ESP_EFUSE_BLOCK_REV_MIN_FULL
int "Minimum Supported ESP32-C3 eFuse Block Revision" int "Minimum Supported ESP32-C3 eFuse Block Revision"
default 100 default 0
help help
Required minimum eFuse Block revision. ESP-IDF will check it at the 2nd bootloader stage Required minimum eFuse Block revision. ESP-IDF will check it at the 2nd bootloader stage
whether the current image can work correctly for this eFuse Block revision. whether the current image can work correctly for this eFuse Block revision.

View File

@@ -45,7 +45,7 @@ config ESP_REV_MAX_FULL
config ESP_EFUSE_BLOCK_REV_MIN_FULL config ESP_EFUSE_BLOCK_REV_MIN_FULL
int "Minimum Supported ESP32-S2 eFuse Block Revision" int "Minimum Supported ESP32-S2 eFuse Block Revision"
default 2 default 0
help help
Required minimum eFuse Block revision. ESP-IDF will check it at the 2nd bootloader stage Required minimum eFuse Block revision. ESP-IDF will check it at the 2nd bootloader stage
whether the current image can work correctly for this eFuse Block revision. whether the current image can work correctly for this eFuse Block revision.