From 4f3dc8759f5e1c3919200b5c88c2ac8d65c05cbe Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 11 Jul 2023 15:20:32 -0700 Subject: [PATCH] Remove BOARD_BPT* variables and the bpt parition table image These variables appear to never be set. Test: Presubmits Change-Id: If4b89376f73204ad5780dff421f1216da255c3eb --- core/Makefile | 47 ------------------- core/board_config.mk | 3 -- tools/releasetools/add_img_to_target_files.py | 32 ------------- tools/releasetools/sign_target_files_apks.py | 1 - 4 files changed, 83 deletions(-) diff --git a/core/Makefile b/core/Makefile index 7c124a9429..7d0c8f19bd 100644 --- a/core/Makefile +++ b/core/Makefile @@ -3464,45 +3464,6 @@ ASAN_SYSTEM_INSTALL_OPTIONS := --owner=1000 --group=1000 $(ASAN_IN_SYSTEM_INSTALLED): $(INSTALLED_USERDATAIMAGE_TARGET_DEPS) tar cfj $(ASAN_IN_SYSTEM_INSTALLED) $(ASAN_SYSTEM_INSTALL_OPTIONS) -C $(TARGET_OUT_DATA)/.. $(ASAN_OUT_DIRS_FOR_SYSTEM_INSTALL) >/dev/null -# ----------------------------------------------------------------- -# partition table image -ifdef BOARD_BPT_INPUT_FILES - -BUILT_BPTIMAGE_TARGET := $(PRODUCT_OUT)/partition-table.img -BUILT_BPTJSON_TARGET := $(PRODUCT_OUT)/partition-table.bpt - -INTERNAL_BVBTOOL_MAKE_TABLE_ARGS := \ - --output_gpt $(BUILT_BPTIMAGE_TARGET) \ - --output_json $(BUILT_BPTJSON_TARGET) \ - $(foreach file, $(BOARD_BPT_INPUT_FILES), --input $(file)) - -ifdef BOARD_BPT_DISK_SIZE -INTERNAL_BVBTOOL_MAKE_TABLE_ARGS += --disk_size $(BOARD_BPT_DISK_SIZE) -endif - -define build-bptimage-target - $(call pretty,"Target partition table image: $(INSTALLED_BPTIMAGE_TARGET)") - $(hide) $(BPTTOOL) make_table $(INTERNAL_BVBTOOL_MAKE_TABLE_ARGS) $(BOARD_BPT_MAKE_TABLE_ARGS) -endef - -INSTALLED_BPTIMAGE_TARGET := $(BUILT_BPTIMAGE_TARGET) -$(BUILT_BPTJSON_TARGET): $(INSTALLED_BPTIMAGE_TARGET) - $(hide) touch -c $(BUILT_BPTJSON_TARGET) - -$(INSTALLED_BPTIMAGE_TARGET): $(BPTTOOL) $(BOARD_BPT_INPUT_FILES) - $(build-bptimage-target) - -$(call declare-1p-container,$(INSTALLED_BPTIMAGE_TARGET),) -$(call declare-container-license-deps,$(INSTALLED_BPTIMAGE_TARGET),$(BOARD_BPT_INPUT_FILES),$(PRODUCT_OUT)/:/) - -UNMOUNTED_NOTICE_VENDOR_DEPS+= $(INSTALLED_BPTIMAGE_TARGET) - -.PHONY: bptimage-nodeps -bptimage-nodeps: - $(build-bptimage-target) - -endif # BOARD_BPT_INPUT_FILES - # ----------------------------------------------------------------- # cache partition image INSTALLED_FILES_OUTSIDE_IMAGES := $(filter-out $(TARGET_OUT_CACHE)/%, $(INSTALLED_FILES_OUTSIDE_IMAGES)) @@ -5628,14 +5589,6 @@ ifneq (,$(strip $(BOARD_AVB_VBMETA_CUSTOM_PARTITIONS))) echo "avb_vbmeta_$(partition)_rollback_index_location=$(BOARD_AVB_VBMETA_$(call to-upper,$(partition))_ROLLBACK_INDEX_LOCATION)" >> $@ ;) endif # BOARD_AVB_VBMETA_CUSTOM_PARTITIONS endif # BOARD_AVB_ENABLE -ifdef BOARD_BPT_INPUT_FILES - $(hide) echo "board_bpt_enable=true" >> $@ - $(hide) echo "board_bpt_make_table_args=$(BOARD_BPT_MAKE_TABLE_ARGS)" >> $@ - $(hide) echo "board_bpt_input_files=$(BOARD_BPT_INPUT_FILES)" >> $@ -endif -ifdef BOARD_BPT_DISK_SIZE - $(hide) echo "board_bpt_disk_size=$(BOARD_BPT_DISK_SIZE)" >> $@ -endif $(call generate-userimage-prop-dictionary, $@) ifeq ($(AB_OTA_UPDATER),true) @# Include the build type in META/misc_info.txt so the server can easily differentiate production builds. diff --git a/core/board_config.mk b/core/board_config.mk index 663ec7c1cd..856fde245b 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -144,9 +144,6 @@ _board_strip_list += BOARD_AVB_PVMFW_KEY_PATH _board_strip_list += BOARD_AVB_PVMFW_ALGORITHM _board_strip_list += BOARD_AVB_PVMFW_ROLLBACK_INDEX_LOCATION _board_strip_list += BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST -_board_strip_list += BOARD_BPT_DISK_SIZE -_board_strip_list += BOARD_BPT_INPUT_FILES -_board_strip_list += BOARD_BPT_MAKE_TABLE_ARGS _board_strip_list += BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION _board_strip_list += BOARD_AVB_VBMETA_VENDOR_ALGORITHM _board_strip_list += BOARD_AVB_VBMETA_VENDOR_KEY_PATH diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index 465d222a83..f29d8019c2 100644 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -684,34 +684,6 @@ def AddVBMeta(output_zip, partitions, name, needed_partitions): return img.name -def AddPartitionTable(output_zip): - """Create a partition table image and store it in output_zip.""" - - img = OutputFile( - output_zip, OPTIONS.input_tmp, "IMAGES", "partition-table.img") - bpt = OutputFile( - output_zip, OPTIONS.input_tmp, "META", "partition-table.bpt") - - # use BPTTOOL from environ, or "bpttool" if empty or not set. - bpttool = os.getenv("BPTTOOL") or "bpttool" - cmd = [bpttool, "make_table", "--output_json", bpt.name, - "--output_gpt", img.name] - input_files_str = OPTIONS.info_dict["board_bpt_input_files"] - input_files = input_files_str.split() - for i in input_files: - cmd.extend(["--input", i]) - disk_size = OPTIONS.info_dict.get("board_bpt_disk_size") - if disk_size: - cmd.extend(["--disk_size", disk_size]) - args = OPTIONS.info_dict.get("board_bpt_make_table_args") - if args: - cmd.extend(shlex.split(args)) - common.RunAndCheckOutput(cmd) - - img.Write() - bpt.Write() - - def AddCache(output_zip): """Create an empty cache image and store it in output_zip.""" @@ -1087,10 +1059,6 @@ def AddImagesToTargetFiles(filename): banner("cache") AddCache(output_zip) - if OPTIONS.info_dict.get("board_bpt_enable") == "true": - banner("partition-table") - AddPartitionTable(output_zip) - add_partition("dtbo", OPTIONS.info_dict.get("has_dtbo") == "true", AddDtbo, []) add_partition("pvmfw", diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index 8291448249..2b65e47076 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -1234,7 +1234,6 @@ def BuildVendorPartitions(output_zip_path): vendor_misc_info["no_recovery"] = "true" # recovery vendor_misc_info["avb_enable"] = "false" # vbmeta - vendor_misc_info["board_bpt_enable"] = "false" # partition-table vendor_misc_info["has_dtbo"] = "false" # dtbo vendor_misc_info["has_pvmfw"] = "false" # pvmfw vendor_misc_info["avb_custom_images_partition_list"] = "" # custom images