mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
Merge branch 'fix/remove-bootloader-desc-from-app-build' into 'master'
fix(esp_bootloader_format): Remove bootloader description from app build See merge request espressif/esp-idf!50576
This commit is contained in:
@@ -119,6 +119,7 @@ void bootloader_enable_random(void)
|
||||
|
||||
void bootloader_print_banner(void)
|
||||
{
|
||||
#if BOOTLOADER_BUILD
|
||||
if (CONFIG_BOOTLOADER_LOG_LEVEL >= ESP_LOG_INFO) {
|
||||
const esp_bootloader_desc_t *desc = esp_bootloader_get_description();
|
||||
ESP_EARLY_LOGI(TAG, "ESP-IDF %s 2nd stage bootloader", desc->idf_ver);
|
||||
@@ -126,6 +127,7 @@ void bootloader_print_banner(void)
|
||||
ESP_EARLY_LOGI(TAG, "compile time %s", desc->date_time);
|
||||
#endif
|
||||
}
|
||||
#endif // BOOTLOADER_BUILD
|
||||
|
||||
#if CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
|
||||
#if (SOC_CPU_CORES_NUM > 1)
|
||||
|
||||
@@ -4,7 +4,13 @@ if(${target} STREQUAL "linux")
|
||||
return() # This component is not supported by the POSIX/Linux simulator
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS "esp_bootloader_desc.c"
|
||||
if(BOOTLOADER_BUILD)
|
||||
set(srcs "esp_bootloader_desc.c")
|
||||
else()
|
||||
set(srcs "")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS "include")
|
||||
|
||||
if(BOOTLOADER_BUILD)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -10,9 +10,7 @@
|
||||
#include "sdkconfig.h"
|
||||
|
||||
// Bootloader version info
|
||||
#if BOOTLOADER_BUILD
|
||||
__attribute__((section(".data_bootloader_desc")))
|
||||
#endif
|
||||
__attribute__((weak))
|
||||
const esp_bootloader_desc_t esp_bootloader_desc = {
|
||||
.magic_byte = ESP_BOOTLOADER_DESC_MAGIC_BYTE,
|
||||
|
||||
@@ -36,6 +36,7 @@ typedef struct {
|
||||
ESP_STATIC_ASSERT(sizeof(esp_bootloader_desc_t) == 80, "esp_bootloader_desc_t should be 80 bytes");
|
||||
/** @endcond */
|
||||
|
||||
#if BOOTLOADER_BUILD
|
||||
/**
|
||||
* @brief Return esp_bootloader_desc structure.
|
||||
*
|
||||
@@ -43,6 +44,7 @@ ESP_STATIC_ASSERT(sizeof(esp_bootloader_desc_t) == 80, "esp_bootloader_desc_t sh
|
||||
* @return Pointer to esp_bootloader_desc structure.
|
||||
*/
|
||||
const esp_bootloader_desc_t *esp_bootloader_get_description(void);
|
||||
#endif // BOOTLOADER_BUILD
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user