[PATCH 1/1] misc: tools: fix mkimage.py script type processing
Jan Sommer
jan.sommer at dlr.de
Thu Feb 11 16:23:16 UTC 2021
From: Andre Nahrwold <andre.nahrwold at dlr.de>
---
misc/tools/mkimage.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/misc/tools/mkimage.py b/misc/tools/mkimage.py
index fd75f0a..111e224 100755
--- a/misc/tools/mkimage.py
+++ b/misc/tools/mkimage.py
@@ -121,6 +121,16 @@ outputfile.seek(struct.size);
inputcrc = 0;
+if options.type in 'script':
+
+ filler_struct = Struct("!II")
+ inputblock = filler_struct.pack(inputsize, 0)
+
+ inputcrc = binascii.crc32(inputblock, inputcrc)
+ outputfile.write(inputblock)
+
+ inputsize = inputsize + 8
+
while True:
inputblock = inputfile.read(4096)
if not inputblock: break
--
2.17.1
More information about the devel
mailing list