From 77e2f324e773d9ce71decb1a551e059438bcdddf Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sun, 22 Jan 2017 22:50:11 +0100 Subject: Update su binary added with addonsu zip Generate zips that include the su binary out of the system image when WITH_SU is not true. This allows to update the binary that was installed with the addonsu zip. Note: this requires backuptool to work and user builds are excluded. Change-Id: Idc905e3397816b7d3701c43bbb809878f0d22b9b --- core/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'core') diff --git a/core/Makefile b/core/Makefile index e14ff88..5ea1b2a 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1652,6 +1652,15 @@ ifeq ($(BOARD_USES_UBOOT_MULTIIMAGE),true) endif +ifneq ($(CM_BUILD),) +ifneq ($(TARGET_BUILD_VARIANT),user) +ifneq ($(WITH_SU),true) +# Build su without installing it +$(BUILT_TARGET_FILES_PACKAGE): $(ALL_MODULES.su.BUILT) +endif +endif +endif + # Depending on the various images guarantees that the underlying # directories are up-to-date. include $(BUILD_SYSTEM)/tasks/oem_image.mk @@ -1843,6 +1852,17 @@ else endif $(hide) echo "ota_override_device=$(OTA_SCRIPT_OVERRIDE_DEVICE)" >> $(zip_root)/META/misc_info.txt $(hide) echo "ota_override_prop=$(OTA_SCRIPT_OVERRIDE_PROP)" >> $(zip_root)/META/misc_info.txt + +ifneq ($(CM_BUILD),) +ifneq ($(TARGET_BUILD_VARIANT),user) +ifneq ($(WITH_SU),true) + $(hide) echo "addonsu_updater=true" >> $(zip_root)/META/misc_info.txt + $(hide) mkdir $(zip_root)/EXTRA + $(hide) cp $(ALL_MODULES.su.BUILT) $(zip_root)/EXTRA +endif +endif +endif + @# Zip everything up, preserving symlinks $(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .) @# Run fs_config on all the system, vendor, boot ramdisk, -- cgit v1.1