aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2015-03-01 22:37:11 +0100
committerAndreas Blaesius <skate4life@gmx.de>2015-07-15 14:05:11 -0700
commitf3d56f9c702e6a85508a14e538aa4de5ef55520b (patch)
tree4a5360629f37fdd136ee9d2b077842485f111513
parent8e1b21fdadaae0fd58351b80a368d64ccfe54bb2 (diff)
downloaddevice_samsung_espresso3g-f3d56f9c702e6a85508a14e538aa4de5ef55520b.zip
device_samsung_espresso3g-f3d56f9c702e6a85508a14e538aa4de5ef55520b.tar.gz
device_samsung_espresso3g-f3d56f9c702e6a85508a14e538aa4de5ef55520b.tar.bz2
Use LZMA compression for recovery's ramdisk
Also set BOARD_CANT_BUILD_RECOVERY_FROM_BOOT_PATCH=true , else compiling will fail. This happens because imgdiff on recovery_from_boot.p expects a ramdisk to use GZIP, which is causing a chunk size issue if recovery is using LZMA Change-Id: I5a27136c973d6641264249a7fb209848456bb283
-rw-r--r--BoardConfigCommon.mk3
-rw-r--r--custombootimg.mk22
2 files changed, 25 insertions, 0 deletions
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 1ff94ec..467c0ef 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -119,5 +119,8 @@ TARGET_RECOVERY_FSTAB := device/samsung/p5100/rootdir/fstab.espresso10
RECOVERY_FSTAB_VERSION := 2
BOARD_HAS_DOWNLOAD_MODE := true
+BOARD_CUSTOM_BOOTIMG_MK := device/samsung/p5100/custombootimg.mk
+BOARD_CANT_BUILD_RECOVERY_FROM_BOOT_PATCH=true
+
# Use the non-open-source parts, if they're present
-include vendor/samsung/p51xx/BoardConfigVendor.mk
diff --git a/custombootimg.mk b/custombootimg.mk
new file mode 100644
index 0000000..bf84033
--- /dev/null
+++ b/custombootimg.mk
@@ -0,0 +1,22 @@
+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)
+
+
+$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
+ $(call pretty,"Target boot image: $@")
+ $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
+ $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
+ @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}