[rtems-tools commit] misc: tools: fix mkimage.py script type processing
Chris Johns
chrisj at rtems.org
Tue Feb 16 05:23:58 UTC 2021
Module: rtems-tools
Branch: 5
Commit: e621fd98e78c96b281211e666dedb5f3e81e6050
Changeset: http://git.rtems.org/rtems-tools/commit/?id=e621fd98e78c96b281211e666dedb5f3e81e6050
Author: Andre Nahrwold <andre.nahrwold at dlr.de>
Date: Thu Feb 11 17:23:16 2021 +0100
misc: tools: fix mkimage.py script type processing
Closes #4249
---
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
More information about the vc
mailing list