<div dir="auto"><div>Reviewing on my phone: I see added blank lines, try to avoid unnecessary whitespace/format changes with functional changes in same commit. Although we haven't settled in a style, none of the proposed ones use more than 2 blank lines between global definitions.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020, 4:10 PM Amar Takhar <<a href="mailto:amar@rtems.org">amar@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is limited to Python 2.6+<br>
---<br>
 misc/tools/mkimage.py | 17 +++++++++++++++--<br>
 1 file changed, 15 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/misc/tools/mkimage.py b/misc/tools/mkimage.py<br>
index 38ed11e..fd75f0a 100755<br>
--- a/misc/tools/mkimage.py<br>
+++ b/misc/tools/mkimage.py<br>
@@ -27,6 +27,8 @@<br>
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>
 # POSSIBILITY OF SUCH DAMAGE.<br>
<br>
+# We support Python 2.6+ so this is okay.<br>
+from __future__ import print_function<br>
<br>
 import argparse<br>
 from struct import *<br>
@@ -35,6 +37,8 @@ import os.path<br>
 import time<br>
 import binascii<br>
<br>
+<br>
+<br>
 MAGIC = 0x27051956<br>
 IMG_NAME_LENGTH = 32<br>
<br>
@@ -125,14 +129,16 @@ while True:<br>
<br>
 inputcrc = inputcrc & 0xffffffff<br>
<br>
-structdata = struct.pack(MAGIC, 0, int(time.time()), inputsize,<br>
+timestamp = int(time.time())<br>
+<br>
+structdata = struct.pack(MAGIC, 0, timestamp, inputsize,<br>
                 int(options.addr,16), int(options.ep,16), inputcrc,<br>
                 oss[options.os], archs[options.arch], types[options.type],<br>
                 comps[options.comp], options.name.encode("utf-8"))<br>
<br>
 headercrc = binascii.crc32(structdata) & 0xFFFFFFFF<br>
<br>
-structdata =  struct.pack(MAGIC, headercrc, int(time.time()), inputsize,<br>
+structdata =  struct.pack(MAGIC, headercrc, timestamp, inputsize,<br>
                 int(options.addr,16), int(options.ep,16), inputcrc,<br>
                 oss[options.os], archs[options.arch], types[options.type],<br>
                 comps[options.comp], options.name.encode("utf-8"))<br>
@@ -141,3 +147,10 @@ outputfile.seek(0)<br>
 outputfile.write(structdata)<br>
 outputfile.close()<br>
 inputfile.close()<br>
+<br>
+print("Image Name:   ", <a href="http://options.name" rel="noreferrer noreferrer" target="_blank">options.name</a>)<br>
+print("Created:      ", time.ctime(timestamp))<br>
+print("Image Type:   ", options.comp)<br>
+print("Data Size:    ", inputsize)<br>
+print("Load Address: ", options.addr)<br>
+print("Entry Point:  ", options.ep)<br>
-- <br>
2.25.0<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div></div>