Newer
Older
slots.show_suspicious_boards()
def main():
try:
cpu_count = multiprocessing.cpu_count()
except NotImplementedError:
cpu_count = 1
parser = optparse.OptionParser()
# Add options here
parser.add_option('-c', '--color', action='store_true', default=False,
help='display the log in color')
parser.add_option('-d', '--defconfigs', type='string',
help='a file containing a list of defconfigs to move')
parser.add_option('-n', '--dry-run', action='store_true', default=False,
help='perform a trial run (show log with no changes)')
parser.add_option('-e', '--exit-on-error', action='store_true',
default=False,
help='exit immediately on any error')
parser.add_option('-s', '--force-sync', action='store_true', default=False,
help='force sync by savedefconfig')
parser.add_option('-H', '--headers-only', dest='cleanup_headers_only',
action='store_true', default=False,
help='only cleanup the headers')
parser.add_option('-j', '--jobs', type='int', default=cpu_count,
help='the number of jobs to run simultaneously')
parser.add_option('-r', '--git-ref', type='string',
help='the git ref to clone for building the autoconf.mk')
parser.add_option('-v', '--verbose', action='store_true', default=False,
help='show any build errors as boards are built')
parser.usage += ' CONFIG ...'
(options, configs) = parser.parse_args()
if len(configs) == 0 and not options.force_sync:
parser.print_usage()
sys.exit(1)
# prefix the option name with CONFIG_ if missing
configs = [ config if config.startswith('CONFIG_') else 'CONFIG_' + config
for config in configs ]
check_top_directory()
check_clean_directory()
update_cross_compile(options.color)
if not options.cleanup_headers_only:
move_config(configs, options)
if configs:
cleanup_headers(configs, options.dry_run)
if __name__ == '__main__':
main()