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.cou...@mind.be>
---
 meta/classes-recipe/image_types.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/classes-recipe/image_types.bbclass 
b/meta/classes-recipe/image_types.bbclass
index 1356552445..6e3190fa3f 100644
--- a/meta/classes-recipe/image_types.bbclass
+++ b/meta/classes-recipe/image_types.bbclass
@@ -272,6 +272,12 @@ IMAGE_CMD:f2fs () {
         # 500M the standard IMAGE_OVERHEAD_FACTOR does not work, so add 
additional
         # space here when under 500M
        size=${ROOTFS_SIZE}
+       image_file_maxsize=${@get_max_image_size(d, "f2fs")}
+
+       if [[ "${image_file_maxsize}" -ne 0 ]]; then
+               size=${image_file_maxsize}
+       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"
-- 
2.41.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190052): 
https://lists.openembedded.org/g/openembedded-core/message/190052
Mute This Topic: https://lists.openembedded.org/mt/102331603/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to