From: suda-morris <362953310@qq.com> Date: Thu, 9 May 2019 06:19:02 +0000 (+0800) Subject: pass IDF_TARGET variable to bootloader build process X-Git-Tag: v4.0-beta1~351^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63e4677c556a3b1fa73d870f04d62f5df278794d;p=esp-idf pass IDF_TARGET variable to bootloader build process --- diff --git a/components/bootloader/project_include.cmake b/components/bootloader/project_include.cmake index 44d71eac5f..e2c51fb050 100644 --- a/components/bootloader/project_include.cmake +++ b/components/bootloader/project_include.cmake @@ -51,7 +51,7 @@ if((NOT CONFIG_SECURE_BOOT_ENABLED) OR # TODO: support overriding the bootloader in COMPONENT_PATHS SOURCE_DIR "${IDF_PATH}/components/bootloader/subproject" BINARY_DIR "${BOOTLOADER_BUILD_DIR}" - CMAKE_ARGS -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH} + CMAKE_ARGS -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH} -DIDF_TARGET=${IDF_TARGET} -DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key} INSTALL_COMMAND "" BUILD_ALWAYS 1 # no easy way around this... diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index 3b605b57b2..d7cc60294c 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -10,6 +10,11 @@ if(NOT IDF_PATH) "in by the parent build process.") endif() +if(NOT IDF_TARGET) + message(FATAL_ERROR "Bootloader subproject expects the IDF_TARGET variable to be passed " + "in by the parent build process.") +endif() + set(COMPONENTS bootloader esptool_py partition_table soc bootloader_support log spi_flash micro-ecc main efuse) set(BOOTLOADER_BUILD 1) add_definitions(-DBOOTLOADER_BUILD=1)