i.MX Yocto Project: How Can I Quicken the Compilation?

Document created by Leonardo Sandoval Gonzalez Employee on Feb 8, 2013Last modified by Leonardo Sandoval Gonzalez Employee on Jun 12, 2013
Version 4Show Document
  • View in full screen mode

1. Increasing the number of threads. Make sure the Parallelism variables located on conf/local.conf


  • BB_NUMBER_THREADS: indicating how many task bitbake should run in parallel
  • PARALLEL_MAKE: indicating how many processes make should run in parallel


are not commented and with correct values. The script  setup-enviroment  automatically sets these equal to the number of CPU cores. You can double this value if you want but there is no significant speed's gain.



2. Having a local repository on the server. When baking an image, one of the first steps for each recipe is to fetch the source code (from git repos, tarballs, etc); it makes sense to reuse this data for future builds and also share it with other server's users. You can indicate bitbake to look first at a local repo (file://) on your conf/local.conf file


SOURCE_MIRROR_URL ?= "file:///opt/yocto/download/"

INHERIT += "own-mirrors"




Just make sure the download folder has read access for all users (chmod a+r /opt/yocto/download/)

3 people found this helpful