Re: How to reduce rootfs image size?
Hi JH, The image root file system size is based on the actual content of the root file system. Besides ROOTFS_SIZE there are other variables that control how the root file system is sized: IMAGE_ROOTFS_SIZE: Defines the size in kilobytes of the created
root filesystem image. The IMAGE_ROOTFS_ALIGNMENT: Defines the alignment of the root
filesystem image in IMAGE_ROOTFS_EXTRA_SPACE: Adds extra free space to the root
filesystem image. The IMAGE_OVERHEAD_FACTOR: This variable specifies a multiplicator
for the root filesystem
Here is some pseudo code on how these variables are used to determine the final root file system size: _get_rootfs_size(): if (BASE_SIZE < IMAGE_ROOTFS_SIZE): IMG_SIZE = IMG_SIZE + IMAGE_ROOTFS_ALIGNMENT – 1 return IMG_SIZE
:rjs On 11/27/19 3:12 AM, JH wrote:
Hi, Does the Yocto rootfs image size is based on real contents included in the image-rootfs.tar.gz? When I build the image with very large size of applications and libraries such as boost, I have my image-rootfs.tr.gz about 44 MB, then I removed all large size of applications and libraries, I changed IMAGE_ROOTFS_SIZE to a small size IMAGE_ROOTFS_SIZE = 20000, I thought the image-rootfs.tar.gz should be reduced to a small size, but it is still 43 MB I don't believe it is that big, which variable I should use to reduce the image size? Thank you. Kind regards, - jh -- ----- Rudolf J Streif CEO/CTO ibeeto +1.855.442.3386 x700
|
|