-
Notifications
You must be signed in to change notification settings - Fork 0
/
custombootimg.mk
30 lines (24 loc) · 1.4 KB
/
custombootimg.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
LZMA_BIN := $(shell which lzma)
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) \
$(recovery_ramdisk) \
$(recovery_uncompressed_ramdisk) \
$(recovery_kernel)
@echo -e ${CL_CYN}"----- Compressing recovery ramdisk with lzma ------"${CL_RST}
rm -f $(recovery_uncompressed_ramdisk).lzma
$(LZMA_BIN) $(recovery_uncompressed_ramdisk)
$(hide) cp $(recovery_uncompressed_ramdisk).lzma $(recovery_ramdisk)
@echo ----- Making recovery image ------
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
@echo -e ${CL_CYN}"----- Made recovery image -------- $@"${CL_RST}
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
#####################################################################
######### Compress kernel ramdisk using LZMA LehKeda Edit ###########
#####################################################################
LZMA_BOOT_RAMDISK := $(PRODUCT_OUT)/ramdisk-lzma.img
$(LZMA_BOOT_RAMDISK): $(BUILT_RAMDISK_TARGET)
gunzip -f < $(BUILT_RAMDISK_TARGET) | lzma -e > $@
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(LZMA_BOOT_RAMDISK)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ --ramdisk $(LZMA_BOOT_RAMDISK)
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
@echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}