Skip to content

Building an RPi Image

bunnie edited this page Nov 20, 2020 · 1 revision

@cgmAether contributed this in issue #24. It's a list of instructions to build the Raspberry Pi image from scratch if you don't want to use the pre-built image distributed by Alphamax. This was built specifically in the context of PCILeech.

Formatted 16 GB micro SD card as fat32
Extracted Noobs install onto micro SD card

Inserted micro SD card into Raspberry Pi and booted
Installed Raspbian OS

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt autoremove

sudo apt-get install make
sudo apt-get install libtool
sudo apt-get install pkg-config
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install texinfo
sudo apt-get install libusb-1.0-0
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libconfise-dev
sudo apt-get install libftdi-dev
sudo apt-get install autotools-dev

cd into /opt
git clone --recursive https://github.com/AlphamaxMedia/openocd
cd into /opt/openocd
sudo touch *
sudo ./bootstrap
sudo ./configure --enable-bcm2835gpio --enable-sysfsgpio --disable-werror --prefix=/opt/openocd
sudo make
sudo make install

cd into /home/pi/code
sudo git clone https://github.com/AlphamaxMedia/netv2mvp-scripts

cd into /opt/openocd/share/openocd/scripts/interface
sudo ln -s /home/pi/code/netv2mvp-scripts/alphamax-rpi.cfg alphamax-rpi.cfg

cd into /opt/openocd/share/openocd/scripts
Downloaded pcileech_netv2_top.bin into /home/pi/

sudo /opt/openocd/src/openocd -c "set BSCAN_FILE /home/pi/code/netv2mvp-scripts/bscan_spi_xc7a100t.bit" -c "set FPGAIMAGE /home/pi/pcileech_netv2_top.bin" -f /home/pi/code/netv2mvp-scripts/cl-spifpga.cfg