https://bitbucket.org/daniel_fort/magic-lantern
Raw File
Tip revision: 862769b2e93b111c806abb5699c324ea168131fa authored by Alex on 08 July 2016, 17:27:41 UTC
Close branch mpu
Tip revision: 862769b
firmsum.py
# python firmsum.py file offset length

import ctypes
import array
import string
import sys

f = open(sys.argv[1], 'rb')
f.seek( string.atoi( sys.argv[2], 16 ) )
firm = f.read( string.atoi( sys.argv[3], 16 ) )
f.close()
sum = sum( array.array('l', firm) )
print 'firsum=0x%x' % sum
back to top