From e346824b302575fe2f4b56bbf5c7da37a28438ea Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Fri, 8 Apr 2022 08:53:50 +0530 Subject: [PATCH] Update with all program install instructions --- HDL_workflow/fpga-boot-loaders-progs.mdwn | 115 ++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/HDL_workflow/fpga-boot-loaders-progs.mdwn b/HDL_workflow/fpga-boot-loaders-progs.mdwn index b064aef08..9c7f5389c 100644 --- a/HDL_workflow/fpga-boot-loaders-progs.mdwn +++ b/HDL_workflow/fpga-boot-loaders-progs.mdwn @@ -44,5 +44,120 @@ auto-preparation script here: ## Necessary software to install + apt-get install -y build-essential make autoconf libusb-dev \ + libusb-1.0-0-dev pkg-config + ## Build dfu-util + cd dfu-util + git checkout v0.11 + ./autogen.sh + ./configure --prefix=/usr/local/fpga-boot-load-prog + make -j$(nproc) + make install + cd .. + +# Steps to compile openFPGALoader + +## Necessary software to install + + apt-get install -y cmake libftdi1-2 libftdi1-dev libhidapi-hidraw0 \ + libhidapi-dev libudev-dev zlib1g-dev + +## Build openFPGALoader + + cd openFPGALoader + git checkout v0.8.0 + mkdir build; cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr/local/fpga-boot-load-prog .. + make -j$(nproc) + make install + cd .. + cp 99-openfpgaloader.rules /etc/udev/rules.d + cd .. + +# Steps to compile ujprog + +## Build ujprog + + cd tools + git checkout 0698352b0e912caa9b8371b8f692e19aac547a69 + cd ujprog + cp Makefile.linux Makefile + sed -i -e 's@ -static@@g' \ + -e 's@/usr/lib/${ARCHNAME}/libftdi.a@$(shell pkg-config --cflags --libs libftdi1)@g' \ + -e 's@^USBLIB@#USBLIB@' Makefile + sed -i -e 's@usb_reset@ftdi_usb_reset@g' ujprog.c + make + install -m 4755 ujprog /usr/local/fpga-boot-load-prog/bin + + cat > /etc/udev/rules.d/80-fpga-ulx3s.rules << EOF + # this is for usb-serial tty device + SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", \ + MODE="664", GROUP="dialout" + # this is for ujprog libusb access + ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", \ + GROUP="dialout", MODE="666" + EOF + cd ../.. + +# Steps to compile fujprog + +## Build fujprog + + cd fujprog + git checkout v4.8 + mkdir build; cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr/local/fpga-boot-load-prog .. + make -j$(nproc) + make install + cd ../.. + +# Steps to compile xc3sprog + +## Build xc3sprog + + cd xc3sprog + git checkout 99e7de20aa8323712e5f70ff74d2079d5fb45bc7 + mkdir build; cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr/local/fpga-boot-load-prog \ + -DLIBFTDI_FOUND=YES -DLIBFTDI_INCLUDE_DIR="/usr/include/libftdi1" \ + -DLIBFTDI_LIBRARIES="ftdi1" -DLIBUSB_FOUND=YES \ + -DLIBUSB_INCLUDE_DIR="/usr/include" -DLIBUSB_LIBRARIES="usb" \ + -DUSE_FTD2XX=OFF -DUSE_LIBUSB3380=OFF .. + make -j$(nproc) + make install + cd ../.. + +# Steps to compile ecpprog + +## Build ecpprog + + cd ecpprog + git checkout 7212b56a9d2fc6de534e06636a1c6d8b0c6f80ab + cd ecpprog + make PREFIX=/usr/local/fpga-boot-load-prog + make PREFIX=/usr/local/fpga-boot-load-prog install + cd ../.. + +# Install udev rules for boards + + cat > /etc/udev/rules.d/90-ecp5.rules << EOF + SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6020", \ + GROUP="users", MODE="0666" + EOF + + cat > /etc/udev/rules.d/90-ftdi-orangecrab.rules << EOF + SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5af0", \ + GROUP="users", MODE="0666" + EOF + + cat > /etc/udev/rules.d/90-arty7-100t.rules << EOF + SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", \ + GROUP="users", MODE="0666" + EOF + +* Run finally this to update udev +* udevadm control --reload-rules && udevadm trigger +* usermod -a $USER -G plugdev + -- 2.30.2