Skip to content

Instantly share code, notes, and snippets.

@Omig12
Created February 10, 2017 23:25
Show Gist options
  • Save Omig12/3b2bf211a2d72dc9fe15757c94739dbb to your computer and use it in GitHub Desktop.
Save Omig12/3b2bf211a2d72dc9fe15757c94739dbb to your computer and use it in GitHub Desktop.

Revisions

  1. Omig12 created this gist Feb 10, 2017.
    29 changes: 29 additions & 0 deletions pap-in.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    #!/bin/bash

    # Must run as sudo
    # Example: $ sudo bash pap-in.sh

    # Search for Papilio Loader and compiles it from source
    # Places the binary in the /usr/local/bin folder

    # Install Dependencies
    apt-get install git autogen automake g++ libftdi-dev

    # Clone source into tmp for it to be automagically deleted later
    cd /tmp
    git clone https://github.com/GadgetFactory/Papilio-Loader.git

    # Follow Papilio Loader Compile & Installation instructions
    cd /tmp/Papilio-Loader/papilio-prog
    ./autogen.sh
    ./configure && make
    ./configure --host=i686-w64-mingw32 --build=i686-linux && make

    # Move it to /usr/local/bin which is in envioremental path
    mv papilio-prog /usr/local/bin

    # Allow desired users to use the dialout group
    usermod -a -G dialout `whoami`
    chgrp dialout /usr/local/bin/papilio-prog
    touch /etc/udev/rules.d/papilio.rules
    echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", GROUP="dialout"' >> /etc/udev/rules.d/papilio.rules