diff --git a/core/Makefile b/core/Makefile index 7c124a9429..1823df0b88 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1045,8 +1045,8 @@ COMPRESSION_COMMAND_DEPS := $(LZ4) COMPRESSION_COMMAND := $(LZ4) -l -12 --favor-decSpeed RAMDISK_EXT := .lz4 else -COMPRESSION_COMMAND_DEPS := $(MINIGZIP) -COMPRESSION_COMMAND := $(MINIGZIP) +COMPRESSION_COMMAND_DEPS := $(GZIP) +COMPRESSION_COMMAND := $(GZIP) RAMDISK_EXT := .gz endif @@ -5262,7 +5262,6 @@ INTERNAL_OTATOOLS_MODULES := \ make_f2fs_casefold \ merge_ota \ merge_target_files \ - minigzip \ mk_combined_img \ mkbootfs \ mkbootimg \ diff --git a/core/app_prebuilt_internal.mk b/core/app_prebuilt_internal.mk index 9fab44d7c9..b141a98525 100644 --- a/core/app_prebuilt_internal.mk +++ b/core/app_prebuilt_internal.mk @@ -227,7 +227,7 @@ endif $(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs) ifdef LOCAL_COMPRESSED_MODULE -$(built_module) : $(MINIGZIP) +$(built_module) : $(GZIP) endif ifeq ($(module_run_appcompat),true) @@ -305,4 +305,4 @@ endif # LOCAL_PACKAGE_SPLITS ########################################################### ## SBOM generation ########################################################### -include $(BUILD_SBOM_GEN) \ No newline at end of file +include $(BUILD_SBOM_GEN) diff --git a/core/config.mk b/core/config.mk index 9910ae74bc..e9119d65b2 100644 --- a/core/config.mk +++ b/core/config.mk @@ -645,10 +645,11 @@ else # For non-supported hosts, do not generate breakpad symbols. BREAKPAD_GENERATE_SYMBOLS := false endif +GZIP := prebuilts/build-tools/path/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/gzip PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX) NANOPB_SRCS := $(HOST_OUT_EXECUTABLES)/protoc-gen-nanopb MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX) -MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX) +MINIGZIP := $(GZIP) LZ4 := $(HOST_OUT_EXECUTABLES)/lz4$(HOST_EXECUTABLE_SUFFIX) GENERATE_GKI_CERTIFICATE := $(HOST_OUT_EXECUTABLES)/generate_gki_certificate$(HOST_EXECUTABLE_SUFFIX) ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG))) diff --git a/core/definitions.mk b/core/definitions.mk index be40584e5f..2484f1e053 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2941,7 +2941,7 @@ endef define compress-package $(hide) \ mv $@ $@.uncompressed; \ - $(MINIGZIP) -9 -c $@.uncompressed > $@.compressed; \ + $(GZIP) -9 -c $@.uncompressed > $@.compressed; \ rm -f $@.uncompressed; \ mv $@.compressed $@; endef diff --git a/core/package_internal.mk b/core/package_internal.mk index 7cfab5b789..a03a62b7fa 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -531,7 +531,7 @@ $(LOCAL_BUILT_MODULE) : $(JAR_ARGS) $(SOONG_ZIP) $(MERGE_ZIPS) $(ZIP2ZIP) $(LOCAL_BUILT_MODULE): PRIVATE_RES_PACKAGE := $(my_res_package) $(LOCAL_BUILT_MODULE) : $(my_res_package) $(AAPT2) ifdef LOCAL_COMPRESSED_MODULE -$(LOCAL_BUILT_MODULE) : $(MINIGZIP) +$(LOCAL_BUILT_MODULE) : $(GZIP) endif ifeq (true, $(LOCAL_UNCOMPRESS_DEX)) $(LOCAL_BUILT_MODULE) : $(ZIP2ZIP) diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 3cac5d3a2d..923957e37b 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -357,7 +357,6 @@ PRODUCT_HOST_PACKAGES += \ incident_report \ ld.mc \ lpdump \ - minigzip \ mke2fs \ mkfs.erofs \ resize2fs \ diff --git a/tools/releasetools/Android.bp b/tools/releasetools/Android.bp index 7a2dcb76e3..5a7cc76bbc 100644 --- a/tools/releasetools/Android.bp +++ b/tools/releasetools/Android.bp @@ -168,7 +168,6 @@ python_defaults { "brillo_update_payload", "checkvintf", "generate_gki_certificate", - "minigzip", "lz4", "toybox", "unpack_bootimg", @@ -244,7 +243,6 @@ python_library_host { "bsdiff", "generate_gki_certificate", "imgdiff", - "minigzip", "lz4", "mkbootfs", "signapk", @@ -310,7 +308,6 @@ python_defaults { "deapexer", "generate_gki_certificate", "imgdiff", - "minigzip", "lz4", "mkbootfs", "signapk", diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 091121f2fe..ad0daeb63d 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -985,7 +985,7 @@ class PartitionBuildProps(object): each of the variables. ramdisk_format: If name is "boot", the format of ramdisk inside the boot image. Otherwise, its value is ignored. - Use lz4 to decompress by default. If its value is gzip, use minigzip. + Use lz4 to decompress by default. If its value is gzip, use gzip. """ def __init__(self, input_file, name, placeholder_values=None): @@ -1638,9 +1638,9 @@ def _MakeRamdisk(sourcedir, fs_config_file=None, p2 = Run(["lz4", "-l", "-12", "--favor-decSpeed"], stdin=p1.stdout, stdout=ramdisk_img.file.fileno()) elif ramdisk_format == RamdiskFormat.GZ: - p2 = Run(["minigzip"], stdin=p1.stdout, stdout=ramdisk_img.file.fileno()) + p2 = Run(["gzip"], stdin=p1.stdout, stdout=ramdisk_img.file.fileno()) else: - raise ValueError("Only support lz4 or minigzip ramdisk format.") + raise ValueError("Only support lz4 or gzip ramdisk format.") p2.wait() p1.wait() @@ -4075,7 +4075,7 @@ def GetBootImageBuildProp(boot_img, ramdisk_format=RamdiskFormat.LZ4): Get build.prop from ramdisk within the boot image Args: - boot_img: the boot image file. Ramdisk must be compressed with lz4 or minigzip format. + boot_img: the boot image file. Ramdisk must be compressed with lz4 or gzip format. Return: An extracted file that stores properties in the boot image. @@ -4094,11 +4094,11 @@ def GetBootImageBuildProp(boot_img, ramdisk_format=RamdiskFormat.LZ4): elif ramdisk_format == RamdiskFormat.GZ: with open(ramdisk, 'rb') as input_stream: with open(uncompressed_ramdisk, 'wb') as output_stream: - p2 = Run(['minigzip', '-d'], stdin=input_stream.fileno(), + p2 = Run(['gzip', '-d'], stdin=input_stream.fileno(), stdout=output_stream.fileno()) p2.wait() else: - logger.error('Only support lz4 or minigzip ramdisk format.') + logger.error('Only support lz4 or gzip ramdisk format.') return None abs_uncompressed_ramdisk = os.path.abspath(uncompressed_ramdisk)