]> granicus.if.org Git - esp-idf/commitdiff
partition_table,app_update: use config partition table offset
authorRenz Christian Bagaporo <renz@espressif.com>
Tue, 4 Jun 2019 07:49:55 +0000 (15:49 +0800)
committerRenz Christian Bagaporo <renz@espressif.com>
Tue, 11 Jun 2019 05:17:14 +0000 (13:17 +0800)
components/app_update/CMakeLists.txt
components/app_update/Makefile.projbuild
components/partition_table/Makefile.projbuild

index e869c188fba358da399a80021a73d5227fcbf762..6e48af6942a65216460a0c793ad739b72fe64467 100644 (file)
@@ -42,10 +42,16 @@ if(NOT BOOTLOADER_BUILD)
         set(otatool_py ${python} ${COMPONENT_DIR}/otatool.py)
 
         add_custom_target(read_otadata DEPENDS "${PARTITION_CSV_PATH}"
-                        COMMAND ${otatool_py} --partition-table-file ${PARTITION_CSV_PATH} read_otadata)
+                        COMMAND ${otatool_py} 
+                        --partition-table-file ${PARTITION_CSV_PATH} 
+                        --partition-table-offset ${PARTITION_TABLE_OFFSET}
+                        read_otadata)
 
         add_custom_target(erase_otadata DEPENDS "${PARTITION_CSV_PATH}"
-                        COMMAND ${otatool_py} --partition-table-file ${PARTITION_CSV_PATH} erase_otadata)
+                        COMMAND ${otatool_py}
+                        --partition-table-file ${PARTITION_CSV_PATH}
+                        --partition-table-offset ${PARTITION_TABLE_OFFSET}
+                        erase_otadata)
 
         esptool_py_flash_project_args(otadata ${otadata_offset} "${blank_otadata_file}" FLASH_IN_PROJECT)
     endif()
index a20856a6ef5cd8116341e8ca8f9ee70664614e90..a3f2f684236c8fc9fb76a9778710341ac44754c1 100644 (file)
@@ -29,10 +29,14 @@ blank_ota_data: $(BLANK_OTA_DATA_FILE)
 ESPTOOL_ALL_FLASH_ARGS += $(OTA_DATA_OFFSET) $(BLANK_OTA_DATA_FILE)
 
 erase_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_python_dependencies
-       $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) erase_otadata
+       $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
+       --partition-table-offset $(PARTITION_TABLE_OFFSET) \
+       erase_otadata
 
 read_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_python_dependencies
-       $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) read_otadata
+       $(OTATOOL_PY) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \ 
+       --partition-table-offset $(partition_table_offset) \ 
+       read_otadata
 
 erase_ota: erase_otadata
        @echo "WARNING: erase_ota is deprecated. Use erase_otadata instead."
index 353a7655d694e059387f9284b95af7574b855e80..6b28b093f5d480106d82a634b8cda138d3a55698 100644 (file)
@@ -64,14 +64,19 @@ all_binaries: $(PARTITION_TABLE_BIN) partition_table_get_info check_table_conten
 
 partition_table_get_info: $(PARTITION_TABLE_BIN)
        $(eval PHY_DATA_OFFSET:=$(shell $(GET_PART_INFO)  --partition-table-file $(PARTITION_TABLE_BIN) \
+                                                       --partition-table-offset $(PARTITION_TABLE_OFFSET) \
                                                        get_partition_info --partition-type data --partition-subtype phy --info offset))
        $(eval APP_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+                                                       --partition-table-offset $(PARTITION_TABLE_OFFSET) \
                                                        get_partition_info --partition-boot-default --info offset))
        $(eval OTA_DATA_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+                                                       --partition-table-offset $(PARTITION_TABLE_OFFSET) \
                                                        get_partition_info --partition-type data --partition-subtype ota --info offset))
        $(eval OTA_DATA_SIZE:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+                                                       --partition-table-offset $(PARTITION_TABLE_OFFSET) \
                                                        get_partition_info --partition-type data --partition-subtype ota --info size))
        $(eval FACTORY_OFFSET:=$(shell $(GET_PART_INFO) --partition-table-file $(PARTITION_TABLE_BIN) \
+                                                       --partition-table-offset $(PARTITION_TABLE_OFFSET) \
                                                        get_partition_info --partition-type app --partition-subtype factory  --info offset))
 
 export APP_OFFSET