[yocto] Reducing the size of the image by optimizing python

Richard Purdie richard.purdie at linuxfoundation.org
Sat Oct 19 07:34:58 PDT 2019


On Sat, 2019-10-19 at 12:45 +0000, Abhi Arora wrote:
> Thanks for the reply. Can you help me which file to modify to prevent
> downloading certain packages and modules using BAD_RECOMMENDATION? 
> 
> And how to have only pyc files in the final image to improve speed
> and reduce footprint?
> 
> Following are the lines in my yocto project which install python
> packages.
> 
> IMAGE_INSTALL_append = " \
>     python3 \
>     python3-core \
>     python3-misc \
>     python3-async \
>     python3-six \
>     python3-websockets \
>     python3-requests \
>     python3-urllib3 \
>     python3-chardet \
>     python3-websocket-client \
>     python3-pyopenssl \
>     python3-simplejson \
>     python3-cython \
> 
> Pardon for some stupid questions as I am new to yocto.

Take python3-misc out that list as its huge. See if anything breaks, if
so, try and install just what you need, not the large "catchall"
package.

Cheers,

Richard



More information about the yocto mailing list