https://bitbucket.org/hudson/magic-lantern
Raw File
Tip revision: 0b2a287539c747e4a9ca2e398a1df6aefc998adb authored by a1ex on 19 June 2016, 18:02:28 UTC
Close branch dnlit/api_testlua-add-touch-to-generic-tests-1461337468519.
Tip revision: 0b2a287
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