cancel
Showing results for 
Search instead for 
Did you mean: 

Distribution/Package (Yocto) really slow bitbake compilation

SScar.2
Senior

Hi there,

I'm starting developing on an STM32MP157F-DK2 kit, and I wanted to build my own distribution, starting from the distribution package (STM32MP1 Distribution Package - stm32mpu). At the first compilation, the bitbake st-image-weston takes reaaaally long time. I already used Yocto with older projects, using competitors' boards, and I never faced such a slow compilation time, which seems weird to me.

Do you have any suggestions to speed up the process for your distribution?

I tried already to modify BB_NUMBER_THREADS  and PARALLEL_MAKE parameters in local.conf file but I didn't notice any real difference. Other ideas?

PS: I'm running my compilation on a virtual machine (running Ubuntu 20.04 lts OS), which has the minimum raccomandations that I found in some other thread here (sorry I don't remember where exactly): 6Gb of ram (ddr4 3200mhz) and 2 cores of physical CPU (intel i7-1165G7), totally not a bad machine in my opinion.

Thank you

Simone

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @SScar.2​,

I think you will not be able to go really faster than your last result. It is a quite good compilation time for a VM.

Kind regards,

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Erwan SZYMANSKI
ST Employee

Hello @SScar.2​,

You are right, a bitbake compilation take a really long time, we cannot say the opposite.

Regarding to your configuration, I understand that it can take some times due to your number of core, but as you said, you have not the worst setup ever for a virtual machine.

Can you tell me the time that it takes for you to compile a st-image-weston image ? Just to compare the delta with our native Linux machine ?

For the first compilation, before that everything is stored in cache, we do not have a lot of solution..

Thanks for your feedback.

Kind regards,

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Erwan SZYMANSKI​ ,

I just saw the logs, it took more or less 10 hours. Little side note, I'm using Virtual Box, not VMWare as you suggest... don't know if there's any performance difference.

By the way, I tweaked a little with local.conf parameters and some Yocto forums suggested setting:

  • BB_NUMBER_THREADS not greater than 20: I used 8, and the ST default is 2 (I think).
  • PARALLEL_MAKE equals the number of physical cores: 2 in my case, ST default I think is 1 (I could be wrong with that)

With this configuration, I noticed a quite good reduction in compilation time (still 10 hours). With default values, in 6 hours I couldn't reach the 30%.

Kind regards,

Simone

Hello @SScar.2​,

I think you will not be able to go really faster than your last result. It is a quite good compilation time for a VM.

Kind regards,

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Pavel A.
Evangelist III

> : 6Gb of ram (ddr4 3200mhz) and 2 cores of physical CPU (intel i7-1165G7)

What about the storage? Please don't tell that the files are not on nvme or SSD ...

Sorry, I forgot that detail. Files are on nvme (KBG40ZNS512G).

Do you have any suggestion?

Maybe get a better physical machine, local or cloud.

Recently I've used for yocto builds a VM hosted on a very powerful Xeon server with a lot of cores, there it takes ~ 3 hours.