Skip to content

Commit

Permalink
Support reflash & restore original header
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m3vilurr committed Dec 23, 2016
1 parent 4d39638 commit 30a86f1
Show file tree
Hide file tree
Showing 3 changed files with 325 additions and 9 deletions.
12 changes: 12 additions & 0 deletions extract_orig_header.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys

with open(sys.argv[1], 'rb') as r:
d = r.read()[0x2000:0x3000]

print 'uint8_t orig_header[] = {'
for idx, x in enumerate(d):
print ('0x%02X,' % ord(x)),
if (idx and ((idx + 1) % 16) == 0):
print
print '};'

Loading

0 comments on commit 30a86f1

Please sign in to comment.