History log of /u-boot/tools/buildman/boards.py
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 86aeacca 15-Dec-2023 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: type cotaining

%s/cotaining/containing/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 283dcb63 07-Sep-2023 Simon Glass <sjg@chromium.org>

buildman: Show progress when regenerating the board.cfg file

This can take a while, so show a message when starting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by Tom Rini <trini@konsulko.com>

# 48d4c0a8 03-Aug-2023 Simon Glass <sjg@chromium.org>

buildman: Drop warning about orphaned defconfigs

Some boards use a MAINTAINERS entry to specify common files without
referencing any defconfigs. This is allowed and should not result in a
warning.

Drop the warning in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1b21842e 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add an option to check maintainers

Rather than using the -R option to get this report as a side effect, add
a dedicated option for it.

Disable CI for now as there are some missing maintainers, unfortunately.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9a7cc812 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct logic for missing maintainers

An orphaned board should produce a warning, as should a missing name for
the maintainer (when '-' is provided). Add these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1aaaafad 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Sort the maintainer warnings

Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4cab9aa6 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Just display a single line for missing maintainers

At present we get multiple lines of output when a board has no MAINTAINERS
entry:

WARNING: no status info for 'bananapi-m2-pro'
WARNING: no maintainers for 'bananapi-m2-pro'

Suppress the 'status' one since it is implied by the other.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c649153b 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct operation of MAINTAINERS N:

This doesn't work as intended. Instead it scans every defconfig file
in the source tree.

Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ad99599c 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with no CONFIG_TARGET defined

We generally expected exactly one of these. Add a check for it.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bec06ed8 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with multiple CONFIG_TARGETs defined

The TARGET_xxx options are special in that they refer to a single target.
Exactly one should be enabled for each target, corresponding to a
defconfig file.

Detect configs which result in two TARGET_xxx options being set. For
example, at present, TARGET_POLEG and TARET_POLEG_EVB are enabled for the
same board.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f99f34b1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Refactor target handling in Boards.scan()

Move the assert to the top of the function and provide an explicit
variables for the target name and base name.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bc12d034 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Warn about dangling maintainer entries

Other than the top-level MAINTAINERS file, all maintainer entries should
actually reference a target. Add a warning to detect those that do not.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a114c615 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Tidy up common code in parse_file()

Use a function to add to the maintainers database, to avoid duplicating
the same code twice.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 5df95cf1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add a partial test for ensure_board_list()

Create a new function which has the non-UI parts of ensure_board_list().
Add some tests for everything except the N: tag.

While we are here, fix the confusing usage of fname inside a loops that
also uses fname.

Signed-off-by: Simon Glass <sjg@chromium.org>

# b27e9891 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Avoid globals in leaf functions

Rather than using the global thoughout each function, pass in these
values. This allows tests to use different values when testing the same
functions.

Improve a few comments while we are here.

No functional change is intended.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 6a754c67 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Drop dead code to handle :CONFIG_ construct

This is not needed anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")

# e8da1da8 11-Oct-2022 Simon Glass <sjg@chromium.org>

buildman: Handle the MAINTAINERS 'N' tag

This is needed for some soon-to-be-applied patches. Scan the configs/
directory to see if any of the files match.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
Suggested-by: Tom Rini <trini@konsulko.com>

# 3672ed71 03-Oct-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: differentiate between riscv32, riscv64

riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 283dcb63 07-Sep-2023 Simon Glass <sjg@chromium.org>

buildman: Show progress when regenerating the board.cfg file

This can take a while, so show a message when starting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by Tom Rini <trini@konsulko.com>

# 48d4c0a8 03-Aug-2023 Simon Glass <sjg@chromium.org>

buildman: Drop warning about orphaned defconfigs

Some boards use a MAINTAINERS entry to specify common files without
referencing any defconfigs. This is allowed and should not result in a
warning.

Drop the warning in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1b21842e 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add an option to check maintainers

Rather than using the -R option to get this report as a side effect, add
a dedicated option for it.

Disable CI for now as there are some missing maintainers, unfortunately.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9a7cc812 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct logic for missing maintainers

An orphaned board should produce a warning, as should a missing name for
the maintainer (when '-' is provided). Add these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1aaaafad 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Sort the maintainer warnings

Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4cab9aa6 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Just display a single line for missing maintainers

At present we get multiple lines of output when a board has no MAINTAINERS
entry:

WARNING: no status info for 'bananapi-m2-pro'
WARNING: no maintainers for 'bananapi-m2-pro'

Suppress the 'status' one since it is implied by the other.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c649153b 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct operation of MAINTAINERS N:

This doesn't work as intended. Instead it scans every defconfig file
in the source tree.

Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ad99599c 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with no CONFIG_TARGET defined

We generally expected exactly one of these. Add a check for it.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bec06ed8 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with multiple CONFIG_TARGETs defined

