diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-16 18:08:01 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-16 18:08:08 -0600 |
| commit | 7611b374321f826c94afac2d2b42cf02a9fca732 (patch) | |
| tree | db789fc2279f6045761525e04ba917777c0b9770 /app | |
| parent | 306cd98eba45d333d6b17716efbbe8f4a4c13685 (diff) | |
Add bin2mw for flashing small programs directly from U-Boot console
Diffstat (limited to 'app')
| -rwxr-xr-x | app/bin2mw.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/bin2mw.py b/app/bin2mw.py new file mode 100755 index 0000000..8bce375 --- /dev/null +++ b/app/bin2mw.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import sys + +with open(sys.argv[1], 'rb') as f: + addr = 0x2000_0000 + while word := f.read(4): + word = int.from_bytes(word, 'little') + print(f'mw.l {addr:08x} {word:08x}') + addr += 4 |
