mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
moveconfig: Add a parameter to accept a list to build
This is helpful to re-attempt to move failed boards from a previous run without starting over. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
7740f653e6
commit
91040e8530
1 changed files with 20 additions and 6 deletions
|
@ -135,6 +135,9 @@ Available options
|
||||||
Surround each portion of the log with escape sequences to display it
|
Surround each portion of the log with escape sequences to display it
|
||||||
in color on the terminal.
|
in color on the terminal.
|
||||||
|
|
||||||
|
-d, --defconfigs
|
||||||
|
Specify a file containing a list of defconfigs to move
|
||||||
|
|
||||||
-n, --dry-run
|
-n, --dry-run
|
||||||
Peform a trial run that does not make any changes. It is useful to
|
Peform a trial run that does not make any changes. It is useful to
|
||||||
see what is going to happen before one actually runs it.
|
see what is going to happen before one actually runs it.
|
||||||
|
@ -729,12 +732,21 @@ def move_config(config_attrs, options):
|
||||||
config_attr['type'],
|
config_attr['type'],
|
||||||
config_attr['default'])
|
config_attr['default'])
|
||||||
|
|
||||||
# All the defconfig files to be processed
|
if options.defconfigs:
|
||||||
defconfigs = []
|
defconfigs = [line.strip() for line in open(options.defconfigs)]
|
||||||
for (dirpath, dirnames, filenames) in os.walk('configs'):
|
for i, defconfig in enumerate(defconfigs):
|
||||||
dirpath = dirpath[len('configs') + 1:]
|
if not defconfig.endswith('_defconfig'):
|
||||||
for filename in fnmatch.filter(filenames, '*_defconfig'):
|
defconfigs[i] = defconfig + '_defconfig'
|
||||||
defconfigs.append(os.path.join(dirpath, filename))
|
if not os.path.exists(os.path.join('configs', defconfigs[i])):
|
||||||
|
sys.exit('%s - defconfig does not exist. Stopping.' %
|
||||||
|
defconfigs[i])
|
||||||
|
else:
|
||||||
|
# All the defconfig files to be processed
|
||||||
|
defconfigs = []
|
||||||
|
for (dirpath, dirnames, filenames) in os.walk('configs'):
|
||||||
|
dirpath = dirpath[len('configs') + 1:]
|
||||||
|
for filename in fnmatch.filter(filenames, '*_defconfig'):
|
||||||
|
defconfigs.append(os.path.join(dirpath, filename))
|
||||||
|
|
||||||
slots = Slots(config_attrs, options)
|
slots = Slots(config_attrs, options)
|
||||||
|
|
||||||
|
@ -835,6 +847,8 @@ def main():
|
||||||
# Add options here
|
# Add options here
|
||||||
parser.add_option('-c', '--color', action='store_true', default=False,
|
parser.add_option('-c', '--color', action='store_true', default=False,
|
||||||
help='display the log in color')
|
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,
|
parser.add_option('-n', '--dry-run', action='store_true', default=False,
|
||||||
help='perform a trial run (show log with no changes)')
|
help='perform a trial run (show log with no changes)')
|
||||||
parser.add_option('-e', '--exit-on-error', action='store_true',
|
parser.add_option('-e', '--exit-on-error', action='store_true',
|
||||||
|
|
Loading…
Add table
Reference in a new issue