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)
This commit is contained in:
David Brown 2010-03-31 15:09:47 -07:00 committed by Stephen Boyd
parent 8f42d49e50
commit 711c224828

View file

@ -177,8 +177,11 @@ def main():
dest='updateconfigs', dest='updateconfigs',
help="Update defconfigs with provided option setting, " help="Update defconfigs with provided option setting, "
"e.g. --updateconfigs=\'CONFIG_USE_THING=y\'") "e.g. --updateconfigs=\'CONFIG_USE_THING=y\'")
parser.add_option('-j', '--jobs', type='int', dest="jobs", default=6, parser.add_option('-j', '--jobs', type='int', dest="jobs",
help="Number of simultaneous jobs") help="Number of simultaneous jobs")
parser.add_option('-l', '--load-average', type='int',
dest='load_average',
help="Don'start t multiple jobs unless load is below LOAD_AVERAGE.")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
global all_options global all_options
@ -194,7 +197,10 @@ def main():
global make_command global make_command
make_command = ["oldconfig"] make_command = ["oldconfig"]
make_command.append("-j%d" % options.jobs) if options.jobs:
make_command.append("-j%d" % options.jobs)
if options.load_average:
make_command.append("-l%d" % options.load_average)
if args == ['all']: if args == ['all']:
build_many(configs, configs.keys()) build_many(configs, configs.keys())