10

Do you got any idea how to build an oe project with distributed bitbake compile? I've thinked about distcc.

export PATH=~/distcc/bin:$PATH
make -jn CC=linux-gcc

make will call linux-gcc from my path which points to distcc.
distcc will schedule the tasks to all known hosts.
-jn will create n6 instances of make.
It works fine.
But now I want to use distcc with bitbake.
I know how to use -jn with bitbake.
Just use export PARALLEL_MAKE=-jn

But how to use export PATH=~/distcc/bin:$PATH with bitbake.
The distcc/bin MUST stand in front of the $PATH.
But bitbake will place the $PATH_prepend (placed in org.openembedded.dev/conf/bitbake.conf) in front of the $PATH.

Or someone got another tool for better way of distributed building with bitbake?

VMAtm
  • 27,943
  • 17
  • 79
  • 125
butter
  • 355
  • 1
  • 4
  • 12
  • export command will add the given path to $PATH variable and will be active in that session. But I am not clear about your problem. Could you please explain your problem –  Jan 23 '13 at 06:23
  • The problem is I just know how to use PARALLEL_MAKE ,but when it comes to bitbake ,who calls make at last,I got no idear how to config it to work as PARALLEL_MAKE way. – butter Feb 06 '13 at 01:48

2 Answers2

18

Try Icecream: https://github.com/icecc/icecream/blob/master/README.md

Like distcc, Icecream takes compile jobs from a build and distributes it among remote machines allowing a parallel build. But unlike distcc, Icecream uses a central server that dynamically schedules the compile jobs to the fastest free server.

Both OpenEmbedded and Yocto Project support Icecream. See https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/classes/icecc.bbclass

Install Icecream, then add the following to your site.conf or local.conf

INHERIT += "icecc"

# This value overrides PARALLEL_MAKE when ICECC is enabled
# This would enable icecc for local and cross
ICECC_PARALLEL_MAKE = "-j 24"
Lee Ballard
  • 1,049
  • 11
  • 13
0

A slightly more BitBake-ish way of invoking builds with parallelism is to edit local.conf and un-comment BB_NUMBER_THREADS and PARALLEL_MAKE and set their values to twice the number of cores that you have. Now, whenever you invoke BitBake, it will use these values.

wmat
  • 460
  • 2
  • 7