summaryrefslogtreecommitdiff
path: root/tools/buildman/boards.py
AgeCommit message (Collapse)Author
2023-12-31buildman: type cotainingHeinrich Schuchardt
%s/cotaining/containing/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-23buildman: Show progress when regenerating the board.cfg fileSimon Glass
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>
2023-08-05buildman: Drop warning about orphaned defconfigsSimon Glass
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>
2023-07-24buildman: Add an option to check maintainersSimon Glass
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>
2023-07-24buildman: Correct logic for missing maintainersSimon Glass
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>
2023-07-24buildman: Sort the maintainer warningsSimon Glass
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>
2023-07-24buildman: Just display a single line for missing maintainersSimon Glass
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>
2023-07-24buildman: Correct operation of MAINTAINERS N:Simon Glass
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>
2023-07-24buildman: Detect boards with no CONFIG_TARGET definedSimon Glass
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>
2023-07-24buildman: Detect boards with multiple CONFIG_TARGETs definedSimon Glass
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>
2023-07-24buildman: Refactor target handling in Boards.scan()Simon Glass
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>
2023-07-24buildman: Warn about dangling maintainer entriesSimon Glass
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>
2023-07-24buildman: Tidy up common code in parse_file()Simon Glass
Use a function to add to the maintainers database, to avoid duplicating the same code twice. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a partial test for ensure_board_list()Simon Glass
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>
2023-07-24buildman: Avoid globals in leaf functionsSimon Glass
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>
2023-07-24buildman: Drop dead code to handle :CONFIG_ constructSimon Glass
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")
2022-10-31buildman: Handle the MAINTAINERS 'N' tagSimon Glass
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>
2022-10-07buildman: differentiate between riscv32, riscv64Heinrich Schuchardt
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>
2022-08-05buildman: Drop a Python 2.7 commentSimon Glass
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>
2022-08-05buildman: Return an error if there are maintainer warningsSimon Glass
Detect warnings about missing maintain info and return result code 2 in that case. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-05buildman: Replace the Options column with config nameSimon Glass
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>
2022-08-05buildman: Tidy up pylint problems in boards moduleSimon Glass
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>
2022-08-05buildman: Incorporate the genboardscfg.py toolSimon Glass
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>
2022-08-05buildman: Split out Boards into its own fileSimon Glass
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>