All of lore.kernel.org
 help / color / mirror / Atom feed
* [flasher PATCH] Allow --boards to add to not replace the set of enabled boards
@ 2014-04-30 19:45 Stephen Warren
       [not found] ` <1398887114-9774-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2014-04-30 19:45 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

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

The following already work:

Build all boards that are enabled by default:
./build build

Build a specific set of boards:
./build --boards beaver,jetson-tk1 build

Sometimes it's nice to build all boards that are enabled by default,
plus a few others which aren't. This patch enables the following syntax
for that:
./build --boards +jetson-tk1 build

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 build | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/build b/build
index 7bfc2d9d0aa8..5e94474de70b 100755
--- a/build
+++ b/build
@@ -108,9 +108,17 @@ def user_restrict_socs(enabled_socs):
         socs[socname]['disabled'] = not socname in enabled_socs
 
 def user_restrict_boards(enabled_boards):
+    if enabled_boards[0] == '+':
+        disable_others = False
+        enabled_boards = enabled_boards[1:]
+    else:
+        disable_others = True
     enabled_boards = enabled_boards.split(',')
     for boardname in boards.keys():
-        boards[boardname]['disabled'] = not boardname in enabled_boards
+        if boardname in enabled_boards:
+            boards[boardname]['disabled'] = False
+        elif disable_others:
+            boards[boardname]['disabled'] = True
 
 def restrict_boards():
     for board in boards.values():
-- 
1.8.1.5

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

* Re: [flasher PATCH] Allow --boards to add to not replace the set of enabled boards
       [not found] ` <1398887114-9774-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2014-05-01 17:13   ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2014-05-01 17:13 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

On 04/30/2014 01:45 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> The following already work:
> 
> Build all boards that are enabled by default:
> ./build build
> 
> Build a specific set of boards:
> ./build --boards beaver,jetson-tk1 build
> 
> Sometimes it's nice to build all boards that are enabled by default,
> plus a few others which aren't. This patch enables the following syntax
> for that:
> ./build --boards +jetson-tk1 build

Applied.

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

end of thread, other threads:[~2014-05-01 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 19:45 [flasher PATCH] Allow --boards to add to not replace the set of enabled boards Stephen Warren
     [not found] ` <1398887114-9774-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-05-01 17:13   ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.