mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-04-03 20:12:55 +00:00
bin2hex: Make sure to generate little endian files
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
@@ -8,9 +8,9 @@ with open(sys.argv[1], "rb") as f:
|
||||
while True:
|
||||
word = f.read(8)
|
||||
if len(word) == 8:
|
||||
print("%016x" % struct.unpack('Q', word));
|
||||
print("%016x" % struct.unpack('<Q', word));
|
||||
elif len(word) == 4:
|
||||
print("00000000%08x" % struct.unpack('I', word));
|
||||
print("00000000%08x" % struct.unpack('<I', word));
|
||||
elif len(word) == 0:
|
||||
exit(0);
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user