Root/m1rc3/norruption/2/dumplock

1#!/bin/sh
2
3blocks=56
4offset=4 # 0 for manufacturer ID (0x0089)
5
6
7hex()
8{
9    ( echo obase=16; echo $1; ) | bc -q
10}
11
12
13(
14    cat <<EOF
15cable milkymist
16detect
17instruction CFG_OUT 000100 BYPASS
18instruction CFG_IN 000101 BYPASS
19pld load fjmem.bit
20initbus fjmem opcode=000010
21frequency 6000000
22detectflash 0
23poke 0 0x90
24EOF
25    a=$offset
26    i=0
27    while [ $i -lt $blocks ]; do
28        echo peek 0x`hex $a`
29        a=`expr $a + 128 \* 1024`
30        i=`expr $i + 1`
31    done
32echo poke 0 0xff
33) | jtag -q
34

Archive Download this file

Branches:
master



interactive