diff options
author | Sam Protsenko <semen.protsenko@linaro.org> | 2019-08-02 20:51:34 +0300 |
---|---|---|
committer | Sam Protsenko <semen.protsenko@linaro.org> | 2019-12-13 20:09:52 +0200 |
commit | 1a5f434bc7c9ac6e3af0d57bc6c7def7bab1807f (patch) | |
tree | 932465c91208622f024d1422c70d8563e4a46204 /BoardConfig.mk | |
parent | 0dd976e6a6035b8358172193709b3ab8149e6b65 (diff) | |
download | beagle-x15-1a5f434bc7c9ac6e3af0d57bc6c7def7bab1807f.tar.gz |
Enable dynamic partitions
This enables dynamic partitions build, which applies next changes:
- building "super.img", which should be flashed to "super" partition;
it contains system and vendor logical partitions
- building boot.img with normal ramdisk; system won't be mounted as
root anymore (it will be mounted to /system), as system partition
is now logical partitions inside of super partition
- building recovery.img, as we can't use boot.img to store recovery
ramdisk anymore; we can't get away without recovery at all, because
flashing logical partitions is only possible from fastbootd mode,
which should be done on recovery boot
- fstab is changed to mount system and vendor as logical partitions
- early mounting should be removed from dts file, as system and vendor
are logical and can't be mounted that easy; it's done from fstab
now, when booting the ramdisk
Bootloader should be accommodated for this change, by replacing
"system" and "vendor" partitions with a single "super" partition. Also,
"skip_initramfs" param shouldn't be passed to kernel anymore, as we are
using ramdisk again.
In kernel we should remove dra7xx-android-fstab.dtsi file (so called
"dtb fstab", see [1] for details).
As super.img will be generated, one can flash it instead of system.img
and vendor.img, from bootloader's fastboot mode:
$ fastboot flash super super.img
If it's needed to only update system or vendor partition, one can reboot
to recovery mode, enter "Android Fastboot" (fastbootd), and flash
logical partitions from there, like this:
$ fastboot flash system_a system.img
[1] https://source.android.com/devices/architecture/kernel/mounting-partitions-early#fstab-entries
Change-Id: I83a2cff34ece945cae7689c6248bb7f1800cdac2
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Diffstat (limited to 'BoardConfig.mk')
-rw-r--r-- | BoardConfig.mk | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index af7c3a2..2f03a28 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -41,10 +41,18 @@ BOARD_FLASH_BLOCK_SIZE := 4096 USE_CAMERA_STUB := true -BOARD_BOOTIMAGE_PARTITION_SIZE := 20971520 # 20 MiB -BOARD_USERDATAIMAGE_PARTITION_SIZE := 1879048192 # 1792MB -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 # 1024MB -BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456 # 256MB +BOARD_BOOTIMAGE_PARTITION_SIZE := 20971520 # 20 MiB +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 # 64 MiB +BOARD_USERDATAIMAGE_PARTITION_SIZE := 961658368 # ~917 MiB + +BOARD_SUPER_PARTITION_SIZE := 2684354560 # 2560 MiB +BOARD_SUPER_PARTITION_GROUPS := group_oem +# In case when A/B is enabled and we have only one group: +# size_group = (size_super - 1 MiB) / 2 +BOARD_GROUP_OEM_SIZE := 1341652992 # 1279.5 MiB +BOARD_GROUP_OEM_PARTITION_LIST := system vendor +BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true +BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true TARGET_USERIMAGES_USE_EXT4 := true BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 @@ -53,11 +61,7 @@ TARGET_BOOTLOADER_BOARD_NAME := beagle_x15board TARGET_BOARD_PLATFORM := am57x TARGET_COPY_OUT_VENDOR := vendor -TARGET_NO_RECOVERY := true TARGET_RECOVERY_FSTAB := device/ti/beagle_x15/$(TARGET_FSTAB) -BOARD_USES_RECOVERY_AS_BOOT := true -BOARD_BUILD_SYSTEM_ROOT_IMAGE := true - TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" TARGET_RECOVERY_UI_LIB := librecovery_ui_beagle_x15 TARGET_RELEASETOOLS_EXTENSIONS := device/ti/beagle_x15 |