The TARGET_xxx options are special in that they refer to a single target.
Exactly one should be enabled for each target, corresponding to a
defconfig file.

Detect configs which result in two TARGET_xxx options being set. For
example, at present, TARGET_POLEG and TARET_POLEG_EVB are enabled for the
same board.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f99f34b1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Refactor target handling in Boards.scan()

Move the assert to the top of the function and provide an explicit
variables for the target name and base name.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bc12d034 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Warn about dangling maintainer entries

Other than the top-level MAINTAINERS file, all maintainer entries should
actually reference a target. Add a warning to detect those that do not.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a114c615 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Tidy up common code in parse_file()

Use a function to add to the maintainers database, to avoid duplicating
the same code twice.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 5df95cf1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add a partial test for ensure_board_list()

Create a new function which has the non-UI parts of ensure_board_list().
Add some tests for everything except the N: tag.

While we are here, fix the confusing usage of fname inside a loops that
also uses fname.

Signed-off-by: Simon Glass <sjg@chromium.org>

# b27e9891 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Avoid globals in leaf functions

Rather than using the global thoughout each function, pass in these
values. This allows tests to use different values when testing the same
functions.

Improve a few comments while we are here.

No functional change is intended.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 6a754c67 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Drop dead code to handle :CONFIG_ construct

This is not needed anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")

# e8da1da8 11-Oct-2022 Simon Glass <sjg@chromium.org>

buildman: Handle the MAINTAINERS 'N' tag

This is needed for some soon-to-be-applied patches. Scan the configs/
directory to see if any of the files match.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
Suggested-by: Tom Rini <trini@konsulko.com>

# 3672ed71 03-Oct-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: differentiate between riscv32, riscv64

riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 48d4c0a8 03-Aug-2023 Simon Glass <sjg@chromium.org>

buildman: Drop warning about orphaned defconfigs

Some boards use a MAINTAINERS entry to specify common files without
referencing any defconfigs. This is allowed and should not result in a
warning.

Drop the warning in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1b21842e 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add an option to check maintainers

Rather than using the -R option to get this report as a side effect, add
a dedicated option for it.

Disable CI for now as there are some missing maintainers, unfortunately.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9a7cc812 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct logic for missing maintainers

An orphaned board should produce a warning, as should a missing name for
the maintainer (when '-' is provided). Add these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1aaaafad 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Sort the maintainer warnings

Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4cab9aa6 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Just display a single line for missing maintainers

At present we get multiple lines of output when a board has no MAINTAINERS
entry:

WARNING: no status info for 'bananapi-m2-pro'
WARNING: no maintainers for 'bananapi-m2-pro'

Suppress the 'status' one since it is implied by the other.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c649153b 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct operation of MAINTAINERS N:

This doesn't work as intended. Instead it scans every defconfig file
in the source tree.

Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ad99599c 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with no CONFIG_TARGET defined

We generally expected exactly one of these. Add a check for it.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bec06ed8 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with multiple CONFIG_TARGETs defined

The TARGET_xxx options are special in that they refer to a single target.
Exactly one should be enabled for each target, corresponding to a
defconfig file.

Detect configs which result in two TARGET_xxx options being set. For
example, at present, TARGET_POLEG and TARET_POLEG_EVB are enabled for the
same board.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f99f34b1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Refactor target handling in Boards.scan()

Move the assert to the top of the function and provide an explicit
variables for the target name and base name.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bc12d034 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Warn about dangling maintainer entries

Other than the top-level MAINTAINERS file, all maintainer entries should
actually reference a target. Add a warning to detect those that do not.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a114c615 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Tidy up common code in parse_file()

Use a function to add to the maintainers database, to avoid duplicating
the same code twice.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 5df95cf1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add a partial test for ensure_board_list()

Create a new function which has the non-UI parts of ensure_board_list().
Add some tests for everything except the N: tag.

While we are here, fix the confusing usage of fname inside a loops that
also uses fname.

Signed-off-by: Simon Glass <sjg@chromium.org>

# b27e9891 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Avoid globals in leaf functions

Rather than using the global thoughout each function, pass in these
values. This allows tests to use different values when testing the same
functions.

Improve a few comments while we are here.

No functional change is intended.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 6a754c67 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Drop dead code to handle :CONFIG_ construct

This is not needed anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")

# e8da1da8 11-Oct-2022 Simon Glass <sjg@chromium.org>

buildman: Handle the MAINTAINERS 'N' tag

This is needed for some soon-to-be-applied patches. Scan the configs/
directory to see if any of the files match.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
Suggested-by: Tom Rini <trini@konsulko.com>

# 3672ed71 03-Oct-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: differentiate between riscv32, riscv64

riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1b21842e 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add an option to check maintainers

Rather than using the -R option to get this report as a side effect, add
a dedicated option for it.

Disable CI for now as there are some missing maintainers, unfortunately.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9a7cc812 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct logic for missing maintainers

