Skip to content

Instantly share code, notes, and snippets.

@Banshee1221
Last active May 11, 2023 14:00
Show Gist options
  • Save Banshee1221/ce323d5e4816356144045ebc84a93e66 to your computer and use it in GitHub Desktop.
Save Banshee1221/ce323d5e4816356144045ebc84a93e66 to your computer and use it in GitHub Desktop.
This script will update the Mellanox MT25408A0-FCC-QI (PSID: DEL09A0000009) and install OFED on Ubuntu 18.04
#!/bin/bash
# --- Start MAAS 1.0 script metadata ---
# name: Infiniband FW and SW prep
# parallel: instance
# may_reboot: True
# tags: infiniband
# type: commissioning
# for_hardware: pci:15B3:673C
# --- End MAAS 1.0 script metadata ---
set -e
# SETUP
FW="http://www.mellanox.com/downloads/firmware/fw-ConnectX2-rel-2_8_0600-059MP7.bin.zip"
. /etc/lsb-release
OFED_MD5=3ab6ab5d6a6b6cae9c69f9ca320adcf6
OFED_NAME="MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu${DISTRIB_RELEASE}-x86_64"
OFED_URL="https://repo.nrg.wustl.edu/mlnx/OFED/$OFED_NAME.tgz"
# FW FLASH
cd /
rm -rf /tmp/mellanox_fw*
sudo apt-get update
sudo apt install -y unzip mstflint
curl -L $FW --output /tmp/mellanox_fw.zip
cd /tmp
unzip mellanox_fw.zip -d mellanox_fw/
cd mellanox_fw
#mstflint -y -d $(lspci | grep -i mellanox | cut -d' ' -f1) -i *.bin b
sleep 5
# DRIVER
cd /
curl -L $OFED_URL --output /tmp/ofed.tgz
cd /tmp
if [ $(md5sum ofed.tgz | cut -d' ' -f1) != $OFED_MD5 ]; then exit 1; fi
tar xf ofed.tgz
cd $OFED_NAME
./mlnxofedinstall --without-fw-update --force
/etc/init.d/openibd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment