Switch from minigzip to gzip.
Bug: http://b/288169261 Test: treehugger Change-Id: I404cbcb850734ed8291c2215a4329fb372806d63
This commit is contained in:
parent
d952b49430
commit
97ad120adb
8 changed files with 14 additions and 18 deletions
|
@ -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
|
||||
|
||||
|
@ -5257,7 +5257,6 @@ INTERNAL_OTATOOLS_MODULES := \
|
|||
make_f2fs_casefold \
|
||||
merge_ota \
|
||||
merge_target_files \
|
||||
minigzip \
|
||||
mk_combined_img \
|
||||
mkbootfs \
|
||||
mkbootimg \
|
||||
|
|
|
@ -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)
|
||||
include $(BUILD_SBOM_GEN)
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -347,7 +347,6 @@ PRODUCT_HOST_PACKAGES += \
|
|||
incident_report \
|
||||
ld.mc \
|
||||
lpdump \
|
||||
minigzip \
|
||||
mke2fs \
|
||||
mkfs.erofs \
|
||||
resize2fs \
|
||||
|
|
|
@ -169,7 +169,6 @@ python_defaults {
|
|||
"brillo_update_payload",
|
||||
"checkvintf",
|
||||
"generate_gki_certificate",
|
||||
"minigzip",
|
||||
"lz4",
|
||||
"toybox",
|
||||
"unpack_bootimg",
|
||||
|
@ -245,7 +244,6 @@ python_library_host {
|
|||
"bsdiff",
|
||||
"generate_gki_certificate",
|
||||
"imgdiff",
|
||||
"minigzip",
|
||||
"lz4",
|
||||
"mkbootfs",
|
||||
"signapk",
|
||||
|
@ -311,7 +309,6 @@ python_defaults {
|
|||
"deapexer",
|
||||
"generate_gki_certificate",
|
||||
"imgdiff",
|
||||
"minigzip",
|
||||
"lz4",
|
||||
"mkbootfs",
|
||||
"signapk",
|
||||
|
|
|
@ -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):
|
||||
|
@ -1637,9 +1637,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()
|
||||
|
@ -4064,7 +4064,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.
|
||||
|
@ -4083,11 +4083,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)
|
||||
|
|
Loading…
Reference in a new issue