diff options
| -rw-r--r-- | core/tasks/tools/package-modules.mk | 12 | ||||
| -rw-r--r-- | target/product/userspace_reboot.mk | 4 | ||||
| -rw-r--r-- | tools/releasetools/Android.bp | 10 | ||||
| -rw-r--r-- | tools/releasetools/common.py | 13 | ||||
| -rw-r--r-- | tools/releasetools/test_common.py | 1 |
5 files changed, 31 insertions, 9 deletions
diff --git a/core/tasks/tools/package-modules.mk b/core/tasks/tools/package-modules.mk index 55a08f51ec..6cafa4a2a3 100644 --- a/core/tasks/tools/package-modules.mk +++ b/core/tasks/tools/package-modules.mk @@ -16,7 +16,16 @@ # my_makefile := $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) -my_staging_dir := $(call intermediates-dir-for,PACKAGING,$(my_package_name)) + +include $(CLEAR_VARS) +LOCAL_MODULE := $(my_package_name) +LOCAL_MODULE_CLASS := PACKAGING +LOCAL_MODULE_STEM := $(my_package_name).zip +LOCAL_UNINSTALLABLE_MODULE := true +include $(BUILD_SYSTEM)/base_rules.mk +my_staging_dir := $(intermediates) +my_package_zip := $(LOCAL_BUILT_MODULE) + my_built_modules := $(foreach p,$(my_copy_pairs),$(call word-colon,1,$(p))) my_copy_pairs := $(foreach p,$(my_copy_pairs),$(call word-colon,1,$(p)):$(my_staging_dir)/$(call word-colon,2,$(p))) my_pickup_files := @@ -80,7 +89,6 @@ ifneq ($(my_missing_error),) $(error done) endif -my_package_zip := $(my_staging_dir)/$(my_package_name).zip $(my_package_zip): PRIVATE_COPY_PAIRS := $(my_copy_pairs) $(my_package_zip): PRIVATE_PICKUP_FILES := $(my_pickup_files) $(my_package_zip) : $(my_built_modules) diff --git a/target/product/userspace_reboot.mk b/target/product/userspace_reboot.mk index 76ec83dd93..3f881af7e6 100644 --- a/target/product/userspace_reboot.mk +++ b/target/product/userspace_reboot.mk @@ -16,6 +16,4 @@ # Inherit this when the target supports userspace reboot -PRODUCT_PROPERTY_OVERRIDES := ro.init.userspace_reboot.is_supported=true - -# TODO(b/135984674): configure userspace reboot related properties +PRODUCT_PROPERTY_OVERRIDES := init.userspace_reboot.is_supported=true diff --git a/tools/releasetools/Android.bp b/tools/releasetools/Android.bp index f29ec90cc0..d6f2116693 100644 --- a/tools/releasetools/Android.bp +++ b/tools/releasetools/Android.bp @@ -238,6 +238,16 @@ python_defaults { embedded_launcher: false, }, }, + // TODO (b/140144201) Build imgdiff from releasetools_common + required: [ + "aapt2", + "boot_signer", + "brotli", + "bsdiff", + "imgdiff", + "minigzip", + "mkbootfs", + ], } python_binary_host { diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 3bbf9d804f..9ea3ea8f15 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -77,6 +77,7 @@ class Options(object): self.boot_signer_args = [] self.verity_signer_path = None self.verity_signer_args = [] + self.aftl_tool_path = None self.aftl_server = None self.aftl_key_path = None self.aftl_manufacturer_key_path = None @@ -935,6 +936,7 @@ def AddAftlInclusionProof(output_image): """Appends the aftl inclusion proof to the vbmeta image.""" # Ensure the other AFTL parameters are set as well. + assert OPTIONS.aftl_tool_path is not None, 'No aftl tool provided.' assert OPTIONS.aftl_key_path is not None, 'No AFTL key provided.' assert OPTIONS.aftl_manufacturer_key_path is not None, \ 'No AFTL manufacturer key provided.' @@ -943,7 +945,8 @@ def AddAftlInclusionProof(output_image): os.rename(output_image, vbmeta_image) build_info = BuildInfo(OPTIONS.info_dict) version_incremental = build_info.GetBuildProp("ro.build.version.incremental") - aftl_cmd = ["aftltool", "make_icp_from_vbmeta", + aftltool = OPTIONS.aftl_tool_path + aftl_cmd = [aftltool, "make_icp_from_vbmeta", "--vbmeta_image_path", vbmeta_image, "--output", output_image, "--version_incremental", version_incremental, @@ -1876,9 +1879,9 @@ def ParseOptions(argv, "java_path=", "java_args=", "android_jar_path=", "public_key_suffix=", "private_key_suffix=", "boot_signer_path=", "boot_signer_args=", "verity_signer_path=", "verity_signer_args=", "device_specific=", - "extra=", "logfile=", "aftl_server=", "aftl_key_path=", - "aftl_manufacturer_key_path=", "aftl_signer_helper="] + - list(extra_long_opts)) + "extra=", "logfile=", "aftl_tool_path=", "aftl_server=", + "aftl_key_path=", "aftl_manufacturer_key_path=", + "aftl_signer_helper="] + list(extra_long_opts)) except getopt.GetoptError as err: Usage(docstring) print("**", str(err), "**") @@ -1916,6 +1919,8 @@ def ParseOptions(argv, OPTIONS.verity_signer_path = a elif o in ("--verity_signer_args",): OPTIONS.verity_signer_args = shlex.split(a) + elif o in ("--aftl_tool_path",): + OPTIONS.aftl_tool_path = a elif o in ("--aftl_server",): OPTIONS.aftl_server = a elif o in ("--aftl_key_path",): diff --git a/tools/releasetools/test_common.py b/tools/releasetools/test_common.py index 9621de86e5..9195e4943c 100644 --- a/tools/releasetools/test_common.py +++ b/tools/releasetools/test_common.py @@ -1417,6 +1417,7 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase): '6285659:userdebug/dev-keys' } } + common.OPTIONS.aftl_tool_path = "aftltool" common.OPTIONS.aftl_server = "log.endpoints.aftl-dev.cloud.goog:9000" common.OPTIONS.aftl_key_path = os.path.join(testdata_dir, 'test_transparency_key.pub') |