linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [flasher PATCH 1/2] allow --boards/--socs to undisable boards
@ 2013-09-11 23:48 Stephen Warren
       [not found] ` <1378943336-9263-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2013-09-11 23:48 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA; +Cc: Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-18 22:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 23:48 [flasher PATCH 1/2] allow --boards/--socs to undisable boards Stephen Warren
     [not found] ` <1378943336-9263-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-11 23:48   ` [flasher PATCH 2/2] Add config files for Venice2 board Stephen Warren
     [not found]     ` <1378943336-9263-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-11 23:51       ` Stephen Warren
     [not found]         ` <523101EA.7020704-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-13 13:22           ` Peter De Schrijver
     [not found]             ` <20130913132252.GN30013-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2013-09-13 16:19               ` Stephen Warren
     [not found]                 ` <52333AF6.9060208-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-13 21:09                   ` Stephen Warren
     [not found]                     ` <52337F1F.9070608-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-18 22:12                       ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).