use minigzip instead of system gzip in the build
Use zlib's minigzip utility, built as part of our source tree, instead of whatever installation of GNU gzip happens to be on the user's machine. Using zlib's deflater, which is nicely available as a library (unlike GNU gzip's deflater) will ultimately let us do binary patches to the boot and recovery images.
This commit is contained in:
@@ -249,9 +249,9 @@ BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
|
|||||||
|
|
||||||
# We just build this directly to the install location.
|
# We just build this directly to the install location.
|
||||||
INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
|
INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
|
||||||
$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES)
|
$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP)
|
||||||
$(call pretty,"Target ram disk: $@")
|
$(call pretty,"Target ram disk: $@")
|
||||||
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | gzip > $@
|
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
||||||
@@ -438,8 +438,8 @@ $(eval $(call combine-notice-files, \
|
|||||||
# the module processing has already been done -- in fact, we used the
|
# the module processing has already been done -- in fact, we used the
|
||||||
# fact that all that has been done to get the list of modules that we
|
# fact that all that has been done to get the list of modules that we
|
||||||
# need notice files for.
|
# need notice files for.
|
||||||
$(target_notice_file_html_gz): $(target_notice_file_html)
|
$(target_notice_file_html_gz): $(target_notice_file_html) | $(MINIGZIP)
|
||||||
gzip -c $< > $@
|
$(MINIGZIP) -9 < $< > $@
|
||||||
installed_notice_html_gz := $(TARGET_OUT)/etc/NOTICE.html.gz
|
installed_notice_html_gz := $(TARGET_OUT)/etc/NOTICE.html.gz
|
||||||
$(installed_notice_html_gz): $(target_notice_file_html_gz) | $(ACP)
|
$(installed_notice_html_gz): $(target_notice_file_html_gz) | $(ACP)
|
||||||
$(copy-file-to-target)
|
$(copy-file-to-target)
|
||||||
@@ -673,7 +673,7 @@ $(RECOVERY_INSTALL_OTA_KEYS): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR)
|
|||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) > $@
|
java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) > $@
|
||||||
|
|
||||||
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) \
|
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
|
||||||
$(INSTALLED_RAMDISK_TARGET) \
|
$(INSTALLED_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||||
$(recovery_binary) \
|
$(recovery_binary) \
|
||||||
@@ -698,7 +698,7 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) \
|
|||||||
cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys
|
cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys
|
||||||
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
|
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
|
||||||
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
|
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
|
||||||
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | gzip > $(recovery_ramdisk)
|
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
|
||||||
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@
|
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@
|
||||||
@echo ----- Made recovery image -------- $@
|
@echo ----- Made recovery image -------- $@
|
||||||
$(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE))
|
$(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE))
|
||||||
|
@@ -156,6 +156,7 @@ AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
|
|||||||
ICUDATA := $(HOST_OUT_EXECUTABLES)/icudata$(HOST_EXECUTABLE_SUFFIX)
|
ICUDATA := $(HOST_OUT_EXECUTABLES)/icudata$(HOST_EXECUTABLE_SUFFIX)
|
||||||
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
|
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||||
MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX)
|
MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX)
|
||||||
|
MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX)
|
||||||
MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX)
|
MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX)
|
||||||
MKYAFFS2 := $(HOST_OUT_EXECUTABLES)/mkyaffs2image$(HOST_EXECUTABLE_SUFFIX)
|
MKYAFFS2 := $(HOST_OUT_EXECUTABLES)/mkyaffs2image$(HOST_EXECUTABLE_SUFFIX)
|
||||||
APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX)
|
APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX)
|
||||||
@@ -274,7 +275,7 @@ PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
|
|||||||
# The 'current' version is whatever this source tree is. Once the apicheck
|
# The 'current' version is whatever this source tree is. Once the apicheck
|
||||||
# tool can generate the stubs from the xml files, we'll use that to be
|
# tool can generate the stubs from the xml files, we'll use that to be
|
||||||
# able to build back-versions. In the meantime, 'current' is the only
|
# able to build back-versions. In the meantime, 'current' is the only
|
||||||
# one supported.
|
# one supported.
|
||||||
#
|
#
|
||||||
# sgrax is the opposite of xargs. It takes the list of args and puts them
|
# sgrax is the opposite of xargs. It takes the list of args and puts them
|
||||||
# on each line for sort to process.
|
# on each line for sort to process.
|
||||||
|
Reference in New Issue
Block a user