Commit Graph

27 Commits

Author SHA1 Message Date
David Brown a4d30a721f scripts: Restore some of the parallism in "all" builds
The use of min/max should not have been switched, and instead of
forcing at least "-j2" for builds, it is enforcing no more than two
jobs in parallel.  This has drastically reduced the parallelism of the
builds.

Change this to use "max" as intended so that we do make use of
available CPUs, using at least two.

Change-Id: Ifad0c98ef0ce56fc6c2368321a6cfd763e81b370
Signed-off-by: David Brown <davidb@codeaurora.org>
2015-05-27 10:48:33 -07:00
David Brown 8f7aeeb4da scripts: Reduce parallelism in "all" builds
Kernel builds are a bit asymmetrical in as far as CPU and memory
resources go.  Compilation itself tends to scale fairly linearly in
RAM usage per number of CPUs.  However, the link phase tends to use a
fairly constant large amount of RAM and generally only one CPU.

The existing attempt to build more in parallel has mostly resulted in
too many link steps running, which ends up swapping.

Instead of dividing the CPUs by the number of targets, just divide it
by two, and assume this will at least get us some compilation
happening during the link phase of one target build.

Change-Id: I0f8cac2d73600700d8ad6cb2a1b98e9529bb53a8
Signed-off-by: David Brown <davidb@codeaurora.org>
2015-05-22 11:31:50 -07:00
David Brown 15ea58cefb scripts: Call out python2 explicitly
Many systems these days have both python2 and python3 installed.  The
unversioned executable `python` may point to either version.  Per
https://www.python.org/dev/peps/pep-0394/ , scripts that need Python 2
should explicitly call this out in the shebang line.

These build scripts are both specific to python 2, so call this out in
the shebang line.

Change-Id: I11f70c341e484254dc1679db65c2ed5ac61e510f
Signed-off-by: David Brown <davidb@codeaurora.org>
2015-04-23 14:29:13 -07:00
Abhimanyu Kapur 0d05fa71ea defconfig: arm64: add support for msm8994 defconfig
Split out the common msm_defconfig into MSM8994 specific
defconfig. Also update the build-all script to reflect the
changes.

Change-Id: I5df7a0d1f74f843bd2a353a389d42290b8b70590
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2014-05-05 14:00:13 -07:00
David Brown c49b330dcf scripts: Build in parallel if requested
Instead of passing -jn directly through to make, and then building
each target in sequence, use the -j and -l options to determine a
number of threads to perform parallel invocations of make in.

The build results are collected, and printed when each build finishes,
which eliminates the interleaving that would otherwise occur between
builds.

Change-Id: Ieef0dcc8adfc72cbe043a3491d4d6f6c23fede31
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-04-01 14:45:15 -07:00
David Brown 05746b5c71 scripts: Refactor build-all.py's build
Build all consists of a mismash of figuring out variables, running
shutils, and actually executing commands.  In preparation for parallel
builds, change this to build up the commands in advance, and then have
a tracker go through and actually run the commands.

Change-Id: I24215b14e5d045f8269bbdc2af9989ab21b2310b
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-04-01 14:45:15 -07:00
David Brown a7fbd22279 scripts: Use custom defconfig for 64-bit targets
Use a different set of defconfig patterns for 64-bit targets.
Currently, msm_defconfig needs to not be built for 32-bit, and is the
only defconfig for the 64-bit target.

Change-Id: I2c3840fd668aa9a1dbd304c64484f6735f1aeea1
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-02-05 09:34:01 -08:00
David Brown 0329c70036 scripts: Keep appending log between build parts
Instead of wiping the log file for each make target, only wipe it
initially, and then continue to append to it.  Instead of closing
between files, just flush.  Although the last use doesn't ever close
the file, it is flushed, and will be closed on exit.

Change-Id: Ic4b38cdad993bc32711f832ce30ca8d8dead0db6
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-02-05 09:34:01 -08:00
David Brown 01d83e8cbd scripts: Reorganize build-all for multi arch
Move most of the build work into a Builder class, which is given a
name and a specific defconfig.  If the arch contains arm64, build
using the CROSS_COMPILE64 compiler rather than the CROSS_COMPILE
compiler.

