summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaio Schnepper <caioschnepper@gmail.com>2015-07-04 22:57:09 -0300
committerCaio Schnepper <caioschnepper@gmail.com>2015-07-05 19:06:21 -0300
commitb0d7d4fa6f15961caa320fdeb5a5c51533a15ad0 (patch)
tree39916beb53e52908261f579d31f798991be12ad8
parent24b15d402db91a2466eeed0a27ec7653fe45ab61 (diff)
downloaddevice_samsung_galaxys2-common-b0d7d4fa6f15961caa320fdeb5a5c51533a15ad0.zip
device_samsung_galaxys2-common-b0d7d4fa6f15961caa320fdeb5a5c51533a15ad0.tar.gz
device_samsung_galaxys2-common-b0d7d4fa6f15961caa320fdeb5a5c51533a15ad0.tar.bz2
releasetools: resize system partition after flashing
resize2fs.static is placed in install/bin, possible to run without /system mounted. running it will resize /system to the actual system partition size, supporting custom pits with block-based OTAs Change-Id: Id2c82add1f697ae3d7e5a1031f6a6d51a4ee53e0
-rw-r--r--BoardCommonConfig.mk1
-rw-r--r--common.mk5
-rw-r--r--releasetools/extensions/releasetools.py10
3 files changed, 14 insertions, 2 deletions
diff --git a/BoardCommonConfig.mk b/BoardCommonConfig.mk
index 8a9b254..abef610 100644
--- a/BoardCommonConfig.mk
+++ b/BoardCommonConfig.mk
@@ -71,6 +71,7 @@ BOARD_FLASH_BLOCK_SIZE := 4096
# Releasetools
TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT := ./device/samsung/galaxys2-common/releasetools/galaxys2_ota_from_target_files
TARGET_RELEASETOOL_IMG_FROM_TARGET_SCRIPT := ./device/samsung/galaxys2-common/releasetools/galaxys2_img_from_target_files
+TARGET_RELEASETOOLS_EXTENSIONS := ./device/samsung/galaxys2-common/releasetools/extensions
# Hardware tunables
BOARD_HARDWARE_CLASS := hardware/samsung/cmhw
diff --git a/common.mk b/common.mk
index 9c00d31..0cbd72b 100644
--- a/common.mk
+++ b/common.mk
@@ -130,9 +130,10 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Filesystem management tools
PRODUCT_PACKAGES += \
- static_busybox \
make_ext4fs \
- setup_fs
+ resize2fs_static \
+ setup_fs \
+ static_busybox
# Live Wallpapers
PRODUCT_PACKAGES += \
diff --git a/releasetools/extensions/releasetools.py b/releasetools/extensions/releasetools.py
new file mode 100644
index 0000000..b64b999
--- /dev/null
+++ b/releasetools/extensions/releasetools.py
@@ -0,0 +1,10 @@
+import common
+import struct
+
+def FullOTA_PostValidate(info):
+ # run e2fsck
+ info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "/dev/block/mmcblk0p9");');
+ # resize2fs: run and delete
+ info.script.AppendExtra('run_program("/tmp/install/bin/resize2fs_static", "/dev/block/mmcblk0p9");');
+ # run e2fsck
+ info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "/dev/block/mmcblk0p9");');