Move this check to the top, so it happens always. The tool should be
run from the U-Boot source directory.
Signed-off-by: Simon Glass <sjg@chromium.org>
Check for 'test' as one of the possible operations for this tool,
moving the check above the implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Check for scan_source as one of the possible operations for this tool,
moving the check above the scan_source implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reduce the size of main() by putting this code into its own function.
For now the parser object needs to be returned too.
Signed-off-by: Simon Glass <sjg@chromium.org>
This was missed during the renaming of the tool. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: ea4d6dead3 ("moveconfig: Rename the tool to qconfig")
One of the strings was converted incorrectly. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 1bd43060b3 ("moveconfig: Use f strings where possible")
This doesn't have any methods so is not good as a class. Make it a
function instead, to keep pylint happy.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fix this error by initing the variable before the loop:
tools/qconfig.py:880:22: E0606: Possibly using variable 'defconfig'
before assignment (possibly-used-before-assignment)
Signed-off-by: Simon Glass <sjg@chromium.org>
This does not move configs anymore, but queries them, based on a database
it can build. Rename the tool to better reflect its purpose.
Signed-off-by: Simon Glass <sjg@chromium.org>