Defconfigs that match the globs in arm64 will have a "-64" appended to
the name, to avoid conflicts when the same target has both a 32-bit
and a 64-bit build.

The main visible change to this is that CROSS_COMPILE now must be set
before invoking this script.  If CROSS_COMPILE64 isn't set, it won't
be willing to build any 64-bit targets.

Change-Id: I0bd9a7bff22f9c21371c663aff9e8be5116fcdae
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-02-05 09:33:38 -08:00
Joonwoo Park f0358e8b21 mdm9630: rename msmkrypton to mdm9630
Introduce mdm9630 as the official name for msmkrypton.

Change-Id: I0fd861f30bb461ea575084bfe241d8ded1d0c484
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2014-01-10 10:03:08 -08:00
Srinivas Ramana dd0f9bf24e build-all.py: Add support for mpq*_defconfig
mpq8092_defconfig does not match the existing msm pattern
because of not having its name started with msm prefix.
Compile it too.

Change-Id: I1b758e33fa550fdac539a18cc61a6a8348f61f71
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2013-10-04 19:17:06 +05:30
Mitchel Humpherys e49c7ba1e6 scripts: only set CROSS_COMPILE when unset to begin with
Don't mess with CROSS_COMPILE if it's already set up in the user's
environment. This allows the user to specify the cross compiler that
they wish to use.

Change-Id: I15873f79a30e1da91ee34eb31c713e5cd767c372
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-09-04 14:18:13 -07:00
Abhimanyu Kapur f38611ad7b build-all.py: Add support for msmkrypton_defconfig
There is an msmkrypton_defconfig which does not match the
existing msm pattern by virtue of not containing a number
after the 'msm' prefix. Compile it too.

Change-Id: I19535afe7912487cb6882adec89e3fd8138ed904
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2013-09-04 14:18:12 -07:00
Adrian Alexei 085fe31392 Remove the build of omap2plus from build-all.py
This tree doesn't maintain support for omap2plus, thus it makes
sense to remove omap2plus build from build-all script.

Change-Id: I54de554a0bc12f5fc26af589dc58c1beb532994f
Signed-off-by: Adrian Alexei <aalexei@codeaurora.org>
2013-09-04 14:18:10 -07:00
Andrew Walker 4ea29113de scripts: build-all: Build make targets sequentially.
Added omap2 to the list of defconfigs to scan.
Install headers and kernel modules to separate staging directories
by setting values for INSTALL_HDR_PATH and INSTALL_MOD_PATH.
Build make targets sequentially instead all on one invocation.

Signed-off-by: Andrew Walker <andreww@codeaurora.org>
Change-Id: I87dae363bd536808a74ff368b905d18ae11607b2
2013-09-04 14:17:55 -07:00
David Brown e94b0e8fd3 scripts: build-all: Build dtbs as part of 'all' builds
Make sure to build the dtb targets so that these are tested as part of
building all targets.

Change-Id: I351527d197ef6a60fefe43f3a16b34be86a74dd1
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-09-04 14:17:54 -07:00
David Brown 0697ab46f6 scripts: build-all: Include copper pattern in build targets
Change-Id: I68e94f8c000df7cc0a481f49df267258aef952da
Signed-off-by: David Brown <davidb@codeaurora.org>
(cherry picked from commit 2ab0a60d3023a08da712dee9cc5592a216b30ad4)
2013-09-04 14:17:53 -07:00
Stephen Boyd eb19efa58a build-all.py: Add support for apq defconfigs
There is an apq8064_defconfig. Compile it too.

Change-Id: I9ca96ab56640c8f3726d052ad43d1624a4ece0a5
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit d14a37b998dcabb5783f69cc77c66722afdc7567)
2013-09-04 14:17:53 -07:00
Rohit Vaswani 33519a464c scripts: Add fsm targets to build-all.py
Acked-by: Kaushik Sikdar <ksikdar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
(cherry picked from commit d5b438ad986952a7b4596a9794724da83582eff8)
2013-09-04 14:17:52 -07:00
Stephen Boyd 6f26fbb544 build-all.py: Update defconfigs with savedefconfig
Copy the savedefconfig (or minimal defconfig) instead of the
.config when updating defconfigs.

