From b10e07aea75bbe30671d66935020f2ed0d56fbd2 Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Thu, 9 Nov 2017 23:53:42 +0100 Subject: [PATCH] Update binary name to "brotli". With the update of brotli to version 1.0.1 the new binary tool is now called "brotli". This patch updates the scripts to use the new name. Bug: 34220646 Test: `make dist`; ota_from_target_files on non-A/B device. Change-Id: Ie8da4333388d029d5960a723a55efd875d8ee820 --- core/Makefile | 4 ++-- core/config.mk | 2 +- tools/releasetools/common.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/Makefile b/core/Makefile index 5cb876607..8602a800f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2119,7 +2119,7 @@ OTATOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \ $(HOST_OUT_EXECUTABLES)/delta_generator \ $(AVBTOOL) \ $(BLK_ALLOC_TO_BASE_FS) \ - $(BRO) + $(BROTLI) ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)) OTATOOLS += \ @@ -2606,7 +2606,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR) ifeq ($(AB_OTA_UPDATER),true) $(INTERNAL_OTA_PACKAGE_TARGET): $(BRILLO_UPDATE_PAYLOAD) else -$(INTERNAL_OTA_PACKAGE_TARGET): $(BRO) +$(INTERNAL_OTA_PACKAGE_TARGET): $(BROTLI) endif $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \ diff --git a/core/config.mk b/core/config.mk index 86fc3997b..f9867ed14 100644 --- a/core/config.mk +++ b/core/config.mk @@ -601,7 +601,7 @@ NANOPB_SRCS := external/nanopb-c/generator/protoc-gen-nanopb \ VTSC := $(HOST_OUT_EXECUTABLES)/vtsc$(HOST_EXECUTABLE_SUFFIX) MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX) MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX) -BRO := $(HOST_OUT_EXECUTABLES)/bro$(HOST_EXECUTABLE_SUFFIX) +BROTLI := $(HOST_OUT_EXECUTABLES)/brotli$(HOST_EXECUTABLE_SUFFIX) ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG))) MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX) else diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 97261255c..d16f5ebff 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -1530,11 +1530,11 @@ class BlockDifference(object): # decompression_time: 15s | 25s | 25s if not self.src: - bro_cmd = ['bro', '--quality', '6', - '--input', '{}.new.dat'.format(self.path), - '--output', '{}.new.dat.br'.format(self.path)] + brotli_cmd = ['brotli', '--quality=6', + '--output={}.new.dat.br'.format(self.path), + '{}.new.dat'.format(self.path)] print("Compressing {}.new.dat with brotli".format(self.partition)) - p = Run(bro_cmd, stdout=subprocess.PIPE) + p = Run(brotli_cmd, stdout=subprocess.PIPE) p.communicate() assert p.returncode == 0,\ 'compression of {}.new.dat failed'.format(self.partition)