cmake: fix custom bootloader issue

Issue is that when users creates a custom bootloader from
$IDF_PATH/components/bootloader. Parent project build uses the copy but
bootloader subproject build uses the original still. The issue is solved
by passing the custom bootloader as extra component directory so
bootloader build knows to use the new copy (itself) in the build.
pull/3513/head
Renz Christian Bagaporo 2019-05-15 11:40:57 +08:00
rodzic 907471ce41
commit 927007fdd2
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -57,11 +57,12 @@ if((NOT CONFIG_SECURE_BOOT_ENABLED) OR
idf_build_get_property(idf_target IDF_TARGET) idf_build_get_property(idf_target IDF_TARGET)
externalproject_add(bootloader externalproject_add(bootloader
# TODO: support overriding the bootloader in COMPONENT_PATHS # TODO: support overriding the bootloader in COMPONENT_PATHS
SOURCE_DIR "${idf_path}/components/bootloader/subproject" SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/subproject"
BINARY_DIR "${BOOTLOADER_BUILD_DIR}" BINARY_DIR "${BOOTLOADER_BUILD_DIR}"
CMAKE_ARGS -DSDKCONFIG=${sdkconfig} -DIDF_PATH=${idf_path} -DIDF_TARGET=${idf_target} CMAKE_ARGS -DSDKCONFIG=${sdkconfig} -DIDF_PATH=${idf_path} -DIDF_TARGET=${idf_target}
-DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key} -DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key}
-DPYTHON_DEPS_CHECKED=1 -DPYTHON_DEPS_CHECKED=1
-DEXTRA_COMPONENT_DIRS=${CMAKE_CURRENT_LIST_DIR}
INSTALL_COMMAND "" INSTALL_COMMAND ""
BUILD_ALWAYS 1 # no easy way around this... BUILD_ALWAYS 1 # no easy way around this...
BUILD_BYPRODUCTS ${bootloader_binary_files} BUILD_BYPRODUCTS ${bootloader_binary_files}