[U-Boot] [PATCH 2/2 v2] Allow for parallel builds and saved output

Kumar Gala galak at kernel.crashing.org
Wed Dec 7 15:18:19 CET 2011


On Nov 21, 2011, at 5:40 PM, Andy Fleming wrote:

> 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 at freescale.com>
> ---
> v2:	- Update to keep BUILD_NBUILDS builds in flight, rather than batching
> 	- Clean up style things
> 	- Defer error output until build completion to make output *slightly*
> 	more readable

Can you re-fresh patch against top of tree.

- k


More information about the U-Boot mailing list