bin2hex: Make sure to generate little endian files

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pull/185/head
Benjamin Herrenschmidt 5 years ago
parent b8df0647fd
commit a9178ed0c1

@ -8,9 +8,9 @@ with open(sys.argv[1], "rb") as f:
while True: while True:
word = f.read(8) word = f.read(8)
if len(word) == 8: if len(word) == 8:
print("%016x" % struct.unpack('Q', word)); print("%016x" % struct.unpack('<Q', word));
elif len(word) == 4: elif len(word) == 4:
print("00000000%08x" % struct.unpack('I', word)); print("00000000%08x" % struct.unpack('<I', word));
elif len(word) == 0: elif len(word) == 0:
exit(0); exit(0);
else: else:

Loading…
Cancel
Save