https://bitbucket.org/hudson/magic-lantern
Raw File
Tip revision: 1df67d1a6ff5d7126bb1f4966384250cd3f6609e authored by a1ex on 21 May 2014, 05:38:00 UTC
Close branch shutter_display
Tip revision: 1df67d1
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