diff options
author | Andy Fleming <afleming@freescale.com> | 2012-04-24 19:33:51 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-04-30 14:52:19 (GMT) |
commit | f588bb034d5d3a0417f45965f1aba4d4cf8a2893 (patch) | |
tree | b2f85b93db0bb7eb745016c6dc4d66089838a283 /common/cmd_mp.c | |
parent | 05f132d74d173854df79bc5541699c3db144e42a (diff) | |
download | u-boot-f588bb034d5d3a0417f45965f1aba4d4cf8a2893.tar.xz |
Allow for parallel builds and saved output
The MAKEALL script cleverly runs make with the appropriate options
to use all of the cores on the system, but your average U-Boot build
can't make much use of more than a few cores. If you happen to have
a many-core server, your builds will leave most of the system idle.
In order to make full use of such a system, we need to build multiple
targets in parallel, and this requires directing make output into
multiple directories. We add a BUILD_NBUILDS variable, which allows
users to specify how many builds to run in parallel.
When BUILD_NBUILDS is set greater than 1, we redefine BUILD_DIR for
each build to be ${BUILD_DIR}/${target}. Also, we make "./build" the
default BUILD_DIR when BUILD_NBUILDS is greater than 1.
MAKEALL now tracks which builds are still running, and when one
finishes, it starts a new build.
Once each build finishes, we run "make tidy" on its directory, to reduce
the footprint.
As a result, we are left with a build directory with all of the built
targets still there for use, which means anyone who wanted to use
MAKEALL as part of a test harness can now do so.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'common/cmd_mp.c')
0 files changed, 0 insertions, 0 deletions