diff mbox series

[2/4] Add support for custom userdata sizes

Message ID 1493352171-30851-2-git-send-email-john.stultz@linaro.org
State New
Headers show
Series [1/4] device.mk: Add options to make things perform a bit better in lowmemory situations | expand

Commit Message

John Stultz April 28, 2017, 4:02 a.m. UTC
While the parititions can be resized using Rob's scripts
in order to have the userdata generation be similar to how
existing Android builds work, add a config for the userdata
size. The default is the same as the previous build size.

Cc: Rob Herring <rob.herring@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Vishal Bhoj <vishal.bhoj@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>

---
 BoardConfig.mk           | 1 -
 Kconfig                  | 6 ++++++
 configs/db410c_defconfig | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/BoardConfig.mk b/BoardConfig.mk
index 11a1f20..fb5bfc5 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -29,7 +29,6 @@  BOARD_HOSTAPD_DRIVER := NL80211
 CONFIG_DRIVER_NL80211 := y
 
 TARGET_USERIMAGES_USE_EXT4 := true
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
 BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
 BOARD_FLASH_BLOCK_SIZE := 512
diff --git a/Kconfig b/Kconfig
index 4b355ca..555127a 100644
--- a/Kconfig
+++ b/Kconfig
@@ -172,6 +172,12 @@  config BOARD_SYSTEMIMAGE_PARTITION_SIZE
 	help
 	  BOARD_SYSTEMIMAGE_PARTITION_SIZE
 
+config BOARD_USERDATAIMAGE_PARTITION_SIZE
+	int "Userdata Image Size"
+	default 576716800
+	help
+	  BOARD_USERDATAIMAGE_PARTITION_SIZE
+
 config TARGET_USERIMAGES_SPARSE_EXT_DISABLED
 	bool "Disable sparse filesystem images"
 	help
diff --git a/configs/db410c_defconfig b/configs/db410c_defconfig
index 1012063..e523327 100644
--- a/configs/db410c_defconfig
+++ b/configs/db410c_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_PRODUCT_DEVICE="db410c"
 CONFIG_DALVIK_VM_HEAPSIZE=32
 CONFIG_BOARD_SYSTEMIMAGE_PARTITION_SIZE=880803840
+CONFIG_BOARD_USERDATAIMAGE_PARTITION_SIZE=5653544960
 CONFIG_KERNEL=y
 CONFIG_KERNEL_PATH="device/linaro/generic-kernels/android-db410c-qcomlt-4.9.gz-dtb"
 CONFIG_BOARD_KERNEL_CMDLINE="androidboot.selinux=permissive firmware_class.path=/system/vendor/firmware/"