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
|
COMPRESSION_COMMAND := $(LZ4) -l -12 --favor-decSpeed
|
||||||
RAMDISK_EXT := .lz4
|
RAMDISK_EXT := .lz4
|
||||||
else
|
else
|
||||||
COMPRESSION_COMMAND_DEPS := $(MINIGZIP)
|
COMPRESSION_COMMAND_DEPS := $(GZIP)
|
||||||
COMPRESSION_COMMAND := $(MINIGZIP)
|
COMPRESSION_COMMAND := $(GZIP)
|
||||||
RAMDISK_EXT := .gz
|
RAMDISK_EXT := .gz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -5257,7 +5257,6 @@ INTERNAL_OTATOOLS_MODULES := \
|
||||||
make_f2fs_casefold \
|
make_f2fs_casefold \
|
||||||
merge_ota \
|
merge_ota \
|
||||||
merge_target_files \
|
merge_target_files \
|
||||||
minigzip \
|
|
||||||
mk_combined_img \
|
mk_combined_img \
|
||||||
mkbootfs \
|
mkbootfs \
|
||||||
mkbootimg \
|
mkbootimg \
|
||||||
|
|
|
@ -227,7 +227,7 @@ endif
|
||||||
$(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs)
|
$(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs)
|
||||||
|
|
||||||
ifdef LOCAL_COMPRESSED_MODULE
|
ifdef LOCAL_COMPRESSED_MODULE
|
||||||
$(built_module) : $(MINIGZIP)
|
$(built_module) : $(GZIP)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(module_run_appcompat),true)
|
ifeq ($(module_run_appcompat),true)
|
||||||
|
@ -305,4 +305,4 @@ endif # LOCAL_PACKAGE_SPLITS
|
||||||
###########################################################
|
###########################################################
|
||||||
## SBOM generation
|
## SBOM generation
|
||||||
###########################################################
|
###########################################################
|
||||||
include $(BUILD_SBOM_GEN)
|
include $(BUILD_SBOM_GEN)
|
||||||
|
|
|
@ -645,10 +645,11 @@ else
|
||||||
# For non-supported hosts, do not generate breakpad symbols.
|
# For non-supported hosts, do not generate breakpad symbols.
|
||||||
BREAKPAD_GENERATE_SYMBOLS := false
|
BREAKPAD_GENERATE_SYMBOLS := false
|
||||||
endif
|
endif
|
||||||
|
GZIP := prebuilts/build-tools/path/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/gzip
|
||||||
PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX)
|
PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX)
|
||||||
NANOPB_SRCS := $(HOST_OUT_EXECUTABLES)/protoc-gen-nanopb
|
NANOPB_SRCS := $(HOST_OUT_EXECUTABLES)/protoc-gen-nanopb
|
||||||
MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX)
|
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)
|
LZ4 := $(HOST_OUT_EXECUTABLES)/lz4$(HOST_EXECUTABLE_SUFFIX)
|
||||||
GENERATE_GKI_CERTIFICATE := $(HOST_OUT_EXECUTABLES)/generate_gki_certificate$(HOST_EXECUTABLE_SUFFIX)
|
GENERATE_GKI_CERTIFICATE := $(HOST_OUT_EXECUTABLES)/generate_gki_certificate$(HOST_EXECUTABLE_SUFFIX)
|
||||||
ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG)))
|
ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG)))
|
||||||
|
|
|
@ -2941,7 +2941,7 @@ endef
|
||||||
define compress-package
|
define compress-package
|
||||||
$(hide) \
|
$(hide) \
|
||||||
mv $@ $@.uncompressed; \
|
mv $@ $@.uncompressed; \
|
||||||
$(MINIGZIP) -9 -c $@.uncompressed > $@.compressed; \
|
$(GZIP) -9 -c $@.uncompressed > $@.compressed; \
|
||||||
rm -f $@.uncompressed; \
|
rm -f $@.uncompressed; \
|
||||||
mv $@.compressed $@;
|
mv $@.compressed $@;
|
||||||
endef
|
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): PRIVATE_RES_PACKAGE := $(my_res_package)
|
||||||
$(LOCAL_BUILT_MODULE) : $(my_res_package) $(AAPT2)
|
$(LOCAL_BUILT_MODULE) : $(my_res_package) $(AAPT2)
|
||||||
ifdef LOCAL_COMPRESSED_MODULE
|
ifdef LOCAL_COMPRESSED_MODULE
|
||||||
$(LOCAL_BUILT_MODULE) : $(MINIGZIP)
|
$(LOCAL_BUILT_MODULE) : $(GZIP)
|
||||||
endif
|
endif
|
||||||
ifeq (true, $(LOCAL_UNCOMPRESS_DEX))
|
ifeq (true, $(LOCAL_UNCOMPRESS_DEX))
|
||||||
$(LOCAL_BUILT_MODULE) : $(ZIP2ZIP)
|
$(LOCAL_BUILT_MODULE) : $(ZIP2ZIP)
|
||||||
|
|
|
@ -347,7 +347,6 @@ PRODUCT_HOST_PACKAGES += \
|
||||||
incident_report \
|
incident_report \
|
||||||
ld.mc \
|
ld.mc \
|
||||||
lpdump \
|
lpdump \
|
||||||
minigzip \
|
|
||||||
mke2fs \
|
mke2fs \
|
||||||
mkfs.erofs \
|
mkfs.erofs \
|
||||||
resize2fs \
|
resize2fs \
|
||||||
|
|
|
@ -169,7 +169,6 @@ python_defaults {
|
||||||
"brillo_update_payload",
|
"brillo_update_payload",
|
||||||
"checkvintf",
|
"checkvintf",
|
||||||
"generate_gki_certificate",
|
"generate_gki_certificate",
|
||||||
"minigzip",
|
|
||||||
"lz4",
|
"lz4",
|
||||||
"toybox",
|
"toybox",
|
||||||
"unpack_bootimg",
|
"unpack_bootimg",
|
||||||
|
@ -245,7 +244,6 @@ python_library_host {
|
||||||
"bsdiff",
|
"bsdiff",
|
||||||
"generate_gki_certificate",
|
"generate_gki_certificate",
|
||||||
"imgdiff",
|
"imgdiff",
|
||||||
"minigzip",
|
|
||||||
"lz4",
|
"lz4",
|
||||||
"mkbootfs",
|
"mkbootfs",
|
||||||
"signapk",
|
"signapk",
|
||||||
|
@ -311,7 +309,6 @@ python_defaults {
|
||||||
"deapexer",
|
"deapexer",
|
||||||
"generate_gki_certificate",
|
"generate_gki_certificate",
|
||||||
"imgdiff",
|
"imgdiff",
|
||||||
"minigzip",
|
|
||||||
"lz4",
|
"lz4",
|
||||||
"mkbootfs",
|
"mkbootfs",
|
||||||
"signapk",
|
"signapk",
|
||||||
|
|
|
@ -985,7 +985,7 @@ class PartitionBuildProps(object):
|
||||||
each of the variables.
|
each of the variables.
|
||||||
ramdisk_format: If name is "boot", the format of ramdisk inside the
|
ramdisk_format: If name is "boot", the format of ramdisk inside the
|
||||||
boot image. Otherwise, its value is ignored.
|
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):
|
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,
|
p2 = Run(["lz4", "-l", "-12", "--favor-decSpeed"], stdin=p1.stdout,
|
||||||
stdout=ramdisk_img.file.fileno())
|
stdout=ramdisk_img.file.fileno())
|
||||||
elif ramdisk_format == RamdiskFormat.GZ:
|
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:
|
else:
|
||||||
raise ValueError("Only support lz4 or minigzip ramdisk format.")
|
raise ValueError("Only support lz4 or gzip ramdisk format.")
|
||||||
|
|
||||||
p2.wait()
|
p2.wait()
|
||||||
p1.wait()
|
p1.wait()
|
||||||
|
@ -4064,7 +4064,7 @@ def GetBootImageBuildProp(boot_img, ramdisk_format=RamdiskFormat.LZ4):
|
||||||
Get build.prop from ramdisk within the boot image
|
Get build.prop from ramdisk within the boot image
|
||||||
|
|
||||||
Args:
|
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:
|
Return:
|
||||||
An extracted file that stores properties in the boot image.
|
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:
|
elif ramdisk_format == RamdiskFormat.GZ:
|
||||||
with open(ramdisk, 'rb') as input_stream:
|
with open(ramdisk, 'rb') as input_stream:
|
||||||
with open(uncompressed_ramdisk, 'wb') as output_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())
|
stdout=output_stream.fileno())
|
||||||
p2.wait()
|
p2.wait()
|
||||||
else:
|
else:
|
||||||
logger.error('Only support lz4 or minigzip ramdisk format.')
|
logger.error('Only support lz4 or gzip ramdisk format.')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
abs_uncompressed_ramdisk = os.path.abspath(uncompressed_ramdisk)
|
abs_uncompressed_ramdisk = os.path.abspath(uncompressed_ramdisk)
|
||||||
|
|
Loading…
Reference in a new issue