Merge branch 'task/v2_aware_component_and_test_gates_v6.1' into 'release/v6.1'

fix(components): linux host-build failure fixes+ disable esp_tee in buildv2 + esp_hw_support and xtensa fixes (v6.1)

See merge request espressif/esp-idf!48919
This commit is contained in:
Jiang Jiang Jian
2026-06-05 10:27:29 +08:00
7 changed files with 24 additions and 63 deletions
@@ -5,10 +5,10 @@ idf_component_register(SRCS
"../../../private_include"
"../../../include"
"../../../src/port/riscv/include"
"../../../../esp_hw_support/include"
"../../../../soc/esp32c3/include"
"../../../../esp_common/include"
"../../../../riscv/include"
PRIV_REQUIRES esp_hw_support
WHOLE_ARCHIVE)
# Currently 'main' for IDF_TARGET=linux is defined in freertos component.
+9 -1
View File
@@ -8,7 +8,15 @@ idf_build_get_property(project_dir PROJECT_DIR)
idf_build_get_property(non_os_build NON_OS_BUILD)
idf_build_get_property(custom_secure_service_dir CUSTOM_SECURE_SERVICE_COMPONENT_DIR)
idf_build_get_property(custom_secure_service_component CUSTOM_SECURE_SERVICE_COMPONENT)
idf_build_get_property(partition_table_bin PARTITION_TABLE_BIN_PATH)
if(IDF_BUILD_V2)
# Under build system v2, partition_table/project_include.cmake may run
# after this file, so PARTITION_TABLE_BIN_PATH is not yet set. Defer the
# read to CMake's generate phase via a generator expression.
idf_build_get_property(partition_table_bin PARTITION_TABLE_BIN_PATH GENERATOR_EXPRESSION)
else()
idf_build_get_property(partition_table_bin PARTITION_TABLE_BIN_PATH)
endif()
if(NOT CONFIG_SECURE_ENABLE_TEE OR non_os_build)
return()
@@ -33,6 +33,12 @@ list(APPEND COMPONENTS attestation tee_flash_mgr tee_ota_ops tee_sec_storage)
include_directories("${SECURE_SERVICE_HEADERS_DIR}")
# The TEE subproject is not yet ported to build system v2.
# Explicitly clear the IDF_BUILD_V2 environment variable so that
# tools/cmake/project.cmake does not activate the cmakev2 shim when
# the parent build was invoked with IDF_BUILD_V2=1.
unset(ENV{IDF_BUILD_V2})
include("${IDF_PATH}/tools/cmake/project.cmake")
set(common_req esp_common esp_hw_support esp_rom freertos hal log esp_libc soc spi_flash)
+1 -1
View File
@@ -1,5 +1,5 @@
menu "Serial flasher config"
depends on !APP_BUILD_TYPE_PURE_RAM_APP
depends on !APP_BUILD_TYPE_PURE_RAM_APP && !IDF_TARGET_LINUX
config ESPTOOLPY_NO_STUB
bool "Disable download stub"
@@ -1,59 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This file provides only very simple stubs to build IDF-based FreeRTOSes which use spinlocks on Linux.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define SPINLOCK_FREE 0xB33FFFFF
#define SPINLOCK_WAIT_FOREVER (-1)
#define SPINLOCK_NO_WAIT 0
#define SPINLOCK_INITIALIZER {.owner = SPINLOCK_FREE,.count = 0}
#define CORE_ID_REGVAL_XOR_SWAP (0xCDCD ^ 0xABAB)
/**
* @brief Spinlock object
* Owner:
* - Set to 0 if uninitialized
* - Set to portMUX_FREE_VAL when free
* - Set to CORE_ID_REGVAL_PRO or CORE_ID_REGVAL_AP when locked
* - Any other value indicates corruption
* Count:
* - 0 if unlocked
* - Recursive count if locked
*
* @note The simulator is single-core, hence, it doesn't have a proper spinlock implementation.
* @note Keep portMUX_INITIALIZER_UNLOCKED in sync with this struct
*/
typedef struct {
uint32_t owner;
uint32_t count;
}spinlock_t;
static inline void __attribute__((always_inline)) spinlock_initialize(spinlock_t *lock)
{
}
static inline bool __attribute__((always_inline)) spinlock_acquire(spinlock_t *lock, int32_t timeout)
{
return true;
}
static inline void __attribute__((always_inline)) spinlock_release(spinlock_t *lock)
{
}
#ifdef __cplusplus
}
#endif
+7 -1
View File
@@ -50,7 +50,13 @@ if(NOT BOOTLOADER_BUILD)
list(APPEND srcs "xtensa_loadstore_handler.S")
endif()
if(NOT CONFIG_FREERTOS_PORT)
# xtensa_rtos.h is provided by freertos when it is in the build closure.
# Under build system v2 every component's Kconfig is processed, so
# CONFIG_FREERTOS_PORT is set even when an app (e.g. g0_components)
# removes freertos from __COMPONENT_REQUIRES_COMMON. Inspect the
# common-requires list directly to detect the actual closure.
idf_build_get_property(__common_reqs __COMPONENT_REQUIRES_COMMON)
if(NOT "freertos" IN_LIST __common_reqs)
# No RTOS provided. Use default bare metal stubs (to pass G0 build test)
list(APPEND srcs
"baremetal/xtensa_rtos_bm.S")