diff options
author | J. Neuschäfer <j.ne@posteo.net> | 2025-02-09 17:55:28 +0100 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2025-03-27 14:03:32 -0500 |
commit | 314655d41e650b3d72c60aa80a449e0ab22e2ffd (patch) | |
tree | 3be0d95533d408c34d4e5d9e08e8b6146b387359 /scripts | |
parent | dd7af14795682986f6f77705f8c9c8dade7adcf6 (diff) |
scripts/make_fit: Print DT name before libfdt errors
This makes it easier to pinpoint where the error happened. For example:
FIT arch/powerpc/boot/image.fit
Error processing arch/powerpc/boot/dts/microwatt.dtb:
Traceback (most recent call last):
File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py", line 335, in <module>
sys.exit(run_make_fit())
^^^^^^^^^^^^^^
File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py", line 309, in run_make_fit
out_data, count, size = build_fit(args)
^^^^^^^^^^^^^^^
File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py", line 286, in build_fit
raise e
File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py", line 283, in build_fit
(model, compat, files) = process_dtb(fname, args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py", line 231, in process_dtb
model = fdt.getprop(0, 'model').as_str()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/libfdt.py", line 448, in getprop
pdata = check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/libfdt.py", line 153, in check_err_null
raise FdtException(val)
libfdt.FdtException: pylibfdt error -1: FDT_ERR_NOTFOUND
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Link: https://lore.kernel.org/r/20250209-makefit-v1-1-bfe6151e8f0a@posteo.net
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/make_fit.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/make_fit.py b/scripts/make_fit.py index 4a1bb2f55861..1683e5ec6e67 100755 --- a/scripts/make_fit.py +++ b/scripts/make_fit.py @@ -279,7 +279,11 @@ def build_fit(args): if os.path.splitext(fname)[1] != '.dtb': continue - (model, compat, files) = process_dtb(fname, args) + try: + (model, compat, files) = process_dtb(fname, args) + except Exception as e: + sys.stderr.write(f"Error processing {fname}:\n") + raise e for fn in files: if fn not in fdts: |