diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-09-11 17:40:52 -0600 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-09-11 17:43:51 -0600 |
commit | 821837c57a6828e4f8ed18e6343c8d2395e99a35 (patch) | |
tree | fb13c494dcec302c2aba2076c8ac024a5c378788 | |
parent | 2beddf6b876ee37ca30b808ba823d85f4c4c66f3 (diff) | |
download | tegra-uboot-flasher-scripts-821837c57a6828e4f8ed18e6343c8d2395e99a35.tar.gz |
allow --boards/--socs to undisable boards
Before this change, --boards/--socs only disabled more boards than were
disabled in their configuration files. Now, those options explicitly set
all boards/socs disabled state to match the --boards/socs option, if
given.
This is useful so that configurations may be added for boards that are
not yet fully supported by projects such as U-Boot; the configuration
can be added, but marked as disabled by default so that builds are not
broken, but then explicitly re-enabled by those who wish to test local
patches to enable that board in the other projects.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rwxr-xr-x | build | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -83,7 +83,7 @@ def run(dir, cmd): def all_enabled_confignames(): for configname in configs.keys(): - if configs[configname].has_key('disabled'): + if configs[configname].get('disabled', False): continue yield configname @@ -105,23 +105,21 @@ def all_enabled_boardnames(): def user_restrict_socs(enabled_socs): enabled_socs = enabled_socs.split(',') for socname in socs.keys(): - if not socname in enabled_socs: - socs[socname]['disabled'] = True + socs[socname]['disabled'] = not socname in enabled_socs def user_restrict_boards(enabled_boards): enabled_boards = enabled_boards.split(',') for boardname in boards.keys(): - if not boardname in enabled_boards: - boards[boardname]['disabled'] = True + boards[boardname]['disabled'] = not boardname in enabled_boards def restrict_boards(): for board in boards.values(): - if socs[board['soc']].has_key('disabled'): + if socs[board['soc']].get('disabled', False): board['disabled'] = True def restrict_configs(): for config in configs.values(): - if boards[config['board']].has_key('disabled'): + if boards[config['board']].get('disabled', False): config['disabled'] = True def dtb_filename(config): |