An orphaned board should produce a warning, as should a missing name for
the maintainer (when '-' is provided). Add these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1aaaafad 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Sort the maintainer warnings

Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4cab9aa6 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Just display a single line for missing maintainers

At present we get multiple lines of output when a board has no MAINTAINERS
entry:

WARNING: no status info for 'bananapi-m2-pro'
WARNING: no maintainers for 'bananapi-m2-pro'

Suppress the 'status' one since it is implied by the other.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c649153b 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Correct operation of MAINTAINERS N:

This doesn't work as intended. Instead it scans every defconfig file
in the source tree.

Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ad99599c 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with no CONFIG_TARGET defined

We generally expected exactly one of these. Add a check for it.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bec06ed8 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Detect boards with multiple CONFIG_TARGETs defined

The TARGET_xxx options are special in that they refer to a single target.
Exactly one should be enabled for each target, corresponding to a
defconfig file.

Detect configs which result in two TARGET_xxx options being set. For
example, at present, TARGET_POLEG and TARET_POLEG_EVB are enabled for the
same board.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f99f34b1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Refactor target handling in Boards.scan()

Move the assert to the top of the function and provide an explicit
variables for the target name and base name.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bc12d034 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Warn about dangling maintainer entries

Other than the top-level MAINTAINERS file, all maintainer entries should
actually reference a target. Add a warning to detect those that do not.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a114c615 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Tidy up common code in parse_file()

Use a function to add to the maintainers database, to avoid duplicating
the same code twice.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 5df95cf1 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Add a partial test for ensure_board_list()

Create a new function which has the non-UI parts of ensure_board_list().
Add some tests for everything except the N: tag.

While we are here, fix the confusing usage of fname inside a loops that
also uses fname.

Signed-off-by: Simon Glass <sjg@chromium.org>

# b27e9891 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Avoid globals in leaf functions

Rather than using the global thoughout each function, pass in these
values. This allows tests to use different values when testing the same
functions.

Improve a few comments while we are here.

No functional change is intended.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 6a754c67 19-Jul-2023 Simon Glass <sjg@chromium.org>

buildman: Drop dead code to handle :CONFIG_ construct

This is not needed anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")

# e8da1da8 11-Oct-2022 Simon Glass <sjg@chromium.org>

buildman: Handle the MAINTAINERS 'N' tag

This is needed for some soon-to-be-applied patches. Scan the configs/
directory to see if any of the files match.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
Suggested-by: Tom Rini <trini@konsulko.com>

# 3672ed71 03-Oct-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: differentiate between riscv32, riscv64

riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

# e8da1da8 11-Oct-2022 Simon Glass <sjg@chromium.org>

buildman: Handle the MAINTAINERS 'N' tag

This is needed for some soon-to-be-applied patches. Scan the configs/
directory to see if any of the files match.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
Suggested-by: Tom Rini <trini@konsulko.com>

# 3672ed71 03-Oct-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: differentiate between riscv32, riscv64

riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3672ed71 03-Oct-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

buildman: differentiate between riscv32, riscv64

riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7f275bdb 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Drop a Python 2.7 comment

This is well out of date, but it is still reasonable to use a list. Drop
the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>

# add76e7c 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Return an error if there are maintainer warnings

Detect warnings about missing maintain info and return result code 2 in
that case.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 256126c2 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Replace the Options column with config name

This appears in boards.cfg but we want to remove it. Drop support for
generating it and reading it. Detect an old boards.cfg file that has
this field and regenerate it, to avoid problems.

Instead, add the config name in that place. This fixes a subtle bug in
the generation code, since it uses 'target' for the config name and then
overwrites the value in scan() by setting params['target'] to the name
of the defconfig. The defconfig name is not the same as the
SYS_CONFIG_NAME variable.

With this change, we still have the config name and it can be searched
by buildman, e.g. with:

buildman -nv sun5i

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>

# 969fd333 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Tidy up pylint problems in boards module

Fix all the pylint warnings. Also tidy up the comments so that they show
type information, as required.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a8a0141b 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Incorporate the genboardscfg.py tool

Bring this tool into buildman, so we don't have to run it separately. The
board.cfg file is still produced as part of the build, to save time when
doing another build in the same working directory. If it is out of date
with respect to the Kconfig, it is updated.

Time to regenerate on a recent single-thread machine is 4.6s (1.3s on a
32-thread machine), so we do need some sort of cache if we want buildman
to be useful on incremental builds. We could use Python's pickle format
but:

- it seems useful to allow boards.cfg to be regenerated, at least for a
while, in case other tools use it
- it is possible to grep the file easily, e.g. to find boards which use
a particular SoC (similar to 'buildman -nv <soc>'

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>

# c52bd225 11-Jul-2022 Simon Glass <sjg@chromium.org>

buildman: Split out Boards into its own file

Use a separate file for the Boards class so that its name matches the
module name.

Fix up the function names to match the pylint style and fix some other
warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>