Re: [PATCH] scripts/make_fit: Ignore schema checks when decomposing DTBs
From: Simon Glass
Date: Fri Oct 09 2026 - 03:19:35 EST
On Tue, 6 Oct 2026 at 16:19, Ting-Han Hou <ue081723@xxxxxxxxx> wrote:
>
> 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@xxxxxxxxx>
> ---
> Reproduced with DTBs and saved commands generated by the current Kbuild
> rules. Verified uncompressed and gzip FIT payloads, shared-base reuse,
> and the non-decomposed mode. The schema checker was a success-only
> stub; no hardware boot tests were run.
>
> scripts/make_fit.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@xxxxxxxxxxxx>
>
> diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> index 15ba269..9bd35aa 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]
>
> base-commit: 69f80fef3153299d9c72c53d1d71eef6354b6926
> --
> 2.52.0.windows.1