From 6877e814674e1997b2175534e4d574503ffe05af Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Thu, 6 Jan 2022 11:12:04 -0800 Subject: [PATCH] Embed host liblz4.so in target_files This file will be used by OTA generator to compress generated patches. We need the host copy of LZ4 to ensure that compressed bytes matches what the device would get if the compression were to be done on device. For more details see go/lz4diff Bug: 206729162 Test: m dist Change-Id: I9c4ab772b001bf47da75cb87b028a1f27e2321a8 --- core/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/Makefile b/core/Makefile index 27dcdcad5a..4a75ce5a89 100644 --- a/core/Makefile +++ b/core/Makefile @@ -4863,14 +4863,16 @@ $(BUILT_TARGET_FILES_PACKAGE): PRIVATE_OTA_TOOLS := $(built_ota_tools) tool_extension := $(wildcard $(tool_extensions)/releasetools.py) $(BUILT_TARGET_FILES_PACKAGE): PRIVATE_TOOL_EXTENSION := $(tool_extension) +updaer_dep := ifeq ($(AB_OTA_UPDATER),true) -updater_dep := system/update_engine/update_engine.conf -updater_dep := external/zucchini/version_info.h +updater_dep += system/update_engine/update_engine.conf +updater_dep += external/zucchini/version_info.h +updater_dep += $(HOST_OUT_SHARED_LIBRARIES)/liblz4.so endif # Build OTA tools if non-A/B is allowed ifeq ($(TARGET_OTA_ALLOW_NON_AB),true) -updater_dep := $(built_ota_tools) +updater_dep += $(built_ota_tools) endif $(BUILT_TARGET_FILES_PACKAGE): $(updater_dep) @@ -5351,6 +5353,7 @@ ifeq ($(AB_OTA_UPDATER),true) @# When using the A/B updater, include the updater config files in the zip. $(hide) cp $(TOPDIR)system/update_engine/update_engine.conf $(zip_root)/META/update_engine_config.txt $(hide) cp $(TOPDIR)external/zucchini/version_info.h $(zip_root)/META/zucchini_config.txt + $(hide) cp $(HOST_OUT_SHARED_LIBRARIES)/liblz4.so $(zip_root)/META/liblz4.so $(hide) for part in $(strip $(AB_OTA_PARTITIONS)); do \ echo "$${part}" >> $(zip_root)/META/ab_partitions.txt; \ done