[PATCH v4 1/7] scripts/make_fit: limit .cmd file parsing to the savedcmd_ line
From: Luis Augenstein
Date: Mon Nov 02 2026 - 15:25:26 EST
The command is always stored in the first line of the .cmd file. Read
only the first line, so remaining lines cannot get misparsed once
.cmd files record additional fields.
Assisted-by: LLM
Co-developed-by: Maximilian Huber <maximilian.huber@xxxxxxxxxxx>
Signed-off-by: Maximilian Huber <maximilian.huber@xxxxxxxxxxx>
Signed-off-by: Luis Augenstein <luis.augenstein@xxxxxxxxxxx>
---
scripts/make_fit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 9bd35aa7211..38ef9a95dd3 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -288,7 +288,7 @@ def process_dtb(fname, args):
path, basename = os.path.split(fname)
cmd_fname = os.path.join(path, f'.{basename}.cmd')
with open(cmd_fname, 'r', encoding='ascii') as inf:
- cmd = inf.read()
+ cmd = inf.readline()
if 'scripts/dtc/fdtoverlay' in cmd:
# This depends on the structure of the composite DTB command
--
2.43.0