Yocto .sdcard rootfs flash file size

I’ve created images for the Jetson nano using the meta-tegra layer. When building an image, the default size of the .sdcard file that is needed to be flashed to the SD-card, is about 16GB (https://github.com/madisongh/meta-tegra/wiki/Flashing-the-Jetson-Dev-Kit).

Why is file size so big?- and is there any way to somehow minimize this size?

It seems very overkill to have a very VERY basic image, with a root file system .sdcard file with the size of 16GB.

Hi mci, the raw image is generated to be the same size as the default SD card partition, which is 16GB. Most of the raw image file that is generated is probably filled with zero’s.

You can try using the mksparse utility to compress it - see this post for more info:

https://devtalk.nvidia.com/default/topic/1052070/jetson-nano/jetson-nano-cloning-and-deployment-of-the-image-to-other-devices/post/5340589/#5340589

I am unsure of how it would work with Yocto image generated by the GitHub, but you can try it.

When I compress it, I see that about 15GB of the 16GB image are zeros. Thanks.