ROOTFS_SIZE calculation

Hi,

I’m facing to a problem during do_image_ext4 task with my yocto project an especially during ROOTFS size calculation.

I’ve integrated Mender with these parameters:

MENDER_STORAGE_TOTAL_SIZE_MB_DEFAULT = "15028"
MENDER_STORAGE_TOTAL_SIZE_MB = "15028"
MENDER_DATA_PART_SIZE_MB = "7514"

So Mender calculate these partitions

boot => 16MB
rootA => 3749 MB
rootB => 37549MB

The size of my ROOTFS (without data directory) is 1GB.
During the build, a custom recipe move about 4GB into the data directory of the ROOTFS.

The problem is that during do_image_ext4 task, there is a check that verify if ROOTFS size do not exceed rootA/B partition size, and it fails because the check integrate data directory.

Is there a way to avoid that?

Depends a bit on which Yocto version you are running, but this has been fixed already,

This has been backported to thud

Thank you very much for the reply, I’m using sumo version so I’ve found another solution, I have overriden the the function “get_rootfs_size” of the poky image class and updated this line:

output = subprocess.check_output(['du', '-ks', '--exclude=data',
                                      d.getVar('IMAGE_ROOTFS')])
1 Like