lineageos4microg / docker-lineage-cicd

Docker microservice for LineageOS Continuous Integration and Continous Deployment
https://hub.docker.com/r/lineageos4microg/docker-lineage-cicd
GNU General Public License v3.0
480 stars 189 forks source link

Document that `PARTITION_RESERVED_SIZE` values are configurable using environment variables #618

Open petefoth opened 2 months ago

petefoth commented 2 months ago

See https://source.android.com/docs/core/ota/dynamic_partitions/implement#dyanimic-partitions-sizing

To fix #616 I had to tinker with the BOARD_EXTIMAGE_PARTITION_RESERVED_SIZE value

A while ago there was discussion about the size of the size of the system image, and how this is affected by the WITH_GMSflag

These variables are conditionally set in vendor/lineage/config/BoardConfigReservedSize.mk . they are set using the ?= make operator to set the variable only if it is not already set (see this blog post). So the values in this file are

So, if we give these environment variables a value (using a -e statement in the docker run command), then this value will overrride the value in BoardConfigReservedSize.mk, but will themselves be overridden by any values set in device-specific makefiles.

At the moment, we need to give BOARD_EXTIMAGE_PARTITION_RESERVED_SIZE a bigger value, otherwise our 21.0 builds will fail, at least for some devices. We don't need to mess with the values of the other PARTITION_RESERVED_SIZE variables, but we should document in the README.md that if builders do need to change the value of those variables, they can do so by setting them in a using a -e statement in the docker run command. We don't need to implement our own variable for this. This applies for all the variables that are conditionally set in BoardConfigReservedSize.mk` including:

BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE