Merge branch 'bugfix/custom_bootloader_subproject_build_v3.1' into 'release/v3.1'
CMake: Fix custom bootloader does not override original (v3.1) See merge request idf/esp-idf!5083
This commit is contained in:
commit
23cd758ddb
2 changed files with 10 additions and 12 deletions
|
@ -15,9 +15,10 @@ set(bootloader_binary_files
|
||||||
|
|
||||||
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}
|
CMAKE_ARGS -DSDKCONFIG=${SDKCONFIG} -DIDF_PATH=${IDF_PATH}
|
||||||
|
-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}
|
||||||
|
|
|
@ -238,16 +238,13 @@ EOF
|
||||||
export PATH="$OLDPATH"
|
export PATH="$OLDPATH"
|
||||||
rm ./python
|
rm ./python
|
||||||
|
|
||||||
print_status "sdkconfig should have contents both files: sdkconfig and sdkconfig.defaults"
|
print_status "Custom bootloader overrides original"
|
||||||
idf.py clean > /dev/null;
|
clean_build_dir
|
||||||
idf.py fullclean > /dev/null;
|
(mkdir components && cd components && cp -r $IDF_PATH/components/bootloader .)
|
||||||
rm -f sdkconfig.defaults;
|
idf.py build
|
||||||
rm -f sdkconfig;
|
grep "$PWD/components/bootloader/subproject/main/bootloader_start.c" build/bootloader/compile_commands.json \
|
||||||
echo "CONFIG_PARTITION_TABLE_OFFSET=0x10000" >> sdkconfig.defaults;
|
|| failure "Custom bootloader source files should be built instead of the original's"
|
||||||
echo "CONFIG_PARTITION_TABLE_TWO_OTA=y" >> sdkconfig;
|
rm -rf components
|
||||||
idf.py reconfigure > /dev/null;
|
|
||||||
grep "CONFIG_PARTITION_TABLE_OFFSET=0x10000" sdkconfig || failure "The define from sdkconfig.defaults should be into sdkconfig"
|
|
||||||
grep "CONFIG_PARTITION_TABLE_TWO_OTA=y" sdkconfig || failure "The define from sdkconfig should be into sdkconfig"
|
|
||||||
|
|
||||||
print_status "All tests completed"
|
print_status "All tests completed"
|
||||||
if [ -n "${FAILURES}" ]; then
|
if [ -n "${FAILURES}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue