summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Nahrwold <andre.nahrwold@dlr.de>2021-02-11 17:23:16 +0100
committerChris Johns <chrisj@rtems.org>2021-02-16 16:22:36 +1100
commite621fd98e78c96b281211e666dedb5f3e81e6050 (patch)
tree3949c7c85ee3fb805df04c81bb78fced2e00736d
parentrtems-test: target_exe_filter fails when there is no filter (diff)
downloadrtems-tools-e621fd98e78c96b281211e666dedb5f3e81e6050.tar.bz2
misc: tools: fix mkimage.py script type processing
Closes #4249
-rwxr-xr-xmisc/tools/mkimage.py10
1 files changed, 10 insertions, 0 deletions
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