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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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/)

标签 (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1129375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX%20Yocto%20%E9%A1%B9%E7%9B%AE%EF%BC%9A%E5%A6%82%E4%BD%95%E5%8A%A0%E5%BF%AB%E7%BC%96%E8%AF%91%E9%80%9F%E5%BA%A6%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1129375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E1.%3CSTRONG%3E%E5%A2%9E%E5%8A%A0%E7%BA%BF%E7%A8%8B%E6%95%B0%E3%80%82%3C%2FSTRONG%3E%E7%A1%AE%E4%BF%9D%E5%B9%B6%E8%A1%8C%E5%8F%98%E9%87%8F%E4%BD%8D%E4%BA%8E%20conf%2Flocal.conf%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CUL%3E%0A%3CLI%3EBB_NUMBER_THREADS%EF%BC%9A%E6%8C%87%E7%A4%BA%E5%BA%94%E5%B9%B6%E8%A1%8C%E8%BF%90%E8%A1%8C%E5%A4%9A%E5%B0%91%E4%B8%AA%E4%BB%BB%E5%8A%A1%20bitbake%3C%2FLI%3E%0A%3CLI%3EPARALLEL_MAKE%EF%BC%9A%E6%8C%87%E7%A4%BA%E5%BA%94%E8%AF%A5%E5%B9%B6%E8%A1%8C%E8%BF%90%E8%A1%8C%E5%A4%9A%E5%B0%91%E4%B8%AA%E8%BF%9B%E7%A8%8B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%0A%0A%0A%0A%20%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3E%E6%B2%A1%E6%9C%89%E6%B3%A8%E9%87%8A%E4%B8%94%E5%80%BC%E4%B8%8D%E6%AD%A3%E7%A1%AE%E3%80%82%E8%84%9A%E6%9C%AC%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%3C%2FA%3E%E8%87%AA%E5%8A%A8%E5%B0%86%E8%BF%99%E4%BA%9B%E8%AE%BE%E7%BD%AE%E4%B8%BA%E7%AD%89%E4%BA%8E%20CPU%20%E6%A0%B8%E5%BF%83%E7%9A%84%E6%95%B0%E9%87%8F%E3%80%82%E5%A6%82%E6%9E%9C%E6%82%A8%E6%84%BF%E6%84%8F%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%B0%86%E8%AF%A5%E5%80%BC%E5%8A%A0%E5%80%8D%EF%BC%8C%E4%BD%86%E4%B8%8D%E4%BC%9A%E6%9C%89%E6%98%8E%E6%98%BE%E7%9A%84%E9%80%9F%E5%BA%A6%E6%8F%90%E5%8D%87%E3%80%82%3C%2FP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E%0A%3CP%3EINHERIT%20%2B%3D%20%E2%80%9C%E8%87%AA%E5%B7%B1%E7%9A%84%E9%95%9C%E5%83%8F%E2%80%9D%3C%2FP%3E%0A%3CP%3EBB_GENERATE_MIRROR_TARBALLS%20%3D%20%221%22%3C%2FP%3E%0A%3CP%3E%23BB_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%3E%E5%8F%AA%E9%9C%80%E7%A1%AE%E4%BF%9D%E6%89%80%E6%9C%89%E7%94%A8%E6%88%B7%E9%83%BD%E5%85%B7%E6%9C%89%3CEM%3E%E4%B8%8B%E8%BD%BD%3C%2FEM%3E%E6%96%87%E4%BB%B6%E5%A4%B9%E7%9A%84%E8%AF%BB%E5%8F%96%E6%9D%83%E9%99%90%EF%BC%88%20%3CEM%3Echmod%20a%2Br%20%2Fopt%2Fyocto%2Fdownload%2F%3C%2FEM%3E%20%EF%BC%89%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
无评分
版本历史
最后更新:
‎02-08-2013 11:48 AM
更新人: