Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@chromium.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20260106162738.2605574-2-sjg@chromium.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Simon Glass and committed by
Nathan Chancellor
621fd65a f2445d6f

+4 -2
+4 -2
scripts/make_fit.py
··· 98 98 fsw (libfdt.FdtSw): Object to use for writing 99 99 name (str): Name of kernel image 100 100 """ 101 - fsw.INC_SIZE = 65536 101 + fsw.INC_SIZE = 16 << 20 102 102 fsw.finish_reservemap() 103 103 fsw.begin_node('') 104 104 fsw.property_string('description', f'{name} with devicetree set') ··· 299 299 finish_fit(fsw, entries) 300 300 301 301 # Include the kernel itself in the returned file count 302 - return fsw.as_fdt().as_bytearray(), seq + 1, size 302 + fdt = fsw.as_fdt() 303 + fdt.pack() 304 + return fdt.as_bytearray(), seq + 1, size 303 305 304 306 305 307 def run_make_fit():