From 29e88b850ef3b2f9ec5c484547c49c777429ed73 Mon Sep 17 00:00:00 2001 From: Vikram Dattu Date: Fri, 16 Dec 2016 09:45:19 +0100 Subject: [PATCH] HOST_OUT_EXECUTABLES path is not needed in misc_info file HOST_OUT_EXECUTABLES is already added to the PATH variable, so it is not needed to add the path info for binaries in misc_info.txt and _image_info.txt. Earlier the mkuserimg item in the build_image dictionary is hardcoded to "mkuserimg.sh", but now it is customized for mkuserimg.sh and mkuserimg_mke2fs.sh, and maintained in dictionary "ext_mkuserimg=$(MKEXTUSERIMG)" in misc_info.txt and _image_info.txt, where it is used in the build_image script while creating the images. The problem here is the value for this key is set to build path of the file mkuserimg file $(HOST_OUT_EXECUTABLES)/mkuserimg.sh, i.e. out/host/linux_x86/bin/mkuserimg.sh, there by standalone signing the images using otatools is not working as the executables are packed in bin folder. Test: tools/releasetools/sign_target_files_apks -p --extra_signapk_args=-f /etc/opt/cert_data.dat -v --replace_verity_private_key ~/build/target/product/security/verity --replace_verity_public_key ~/build/target/product/security/verity.x509.pem -k Change-Id: I57af1025ec38f3794f779c49faa0bf965afc6a5d --- core/Makefile | 2 +- core/tasks/tools/build_custom_image.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index c409458112..bc654a114f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -835,7 +835,7 @@ INTERNAL_USERIMAGES_DEPS += $(BLK_ALLOC_TO_BASE_FS) # $(1): the path of the output dictionary file # $(2): additional "key=value" pairs to append to the dictionary file. define generate-userimage-prop-dictionary -$(hide) echo "ext_mkuserimg=$(MKEXTUSERIMG)" >> $(1) +$(hide) echo "ext_mkuserimg=$(notdir $(MKEXTUSERIMG))" >> $(1) $(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1)) $(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "system_fs_type=$(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE)" >> $(1)) diff --git a/core/tasks/tools/build_custom_image.mk b/core/tasks/tools/build_custom_image.mk index 34bbfce69e..f0db476bcf 100644 --- a/core/tasks/tools/build_custom_image.mk +++ b/core/tasks/tools/build_custom_image.mk @@ -90,7 +90,7 @@ $(my_built_custom_image): $(INTERNAL_USERIMAGES_DEPS) $(my_built_modules) $(my_i $(hide) echo "mount_point=$(PRIVATE_MOUNT_POINT)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt $(hide) echo "fs_type=$(PRIVATE_FILE_SYSTEM_TYPE)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt $(hide) echo "partition_size=$(PRIVATE_PARTITION_SIZE)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt - $(hide) echo "ext_mkuserimg=$(MKEXTUSERIMG)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt + $(hide) echo "ext_mkuserimg=$(notdir $(MKEXTUSERIMG))" >> $(PRIVATE_INTERMEDIATES)/image_info.txt $(if $(PRIVATE_SELINUX),$(hide) echo "selinux_fc=$(SELINUX_FC)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt) $(if $(PRIVATE_SUPPORT_VERITY),\ $(hide) echo "verity=$(PRIVATE_SUPPORT_VERITY)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\