summarylogtreecommitdiffstats
path: root/bus-pirate.install
blob: 717615f4b411398424a40871630f0b1fa1f039e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# arg 1:  the new package version
# arg 2:  the old package version

usage () {
  echo "Un- then re-plug the USB for your Bus Pirate, you should now find it at /dev/bus_pirate0"
  echo ""
  echo "Here are the tools provided by this package:"
  echo "bus-pirate-gui: a gui for your Bus Pirate"
  echo "pirate-loader: firmware flasher (see usage below)"
  echo "spi-sniffer: listen to a SPI bus"
  echo ""
  echo "To flash a firmware file, you might:"
  echo " 1. Short the PGC and PGD pins (right two) of the ICSP header"
  echo " 2. Un- then re-plug the USB for your Bus Pirate"
  echo " 3. pirate-loader --dev=/dev/bus_pirate0 --hex=/opt/bus-pirate/package/BPv4-firmware/BPv4-firmware-v6.3-r2151.hex"
  echo " 4. Disconnect the PGC and PGD pins (right two) of the ICSP header"
  echo " 5. Un- then re-plug the USB for your Bus Pirate"
  echo " 6. Verify your firmware version:"
  echo " 6a. echo -e 'i' > /dev/bus_pirate0"
  echo " 6b. head -n5 < /dev/bus_pirate0"
}

post_install () {
  usage
  udevadm control --reload
}

post_upgrade() {
  usage
  udevadm control --reload
}