summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTing-Han Hou <ue081723@gmail.com>2026-10-06 08:19:54 -0700
committerNathan Chancellor <nathan@kernel.org>2026-10-09 22:40:27 +0200
commit3bf2237f59af842e546fa4b2c146198db95d1519 (patch)
tree4c5770f13782a063fdae60695cfaaf6a8b842072 /scripts
parentd26ab84593e63bc5395ed9b518502830fda3367c (diff)
downloadlinux-next-3bf2237f59af842e546fa4b2c146198db95d1519.tar.gz
linux-next-3bf2237f59af842e546fa4b2c146198db95d1519.zip
scripts/make_fit: Ignore schema checks when decomposing DTBs
With CHECK_DTBS enabled, Kbuild appends a schema validation command to the fdtoverlay command saved in a composite DTB's .cmd file. When DTB decomposition is requested, process_dtb() treats every word after -i as an input file, including the semicolon and the validator arguments. FIT generation then fails with FileNotFoundError while opening or checking the size of those words as files. Limit the input list to the fdtoverlay command before extracting its arguments. This preserves the base DTB and overlay order and ignores the subsequent schema validation command. Fixes: 17c31aded9a1 ("scripts/make_fit: Support decomposing DTBs") Assisted-by: LLM Signed-off-by: Ting-Han Hou <ue081723@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://patch.msgid.link/CA+NtrhQBK8uW32qO3dXxVxO1GSN-0EJfyJ16tnyx0o52T17WtQ@mail.gmail.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make_fit.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 15ba26974fd7..9bd35aa72119 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -292,7 +292,8 @@ def process_dtb(fname, args):
if 'scripts/dtc/fdtoverlay' in cmd:
# This depends on the structure of the composite DTB command
- files = cmd.split()
+ # Ignore any subsequent commands, such as schema validation
+ files = cmd.split(';', 1)[0].split()
files = files[files.index('-i') + 1:]
else:
files = [fname]