mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-03 10:00:42 +09:00
Merge branch 'buildpatman' of http://git.denx.de/u-boot-x86
This commit is contained in:
commit
5a4fe1aaf1
@ -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
|
plan to use your machine for anything else, you can use -T to increase the
|
||||||
number of threads beyond the default.
|
number of threads beyond the default.
|
||||||
|
|
||||||
Buildman lets you build all boards, or a subset. Specify the subset using
|
Buildman lets you build all boards, or a subset. Specify the subset by passing
|
||||||
the board name, architecture name, SOC name, or anything else in the
|
command-line arguments that list the desired board name, architecture name,
|
||||||
boards.cfg file. So 'at91' will build all AT91 boards (arm), powerpc will
|
SOC name, or anything else in the boards.cfg file. Multiple arguments are
|
||||||
build all PowerPC boards.
|
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
|
Buildman does not store intermediate object files. It optionally copies
|
||||||
the binary output into a directory when a build is successful. Size
|
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
|
snapper9g45=${at91-boards} BUILD_TAG=443
|
||||||
|
|
||||||
This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260
|
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
|
variable ${target} is available to access the target name (snapper9260 and
|
||||||
snapper9g20 in this case). Variables are resolved recursively.
|
snapper9g20 in this case). Variables are resolved recursively.
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
class Board:
|
class Board:
|
||||||
"""A particular board that we can build"""
|
"""A particular board that we can build"""
|
||||||
def __init__(self, status, arch, cpu, soc, vendor, board_name, target, options):
|
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.
|
due to each argument, arranged by argument.
|
||||||
"""
|
"""
|
||||||
result = {}
|
result = {}
|
||||||
|
argres = {}
|
||||||
for arg in args:
|
for arg in args:
|
||||||
result[arg] = 0
|
result[arg] = 0
|
||||||
|
argres[arg] = re.compile(arg)
|
||||||
result['all'] = 0
|
result['all'] = 0
|
||||||
|
|
||||||
for board in self._boards:
|
for board in self._boards:
|
||||||
if args:
|
if args:
|
||||||
for arg in 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:
|
if not board.build_it:
|
||||||
board.build_it = True
|
board.build_it = True
|
||||||
result[arg] += 1
|
result[arg] += 1
|
||||||
|
@ -180,6 +180,14 @@ END
|
|||||||
together and put after the cover letter. Can appear multiple
|
together and put after the cover letter. Can appear multiple
|
||||||
times.
|
times.
|
||||||
|
|
||||||
|
Commit-notes:
|
||||||
|
blah blah
|
||||||
|
blah blah
|
||||||
|
more blah blah
|
||||||
|
END
|
||||||
|
Similar, but for a single commit (patch). These notes will appear
|
||||||
|
immediately below the --- cut in the patch file.
|
||||||
|
|
||||||
Signed-off-by: Their Name <email>
|
Signed-off-by: Their Name <email>
|
||||||
A sign-off is added automatically to your patches (this is
|
A sign-off is added automatically to your patches (this is
|
||||||
probably a bug). If you put this tag in your patches, it will
|
probably a bug). If you put this tag in your patches, it will
|
||||||
@ -227,7 +235,7 @@ TEST=...
|
|||||||
Change-Id:
|
Change-Id:
|
||||||
Review URL:
|
Review URL:
|
||||||
Reviewed-on:
|
Reviewed-on:
|
||||||
|
Commit-xxxx: (except Commit-notes)
|
||||||
|
|
||||||
Exercise for the reader: Try adding some tags to one of your current
|
Exercise for the reader: Try adding some tags to one of your current
|
||||||
patch series and see how the patches turn out.
|
patch series and see how the patches turn out.
|
||||||
|
@ -21,6 +21,7 @@ class Commit:
|
|||||||
changes: Dict containing a list of changes (single line strings).
|
changes: Dict containing a list of changes (single line strings).
|
||||||
The dict is indexed by change version (an integer)
|
The dict is indexed by change version (an integer)
|
||||||
cc_list: List of people to aliases/emails to cc on this commit
|
cc_list: List of people to aliases/emails to cc on this commit
|
||||||
|
notes: List of lines in the commit (not series) notes
|
||||||
"""
|
"""
|
||||||
def __init__(self, hash):
|
def __init__(self, hash):
|
||||||
self.hash = hash
|
self.hash = hash
|
||||||
@ -28,6 +29,7 @@ class Commit:
|
|||||||
self.tags = []
|
self.tags = []
|
||||||
self.changes = {}
|
self.changes = {}
|
||||||
self.cc_list = []
|
self.cc_list = []
|
||||||
|
self.notes = []
|
||||||
|
|
||||||
def AddChange(self, version, info):
|
def AddChange(self, version, info):
|
||||||
"""Add a new change line to the change list for a version.
|
"""Add a new change line to the change list for a version.
|
||||||
|
@ -30,7 +30,10 @@ re_cover = re.compile('^Cover-letter:')
|
|||||||
re_cover_cc = re.compile('^Cover-letter-cc: *(.*)')
|
re_cover_cc = re.compile('^Cover-letter-cc: *(.*)')
|
||||||
|
|
||||||
# Patch series tag
|
# Patch series tag
|
||||||
re_series = re.compile('^Series-([a-z-]*): *(.*)')
|
re_series_tag = re.compile('^Series-([a-z-]*): *(.*)')
|
||||||
|
|
||||||
|
# Commit series tag
|
||||||
|
re_commit_tag = re.compile('^Commit-([a-z-]*): *(.*)')
|
||||||
|
|
||||||
# Commit tags that we want to collect and keep
|
# Commit tags that we want to collect and keep
|
||||||
re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Cc): (.*)')
|
re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Cc): (.*)')
|
||||||
@ -90,6 +93,20 @@ class PatchStream:
|
|||||||
if self.is_log:
|
if self.is_log:
|
||||||
self.series.AddTag(self.commit, line, name, value)
|
self.series.AddTag(self.commit, line, name, value)
|
||||||
|
|
||||||
|
def AddToCommit(self, line, name, value):
|
||||||
|
"""Add a new Commit-xxx tag.
|
||||||
|
|
||||||
|
When a Commit-xxx tag is detected, we come here to record it.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
line: Source line containing tag (useful for debug/error messages)
|
||||||
|
name: Tag name (part after 'Commit-')
|
||||||
|
value: Tag value (part after 'Commit-xxx: ')
|
||||||
|
"""
|
||||||
|
if name == 'notes':
|
||||||
|
self.in_section = 'commit-' + name
|
||||||
|
self.skip_blank = False
|
||||||
|
|
||||||
def CloseCommit(self):
|
def CloseCommit(self):
|
||||||
"""Save the current commit into our commit list, and reset our state"""
|
"""Save the current commit into our commit list, and reset our state"""
|
||||||
if self.commit and self.is_log:
|
if self.commit and self.is_log:
|
||||||
@ -138,7 +155,8 @@ class PatchStream:
|
|||||||
line = line[4:]
|
line = line[4:]
|
||||||
|
|
||||||
# Handle state transition and skipping blank lines
|
# Handle state transition and skipping blank lines
|
||||||
series_match = re_series.match(line)
|
series_tag_match = re_series_tag.match(line)
|
||||||
|
commit_tag_match = re_commit_tag.match(line)
|
||||||
commit_match = re_commit.match(line) if self.is_log else None
|
commit_match = re_commit.match(line) if self.is_log else None
|
||||||
cover_cc_match = re_cover_cc.match(line)
|
cover_cc_match = re_cover_cc.match(line)
|
||||||
tag_match = None
|
tag_match = None
|
||||||
@ -165,6 +183,9 @@ class PatchStream:
|
|||||||
elif self.in_section == 'notes':
|
elif self.in_section == 'notes':
|
||||||
if self.is_log:
|
if self.is_log:
|
||||||
self.series.notes += self.section
|
self.series.notes += self.section
|
||||||
|
elif self.in_section == 'commit-notes':
|
||||||
|
if self.is_log:
|
||||||
|
self.commit.notes += self.section
|
||||||
else:
|
else:
|
||||||
self.warn.append("Unknown section '%s'" % self.in_section)
|
self.warn.append("Unknown section '%s'" % self.in_section)
|
||||||
self.in_section = None
|
self.in_section = None
|
||||||
@ -178,7 +199,7 @@ class PatchStream:
|
|||||||
self.commit.subject = line
|
self.commit.subject = line
|
||||||
|
|
||||||
# Detect the tags we want to remove, and skip blank lines
|
# Detect the tags we want to remove, and skip blank lines
|
||||||
elif re_remove.match(line):
|
elif re_remove.match(line) and not commit_tag_match:
|
||||||
self.skip_blank = True
|
self.skip_blank = True
|
||||||
|
|
||||||
# TEST= should be the last thing in the commit, so remove
|
# TEST= should be the last thing in the commit, so remove
|
||||||
@ -211,9 +232,9 @@ class PatchStream:
|
|||||||
self.skip_blank = False
|
self.skip_blank = False
|
||||||
|
|
||||||
# Detect Series-xxx tags
|
# Detect Series-xxx tags
|
||||||
elif series_match:
|
elif series_tag_match:
|
||||||
name = series_match.group(1)
|
name = series_tag_match.group(1)
|
||||||
value = series_match.group(2)
|
value = series_tag_match.group(2)
|
||||||
if name == 'changes':
|
if name == 'changes':
|
||||||
# value is the version number: e.g. 1, or 2
|
# value is the version number: e.g. 1, or 2
|
||||||
try:
|
try:
|
||||||
@ -226,6 +247,14 @@ class PatchStream:
|
|||||||
self.AddToSeries(line, name, value)
|
self.AddToSeries(line, name, value)
|
||||||
self.skip_blank = True
|
self.skip_blank = True
|
||||||
|
|
||||||
|
# Detect Commit-xxx tags
|
||||||
|
elif commit_tag_match:
|
||||||
|
name = commit_tag_match.group(1)
|
||||||
|
value = commit_tag_match.group(2)
|
||||||
|
if name == 'notes':
|
||||||
|
self.AddToCommit(line, name, value)
|
||||||
|
self.skip_blank = True
|
||||||
|
|
||||||
# Detect the start of a new commit
|
# Detect the start of a new commit
|
||||||
elif commit_match:
|
elif commit_match:
|
||||||
self.CloseCommit()
|
self.CloseCommit()
|
||||||
@ -276,7 +305,7 @@ class PatchStream:
|
|||||||
out = []
|
out = []
|
||||||
log = self.series.MakeChangeLog(self.commit)
|
log = self.series.MakeChangeLog(self.commit)
|
||||||
out += self.FormatTags(self.tags)
|
out += self.FormatTags(self.tags)
|
||||||
out += [line] + log
|
out += [line] + self.commit.notes + [''] + log
|
||||||
elif self.found_test:
|
elif self.found_test:
|
||||||
if not re_allowed_after_test.match(line):
|
if not re_allowed_after_test.match(line):
|
||||||
self.lines_after_test += 1
|
self.lines_after_test += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user