Change-Id: I0ba0b7a774dd3de0dc090420bd5c118eb6199eb6
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 6575c0b29f060a5ebdeec0ff9bcfe0f1af9f0bc8)
2013-09-04 14:17:51 -07:00
Gregory Bean 54f187442d LOCAL: build_all.py: allow alternate build targets.
Allow make targets to be given to build-all.py, which
in turn allows the build-all preverification step to be used to
generate all kernel artifacts for later preverification steps.
This moves us closer to eliminating the need to build the kernel
twice for each commit to be tested by the PV framework.

Change-Id: Ifacdbb161604f06f85f4248f21998dda282e6fd0
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 81a73760834ee3c0b3b1ab3010fd6530d5b82313)
2013-09-04 14:17:51 -07:00
Patrick Pannuto d6372230db build-all: some convenience fixes
* mkdir -p build_dir instead of just failing
* Add perf / noperf targets since building "all" is often unnecessary

Change-Id: I3216f59338ca37e87b464cccbb9c1cc766356a6c
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit b4f13cfa5a53633c0246b2136decc5d210cfcd70)
2013-09-04 14:17:50 -07:00
Patrick Pannuto fcbd3f3f13 build-all: Don't mix tabs / spaces
Guido says no to tabs in python (however much I may disagree
with him). Regardless of tabs or spaces, you definitely cannot
mix them; future versions of the python interpereter plan to
simply reject files that mix them outright, so we should follow
good style guidelines

Change-Id: I32a30ac3ef430916c534738a7349482d3f151fd5
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit cbebac12150f62ec6f9810f09366d5cf66d60875)
2013-09-04 14:17:49 -07:00
Stephen Boyd abfa61ddf2 scripts: build-all: Add a keep-going option
Sometimes I want to build all the targets and see what errors
come out while I'm out at lunch. Currently I can't do that so
introduce a new option -k/--keep-going in the spirit of make's
keep going option to build the rest of the targets even if
another target fails. This way after I eat lunch I can go through
the logs and see what files are failing.

It was suggested that the failing targets could be summarized at
the end of the build run. So when we're building many targets
keep a list of failing targets to output at the end of the run.
This way it's easy to determine which targets need fixing without
scouring the logs or the screen buffer.

While we're here fixup the above usage message.

Change-Id: Ief30ac65eb946e055051bdfdd7ba5788e5a8e426
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 3fb23529a8c959042d3efb68888bc18d8fbce0ce)
2013-09-04 14:17:49 -07:00
David Brown 711c224828 scripts: build-all: Allow Limit load average on builds.
Accept the -l make argument as well as -j.  Neither of these
arguments now have a default, other than what make uses, allowing
the user to specify whatever value they wish.

Signed-off-by: David Brown <davidb@quicinc.com>
(cherry picked from commit 0b2e450e1478711a0d19f15a7e66dec742468d7b)
2013-09-04 14:17:48 -07:00
Stephen Boyd 8f42d49e50 scripts: build-all: add jobs option
It's annoying that the number of make jobs is hardcoded at 6.
Allow users to define the number of jobs they want with a new
option in the spirit of '-j' from make.

Change-Id: I27881eb604e27a995d5d70bdeabacd6f690aa5b0
Signed-off-by: Stephen Boyd <sboyd@quicinc.com>
(cherry picked from commit 604baf789feb66fee36ea68487d21ea94d8fb374)
2013-09-04 14:17:48 -07:00
David Brown 5b9d7b2829 Kernel building utility.
A small script to make it easier to build and test all target
configurations.  Assumes the cross compiler is in the path, and
builds all defconfigs matching certain patterns.

Signed-off-by: David Brown <davidb@quicinc.com>
(cherry picked from commit 6d7b7dc07271ab50e63d43b550c8484db0da8139)
2013-09-04 14:17:47 -07:00