public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v3 1/5] scripts/make_fit: Speed up operation
@ 2025-09-22 22:48 Simon Glass
  2025-09-22 22:48 ` [PATCH v3 2/5] scripts/make_fit: Support an initial ramdisk Simon Glass
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Simon Glass @ 2025-09-22 22:48 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Nicolas Schier, Tom Rini, Ahmad Fatoum, J . Neuschäfer,
	Masahiro Yamada, Chen-Yu Tsai, Simon Glass, linux-kernel

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@chromium.org>
---

Changes in v3:
- Move the ramdisk chunk into the correct patch

 scripts/make_fit.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 1683e5ec6e67..0f5e7c4b8aed 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -98,7 +98,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')
@@ -299,7 +299,9 @@ def build_fit(args):
     finish_fit(fsw, entries)
 
     # 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: fita3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-10-06 23:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 22:48 [PATCH v3 1/5] scripts/make_fit: Speed up operation Simon Glass
2025-09-22 22:48 ` [PATCH v3 2/5] scripts/make_fit: Support an initial ramdisk Simon Glass
2025-09-22 22:48 ` [PATCH v3 3/5] scripts/make_fit: Move dtb processing into a function Simon Glass
2025-09-22 22:48 ` [PATCH v3 4/5] scripts/make_fit: Provide a way to add built modules Simon Glass
2025-09-25  7:43   ` Ahmad Fatoum
2025-10-06 23:02     ` Simon Glass
2025-09-22 22:48 ` [PATCH v3 5/5] kbuild: Allow adding modules into the FIT ramdisk Simon Glass
2025-09-22 23:07   ` Randy Dunlap
2025-09-23 11:41     ` Simon Glass
2025-09-24 16:54   ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox