How to add more threads when building?
Asked Answered
F

1

6

When doing

bitbake core-image-xxxx

the build task will auto select 8 threads (since my CPU has 8 cores) to build the image.

My system has 72GB RAM, can I force bitbake to run with more threads?

Or any way to ask bitbake to use more RAM?

Filing answered 5/3, 2021 at 7:39 Comment(0)
B
17

To increase threads usage: You add following to your local.conf inside the build/conf directory. Replace x and y with your wanted configuration

PARALLEL_MAKE = "-j x"

BB_NUMBER_THREADS = "y"

PARALLEL_MAKE defines how many threads should be used when using make -j command during do_compile.

BB_NUMBER_THREADS defines number of threads for bitbake.

I do not know about increasing memory usage, if you want to increase the speed of the build you could to it with a ramdisk. https://www.linuxbabe.com/command-line/create-ramdisk-linux

https://docs.yoctoproject.org/dev-manual/speeding-up-build.html

Blower answered 5/3, 2021 at 8:36 Comment(1)
Yocto project inks above are broken. Here's an updated link: docs.yoctoproject.org/dev-manual/speeding-up-build.htmlStormy

© 2022 - 2024 — McMap. All rights reserved.