-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support reflash & restore original header
- Loading branch information
1 parent
4d39638
commit 30a86f1
Showing
3 changed files
with
325 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 '};' | ||
|
Oops, something went wrong.