[flasher PATCH 1/2] allow --boards/--socs to undisable boards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stephen Warren <swarren@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 build | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/build b/build
index 8f86d32..b0587f5 100755
--- a/build
+++ b/build
@@ -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):
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux