soc: upgrade version printing to vX.Y

This commit is contained in:
Michael (XIAO Xufeng)
2022-11-09 17:19:35 +08:00
parent 3f2f35bd5e
commit f8d4bc8911
7 changed files with 22 additions and 7 deletions

View File

@@ -41,7 +41,10 @@ esp_err_t bootloader_read_bootloader_header(void)
esp_err_t bootloader_check_bootloader_validity(void)
{
ESP_LOGI(TAG, "chip revision: V%03d", efuse_hal_chip_revision());
unsigned int revision = efuse_hal_chip_revision();
unsigned int major = revision / 100;
unsigned int minor = revision % 100;
ESP_LOGI(TAG, "chip revision: v%d.%d", major, minor);
/* compare with the one set in bootloader image header */
if (bootloader_common_check_chip_validity(&bootloader_image_hdr, ESP_IMAGE_BOOTLOADER) != ESP_OK) {
return ESP_FAIL;