[i.MX8M] fsl-yocto-L4.9.51_mx8mq-ga sstate & download

Document:i.MX Yocto Project User's Guide

A.2 Local configuration tuning

A Yocto Project build can take considerable build resources both in time and disk usage, especially when building in multiple build directories. There are methods to optimize this, for example, use a shared sstate cache (caches the state of the build) and downloads directory (holds the downloaded packages). These can be set to be at any location in the local.conf file by adding statements such as these:

DL_DIR="/opt/freescale/yocto/imx/download"
SSTATE_DIR="/opt/freescale/yocto/imx/sstate-cache"

The directories need to already exist and have appropriate permissions. The shared sstate helps when multiple build directories are set, each of which uses a shared cache to minimize the build time. A shared download directory minimizes the fetch time. Without these settings, Yocto Project defaults to the build directory for the sstate cache and downloads.

Every package downloaded in the DL_DIR directory is marked with a <package name>.done. If your network has a problem fetching a package, you can manually copy the backup version of package to the DL_DIR directory and create a <package_name>.done file with the touch command. Then run the bitbake command: bitbake <component>.

這部分主要是提供在不同project之間sstate cache以及download package的共用的方法,以提高complie速度。

留言