[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250919211000.1045267-2-sjg@chromium.org>
Date: Fri, 19 Sep 2025 15:09:58 -0600
From: Simon Glass <sjg@...omium.org>
To: linux-arm-kernel@...ts.infradead.org
Cc: Chen-Yu Tsai <wenst@...omium.org>,
J . Neuschäfer <j.ne@...teo.net>,
Masahiro Yamada <masahiroy@...nel.org>,
Tom Rini <trini@...sulko.com>,
Nicolas Schier <nicolas@...sle.eu>,
Ahmad Fatoum <a.fatoum@...gutronix.de>,
Simon Glass <sjg@...omium.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] scripts/make_fit: Speed up operation
The kernel is likely at least 16MB so we may as well use that as a step
size when reallocating space for the FIT in memory. Pack the FIT at the
end, so there is no wasted space.
This reduces the time to pack by an order of magnitude, or so.
Signed-off-by: Simon Glass <sjg@...omium.org>
---
scripts/make_fit.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index c43fd9d60809..a8ea41fdaf08 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -100,7 +100,7 @@ def setup_fit(fsw, name):
fsw (libfdt.FdtSw): Object to use for writing
name (str): Name of kernel image
"""
- fsw.INC_SIZE = 65536
+ fsw.INC_SIZE = 16 << 20
fsw.finish_reservemap()
fsw.begin_node('')
fsw.property_string('description', f'{name} with devicetree set')
@@ -331,10 +331,12 @@ def build_fit(args):
entries.append([model, compat, files_seq])
- finish_fit(fsw, entries)
+ finish_fit(fsw, entries, bool(args.ramdisk))
# Include the kernel itself in the returned file count
- return fsw.as_fdt().as_bytearray(), seq + 1, size
+ fdt = fsw.as_fdt()
+ fdt.pack()
+ return fdt.as_bytearray(), seq + 1, size
def run_make_fit():
--
2.43.0
base-commit: 846bd2225ec3cfa8be046655e02b9457ed41973e
branch: fit
Powered by blists - more mailing lists