kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/custom_bootloader_subproject_build' into 'master'
CMake: Fix custom bootloader does not override original See merge request idf/esp-idf!5000pull/3513/head
commit
826acbc3de
|
@ -57,11 +57,12 @@ if((NOT CONFIG_SECURE_BOOT_ENABLED) OR
|
|||
idf_build_get_property(idf_target IDF_TARGET)
|
||||
externalproject_add(bootloader
|
||||
# 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}"
|
||||
CMAKE_ARGS -DSDKCONFIG=${sdkconfig} -DIDF_PATH=${idf_path} -DIDF_TARGET=${idf_target}
|
||||
-DSECURE_BOOT_SIGNING_KEY=${secure_boot_signing_key}
|
||||
-DPYTHON_DEPS_CHECKED=1
|
||||
-DEXTRA_COMPONENT_DIRS=${CMAKE_CURRENT_LIST_DIR}
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_ALWAYS 1 # no easy way around this...
|
||||
BUILD_BYPRODUCTS ${bootloader_binary_files}
|
||||
|
|
|
@ -411,6 +411,14 @@ endmenu\n" >> ${IDF_PATH}/Kconfig;
|
|||
|| failure "ccache should not be used even when present if --no-ccache is specified"
|
||||
rm -f ccache
|
||||
|
||||
print_status "Custom bootloader overrides original"
|
||||
clean_build_dir
|
||||
(mkdir components && cd components && cp -r $IDF_PATH/components/bootloader .)
|
||||
idf.py build
|
||||
grep "$PWD/components/bootloader/subproject/main/bootloader_start.c" build/bootloader/compile_commands.json \
|
||||
|| failure "Custom bootloader source files should be built instead of the original's"
|
||||
rm -rf components
|
||||
|
||||
print_status "All tests completed"
|
||||
if [ -n "${FAILURES}" ]; then
|
||||
echo "Some failures were detected:"
|
||||
|
|
Ładowanie…
Reference in New Issue