config: BoardConfigReservedSize: Prevent overlayfs on remount

* When we remount partitions via `adb remount`, a scratch partition
  is made for overlayfs to use - this takes up space and breaks OTA.
  The end user /could/ run this to fix it:
  `adb reboot fastboot && fastboot delete-logical-partition scratch && fastboot reboot`
  But that's bad UX, remount should work. This ensures that with or without GMS,
  we reserve some space on all dynamic partitions.
* Set amount to `8 * 1024 * 1024` + 1 for good measure.
* Don't reserve this amount of `-user` builds as we don't remount
  there.

Change-Id: I969aea92747a17ceca299e109c6e0ab563951374
This commit is contained in:
Nolen Johnson 2024-04-18 00:12:29 -04:00 committed by Michael Bestas
parent 5fff206e72
commit 3940fb4240

View file

@ -9,11 +9,21 @@ ifneq ($(WITH_GMS),true)
BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT ?= -1
ifeq ($(BOARD_PRODUCTIMAGE_MINIMAL_PARTITION_RESERVED_SIZE),true)
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 1188036608
else
else # BOARD_PRODUCTIMAGE_MINIMAL_PARTITION_RESERVED_SIZE
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 1957691392
endif
BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT ?= -1
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE ?= 94371840
BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT ?= -1
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE ?= 94371840
else # WITH_GMS
ifneq ($(TARGET_BUILD_VARIANT),user)
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE ?= 8388609
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE ?= 8388609
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE ?= 8388609
endif
endif
ifneq ($(TARGET_BUILD_VARIANT),user)
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE ?= 8388609
endif