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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

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"

BB_GENERATE_MIRROR_TARBALLS = "1"

# BB_NO_NETWORK = "1"

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

Labels (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1129375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX%20Yocto%20Project%3A%20How%20Can%20I%20Quicken%20the%20Compilation%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1129375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E1.%20%3CSTRONG%3EIncreasing%20the%20number%20of%20threads.%3C%2FSTRONG%3E%20Make%20sure%20the%20Parallelism%20variables%20located%20on%20conf%2Flocal.conf%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CUL%3E%0A%3CLI%3EBB_NUMBER_THREADS%3A%20indicating%20how%20many%20task%20bitbake%20should%20run%20in%20parallel%3C%2FLI%3E%0A%3CLI%3EPARALLEL_MAKE%3A%20indicating%20how%20many%20processes%20make%20should%20run%20in%20parallel%3C%2FLI%3E%0A%3C%2FUL%3E%0A%0A%0A%0A%0A%20%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3Eare%20not%20commented%20and%20with%20correct%20values.%20The%20script%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FFreescale%2Ffsl-community-bsp-base%2Fblob%2Fmaster%2Fsetup-environment%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Esetup-enviroment%26nbsp%3B%20%3C%2FA%3Eautomatically%20sets%20these%20equal%20to%20the%20number%20of%20CPU%20cores.%20You%20can%20double%20this%20value%20if%20you%20want%20but%20there%20is%20no%20significant%20speed's%20gain.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E2.%20%3CSTRONG%3EHaving%20a%20local%20repository%20on%20the%20server.%3C%2FSTRONG%3E%20When%20baking%20an%20image%2C%20one%20of%20the%20first%20steps%20for%20each%20recipe%20is%20to%20fetch%20the%20source%20code%20(from%20git%20repos%2C%20tarballs%2C%20etc)%3B%20it%20makes%20sense%20to%20reuse%20this%20data%20for%20future%20builds%20and%20also%20share%20it%20with%20other%20server's%20users.%20You%20can%20indicate%20%3CEM%3Ebitbake%3C%2FEM%3E%20to%20look%20first%20at%20a%20local%20repo%20(%3CEM%3Efile%3A%2F%2F%3C%2FEM%3E)%20on%20your%20%3CEM%3Econf%2Flocal.conf%3C%2FEM%3E%20file%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CP%3ESOURCE_MIRROR_URL%20%3F%3D%20%22file%3A%2F%2F%2Fopt%2Fyocto%2Fdownload%2F%22%3C%2FP%3E%0A%3CP%3EINHERIT%20%2B%3D%20%22own-mirrors%22%3C%2FP%3E%0A%3CP%3EBB_GENERATE_MIRROR_TARBALLS%20%3D%20%221%22%3C%2FP%3E%0A%3CP%3E%23%20BB_NO_NETWORK%20%3D%20%221%22%3C%2FP%3E%0A%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3EJust%20make%20sure%20the%20%3CEM%3Edownload%3C%2FEM%3E%20folder%20has%20read%20access%20for%20all%20users%20(%3CEM%3Echmod%20a%2Br%20%2Fopt%2Fyocto%2Fdownload%2F%3C%2FEM%3E)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1129375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎02-08-2013 11:48 AM
Updated by: