Message ID | 20230604123755.2541295-4-charles-antoine.couret@mind.be |
---|---|
State | New |
Headers | show |
Series | image_types: use IMAGE_FILE_MAXSIZE variable to create fixed partition size | expand |
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index f157a84b2e..b5d32b7622 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass @@ -250,6 +250,11 @@ IMAGE_CMD:f2fs () { # 500M the standard IMAGE_OVERHEAD_FACTOR does not work, so add additional # space here when under 500M size=${ROOTFS_SIZE} + + if [ -n "${IMAGE_FILE_MAXSIZE:f2fs}" ]; then + size=${IMAGE_FILE_MAXSIZE:f2fs} + fi + if [ ${size} -lt ${MIN_F2FS_SIZE} ] ; then size=${MIN_F2FS_SIZE} bbwarn "Rootfs size is too small for F2FS. Filesystem will be extended to ${size}K"
If defined, this variable value overrides the size of f2fs partition file created by mkfs. Otherwise previous logic based on ROOTFS_SIZE variable is used. It should be set when the final file size would not be above a specific value due to fixed partitionning for example. Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@mind.be> --- meta/classes-recipe/image_types.bbclass | 5 +++++ 1 file changed, 5 insertions(+)