Reduce Yocto image size

I followed the below steps to add python3 in my Yocto image, i can build it succufuly but i cannot flash it in the module because the size of yocto_wp77xx.4k.cwe is too big.

  • In ./meta-swi/meta-swi-mdm9x28/recipes-core/images/ = IMAGE_INSTALL_append = " python3"
  • In ./meta-swi/meta-swi-mdm9x28/conf/machine/swi-mdm9x28.conf = UBI_ROOTFS_SIZE ?= “48MiB”

What can i do in this situation? what can i remove from yocto to make my image fills the module?

here is a document showing how to run additional python library in RAM, maybe it can help you:

Also you might need to see if you can use AT!PARTITION to enlarge the rootFS partition.

Hi @jyijyi sorry but the RAM is not an option for us.

For AT!PARTITION, i have as information that on FX30 you do not support resize image partition, it doesn’t work for us.

may I know why RAM is not option for you?

You can write a init script to automatically extract it to RAM during each boot up.

this solution may work for a development environment but is not suitable for a distribution, as it would have to be reloaded in RAM each time the device is restarted.

Another solution is to put all additional libraries in /home/root, each time boot up, create some dynamic link (ln -s ) in /usr/lib to link to these libraries

In this case, you don’t need to extract the zipped file of python3 each power cycle.

FYI, proof of concept on using python3 here: