diff options
Diffstat (limited to 'tools/buildman')
| -rw-r--r-- | tools/buildman/README | 16 | ||||
| -rw-r--r-- | tools/buildman/board.py | 12 | 
2 files changed, 22 insertions, 6 deletions
| diff --git a/tools/buildman/README b/tools/buildman/README index 090b65311..c30c1d411 100644 --- a/tools/buildman/README +++ b/tools/buildman/README @@ -89,10 +89,16 @@ a few commits or boards, it will be pretty slow. As a tip, if you don't  plan to use your machine for anything else, you can use -T to increase the  number of threads beyond the default. -Buildman lets you build all boards, or a subset. Specify the subset using -the board name, architecture name, SOC name, or anything else in the -boards.cfg file. So 'at91' will build all AT91 boards (arm), powerpc will -build all PowerPC boards. +Buildman lets you build all boards, or a subset. Specify the subset by passing +command-line arguments that list the desired board name, architecture name, +SOC name, or anything else in the boards.cfg file. Multiple arguments are +allowed. Each argument will be interpreted as a regular expression, so +behaviour is a superset of exact or substring matching. Examples are: + +* 'tegra20'      All boards with a Tegra20 SoC +* 'tegra'        All boards with any Tegra Soc (Tegra20, Tegra30, Tegra114...) +* '^tegra[23]0$' All boards with either Tegra20 or Tegra30 SoC +* 'powerpc'      All PowerPC boards  Buildman does not store intermediate object files. It optionally copies  the binary output into a directory when a build is successful. Size @@ -643,7 +649,7 @@ snapper9260=${at91-boards} BUILD_TAG=442  snapper9g45=${at91-boards} BUILD_TAG=443  This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260 -and 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9g45. A special +and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special  variable ${target} is available to access the target name (snapper9260 and  snapper9g20 in this case). Variables are resolved recursively. diff --git a/tools/buildman/board.py b/tools/buildman/board.py index 1d3db206b..5172a473e 100644 --- a/tools/buildman/board.py +++ b/tools/buildman/board.py @@ -3,6 +3,8 @@  # SPDX-License-Identifier:	GPL-2.0+  # +import re +  class Board:      """A particular board that we can build"""      def __init__(self, status, arch, cpu, soc, vendor, board_name, target, options): @@ -135,14 +137,22 @@ class Boards:              due to each argument, arranged by argument.          """          result = {} +        argres = {}          for arg in args:              result[arg] = 0 +            argres[arg] = re.compile(arg)          result['all'] = 0          for board in self._boards:              if args:                  for arg in args: -                    if arg in board.props: +                    argre = argres[arg] +                    match = False +                    for prop in board.props: +                        match = argre.match(prop) +                        if match: +                            break +                    if match:                          if not board.build_it:                              board.build_it = True                              result[arg] += 1 |