I assume all builds takes 2 ~ 3 days, I think it is too long.

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

I assume all builds takes 2 ~ 3 days, I think it is too long.

777 Views
yibhan
Contributor III
  • I think it takes too long to complete each of do_compile, it sometimes reached to almost one hour each of do_compile.
  • I am using imx-yocto-LF_L5.4.3_1.0.0 with distro is xwayland and graphics backends is qt5, and evaluation board is imx6qpsabresd, for more information, ubuntu 16.04 is used and harddisk is about 200GB, RAM is 8GB and using VMware
  • Main CPU is Intel(R) Core(TM) i5-9400f CPU 2.90GHZ and RAM is 16.0GB
  • I assume all builds takes 2 ~ 3 days, I think it is too long. Do you have ideas to check my issue?
Labels (3)
0 Kudos
2 Replies

664 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Yes, the build will take a long time, here I see you are using RAM is 8GB. Recommend you to use 16GB RAM is better.

0 Kudos

664 Views
dibyajyoti
Contributor II

Hi yibhan@eosystem.com

As per my understanding, your issue is Yocto build speed. If my understanding is right, you can fine-tune your Yocto build speed substantially with the following factors:

  • First of all try to use a 64bit build environment. Otherwise, you will lose the benefit of your resources sharply.
  • Moreover, I am not sure why you require VMware. That tool itself consumes lot of resources.
  • After you prepare your build folder with source setup-environment ./<your_yocto_build_dir> move into it, and edit the following within the <your_yocto_build_dir>/conf/local.conf:
    • uncomment "DL_DIR" variable value and set it to some fixed value for all your builds.
      • for example, DL_DIR ?= "/home/project/yocto/cache/downloads"
    • uncomment "SSTATE_DIR" variable value and set it to some fixed value for all your builds.
      • for example, DL_DIR ?= "/home/project/yocto/cache/sstate"

The above modifications should significantly improve your Yocto build speed.

Moreover, in addition to these, please check whether, CPU cores are getting a bottleneck for you, as you are attempting to execute many builds simultaneously. If that is the case, then try to restrict the CPU cores used by each build just by adding the below two lines to your <your_yocto_build_dir>/conf/local.conf:

BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"

   By the way, adjust the number 2 with the number that fits your system. Remember, lower number slows down the Yocto build. Higher number increases that specific Yocto build, but can starve others, i.e other Yocto builds also.

   After all these changes, move to the Yocto base directory, and execute source setup-environment ./<your_yocto_build_dir>.

Thanks a lot,

Dibyajyoti