mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00
buildman: Add an option to check maintainers and targets
In poking around it seems that many boards don't define a CONFIG_TARGET Kconfig variable. This is not strictly necessary, but add an option to buildman so these can be viewed. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
39dbcaa1ad
commit
ba8d099b95
3 changed files with 16 additions and 5 deletions
|
@ -1324,6 +1324,10 @@ Use the `--maintainer-check` option to check this::
|
||||||
|
|
||||||
Buildman returns with an exit code of 2 if there area any warnings.
|
Buildman returns with an exit code of 2 if there area any warnings.
|
||||||
|
|
||||||
|
An experimental `--full-check option` also checks for boards which don't have a
|
||||||
|
CONFIG_TARGET_xxx where xxx corresponds to their defconfig filename. This is
|
||||||
|
not strictly necessary, but may be useful information.
|
||||||
|
|
||||||
|
|
||||||
Checking the command
|
Checking the command
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
@ -60,6 +60,9 @@ def add_upto_m(parser):
|
||||||
help="Fetch a toolchain for architecture FETCH_ARCH ('list' to list)."
|
help="Fetch a toolchain for architecture FETCH_ARCH ('list' to list)."
|
||||||
' You can also fetch several toolchains separate by comma, or'
|
' You can also fetch several toolchains separate by comma, or'
|
||||||
" 'all' to download all")
|
" 'all' to download all")
|
||||||
|
parser.add_argument(
|
||||||
|
'--full-check', action='store_true',
|
||||||
|
help='Check maintainer entries and TARGET configs')
|
||||||
parser.add_argument('-g', '--git', type=str,
|
parser.add_argument('-g', '--git', type=str,
|
||||||
help='Git repo containing branch to build', default='.')
|
help='Git repo containing branch to build', default='.')
|
||||||
parser.add_argument('-G', '--config-file', type=str,
|
parser.add_argument('-G', '--config-file', type=str,
|
||||||
|
|
|
@ -365,8 +365,8 @@ def get_toolchains(toolchains, col, override_toolchain, fetch_arch,
|
||||||
return toolchains
|
return toolchains
|
||||||
|
|
||||||
|
|
||||||
def get_boards_obj(output_dir, regen_board_list, maintainer_check, threads,
|
def get_boards_obj(output_dir, regen_board_list, maintainer_check, full_check,
|
||||||
verbose):
|
threads, verbose):
|
||||||
"""Object the Boards object to use
|
"""Object the Boards object to use
|
||||||
|
|
||||||
Creates the output directory and ensures there is a boards.cfg file, then
|
Creates the output directory and ensures there is a boards.cfg file, then
|
||||||
|
@ -376,6 +376,8 @@ def get_boards_obj(output_dir, regen_board_list, maintainer_check, threads,
|
||||||
output_dir (str): Output directory to use
|
output_dir (str): Output directory to use
|
||||||
regen_board_list (bool): True to just regenerate the board list
|
regen_board_list (bool): True to just regenerate the board list
|
||||||
maintainer_check (bool): True to just run a maintainer check
|
maintainer_check (bool): True to just run a maintainer check
|
||||||
|
full_check (bool): True to just run a full check of Kconfig and
|
||||||
|
maintainers
|
||||||
threads (int or None): Number of threads to use to create boards file
|
threads (int or None): Number of threads to use to create boards file
|
||||||
verbose (bool): False to suppress output from boards-file generation
|
verbose (bool): False to suppress output from boards-file generation
|
||||||
|
|
||||||
|
@ -386,8 +388,9 @@ def get_boards_obj(output_dir, regen_board_list, maintainer_check, threads,
|
||||||
"""
|
"""
|
||||||
brds = boards.Boards()
|
brds = boards.Boards()
|
||||||
nr_cpus = threads or multiprocessing.cpu_count()
|
nr_cpus = threads or multiprocessing.cpu_count()
|
||||||
if maintainer_check:
|
if maintainer_check or full_check:
|
||||||
warnings = brds.build_board_list(jobs=nr_cpus)[1]
|
warnings = brds.build_board_list(jobs=nr_cpus,
|
||||||
|
warn_targets=full_check)[1]
|
||||||
if warnings:
|
if warnings:
|
||||||
for warn in warnings:
|
for warn in warnings:
|
||||||
print(warn, file=sys.stderr)
|
print(warn, file=sys.stderr)
|
||||||
|
@ -614,7 +617,8 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None,
|
||||||
# Work out what subset of the boards we are building
|
# Work out what subset of the boards we are building
|
||||||
if not brds:
|
if not brds:
|
||||||
brds = get_boards_obj(output_dir, args.regen_board_list,
|
brds = get_boards_obj(output_dir, args.regen_board_list,
|
||||||
args.maintainer_check, args.threads, args.verbose)
|
args.maintainer_check, args.full_check,
|
||||||
|
args.threads, args.verbose)
|
||||||
if isinstance(brds, int):
|
if isinstance(brds, int):
|
||||||
return brds
|
return brds
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue