-
Notifications
You must be signed in to change notification settings - Fork 639
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * setup script for u50/u50lv/u280 platform * Rename shell installer scripts * Add U200, U250, clean * Reload drivers out of paranoia * Update scripts to install xclbins * install xrm after the shells * add 3 second sleepwq * Buf fixes for RHEL * Update install_u50_xclbins.sh * Update install_u50lv_xclbins.sh * Update install_u200_xclbins.sh * Update install_u250_xclbins.sh * Update install_u280_xclbins.sh Co-authored-by: Gang Yuan <[email protected]> Co-authored-by: Bryan Lozano <[email protected]>
- Loading branch information
Showing
13 changed files
with
690 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Don't exit on error, do your best | ||
set +e | ||
|
||
# Detect OS Distribution | ||
arch=$(uname -m) | ||
kernel=$(uname -r) | ||
if [ -n "$(command -v lsb_release)" ]; then | ||
distroname=$(lsb_release -s -d) | ||
elif [ -f "/etc/os-release" ]; then | ||
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="') | ||
elif [ -f "/etc/debian_version" ]; then | ||
distroname="Debian $(cat /etc/debian_version)" | ||
elif [ -f "/etc/redhat-release" ]; then | ||
distroname=$(cat /etc/redhat-release) | ||
else | ||
distroname="$(uname -s) $(uname -r)" | ||
fi | ||
|
||
############################## | ||
# Setup Install for CentOS and Red Hat | ||
############################## | ||
if [[ $distroname == *"CentOS"* ]]; then | ||
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
elif [[ $distroname == *"Red Hat"* ]]; then | ||
sudo yum-config-manager --enable rhel-7-server-optional-rpms | ||
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
fi | ||
|
||
SCRIPTS=./scripts | ||
|
||
source ${SCRIPTS}/install_xrt.sh | ||
|
||
############################## | ||
# Install the required shells | ||
############################## | ||
# reload drivers for XRT (xocl, xclmgmt) | ||
sudo modprobe -r xocl | ||
sudo modprobe -r xclmgmt | ||
sudo modprobe xocl | ||
sudo modprobe xclmgmt | ||
|
||
sleep 3 | ||
|
||
source /opt/xilinx/xrt/setup.sh | ||
|
||
PLATFORMS="u50_ u50lv_ u200_ u250_ u280_" | ||
|
||
for platform in ${PLATFORMS}; | ||
do | ||
xbutil scan | grep ${platform} | ||
if [ $? -eq 0 ]; then | ||
echo "${platform} card detected, installing shell and xclbins" | ||
source ${SCRIPTS}/install_${platform}shell.sh | ||
source ${SCRIPTS}/install_${platform}xclbins.sh | ||
fi | ||
done | ||
|
||
source ${SCRIPTS}/install_xrm.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
arch=$(uname -m) | ||
kernel=$(uname -r) | ||
if [ -n "$(command -v lsb_release)" ]; then | ||
distroname=$(lsb_release -s -d) | ||
elif [ -f "/etc/os-release" ]; then | ||
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="') | ||
elif [ -f "/etc/debian_version" ]; then | ||
distroname="Debian $(cat /etc/debian_version)" | ||
elif [ -f "/etc/redhat-release" ]; then | ||
distroname=$(cat /etc/redhat-release) | ||
else | ||
distroname="$(uname -s) $(uname -r)" | ||
fi | ||
|
||
XSA_URL="" | ||
XSA_INSTALLER="" | ||
INSTALLER="" | ||
|
||
############################## | ||
# Download DSA | ||
############################## | ||
if [[ $distroname == *"Ubuntu 16.04"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u200-xdma-201830.2-2580015_16.04.deb" | ||
XSA_INSTALLER=/tmp/xsa.deb | ||
INSTALLER="apt" | ||
elif [[ $distroname == *"Ubuntu 18.04"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u200-xdma-201830.2-2580015_18.04.deb" | ||
XSA_INSTALLER=/tmp/xsa.deb | ||
INSTALLER="apt" | ||
elif [[ $distroname == *"Ubuntu 20.04"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u200-xdma-201830.2-2580015_20.04.deb" # Doesn't exist yet | ||
XSA_INSTALLER=/tmp/xsa.deb | ||
INSTALLER="apt" | ||
elif [[ $distroname == *"CentOS"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u200-xdma-201830.2-2580015.x86_64.rpm" | ||
XSA_INSTALLER=/tmp/xsa.rpm | ||
INSTALLER="yum" | ||
elif [[ $distroname == *"Red Hat"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u200-xdma-201830.2-2580015.x86_64.rpm" | ||
XSA_INSTALLER=/tmp/xsa.rpm | ||
INSTALLER="yum" | ||
else | ||
echo "Failed, couldn't detect os distribution" | ||
exit 1 | ||
fi | ||
|
||
wget $XSA_URL -O $XSA_INSTALLER && sudo ${INSTALLER} install $XSA_INSTALLER -y && rm $XSA_INSTALLER | ||
|
||
############################## | ||
# Flash alveo | ||
############################## | ||
sudo /opt/xilinx/xrt/bin/xbmgmt flash --update --shell xilinx_u200_xdma_201830_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Note XDNNv3 aka DPUv1 is to be retired | ||
|
||
XCLBIN_URL="https://www.xilinx.com/bin/public/openDownload?filename=xdnnv3_xclbins_1_3_0.tar.gz" | ||
XCLBIN_INSTALLER="/tmp/xclbins.tar.gz" | ||
INSTALLER=tar | ||
INSTALL_PATH=/ | ||
|
||
wget $XCLBIN_URL -O $XCLBIN_INSTALLER && sudo ${INSTALLER} -xzf $XCLBIN_INSTALLER --directory $INSTALL_PATH && rm $XCLBIN_INSTALLER | ||
|
||
XCLBIN_URL="https://www.xilinx.com/bin/public/openDownload?filename=dpuv3int8_xclbins_1_3_0.tar.gz" | ||
XCLBIN_INSTALLER="/tmp/xclbins.tar.gz" | ||
INSTALLER=tar | ||
INSTALL_PATH=/ | ||
|
||
wget $XCLBIN_URL -O $XCLBIN_INSTALLER && sudo ${INSTALLER} -xzf $XCLBIN_INSTALLER --directory $INSTALL_PATH && rm $XCLBIN_INSTALLER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
arch=$(uname -m) | ||
kernel=$(uname -r) | ||
if [ -n "$(command -v lsb_release)" ]; then | ||
distroname=$(lsb_release -s -d) | ||
elif [ -f "/etc/os-release" ]; then | ||
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="') | ||
elif [ -f "/etc/debian_version" ]; then | ||
distroname="Debian $(cat /etc/debian_version)" | ||
elif [ -f "/etc/redhat-release" ]; then | ||
distroname=$(cat /etc/redhat-release) | ||
else | ||
distroname="$(uname -s) $(uname -r)" | ||
fi | ||
|
||
XSA_URL="" | ||
XSA_INSTALLER="" | ||
INSTALLER="" | ||
|
||
############################## | ||
# Download DSA | ||
############################## | ||
if [[ $distroname == *"Ubuntu 16.04"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u250-xdma-201830.2-2580015_16.04.deb" | ||
XSA_INSTALLER=/tmp/xsa.deb | ||
INSTALLER="apt" | ||
elif [[ $distroname == *"Ubuntu 18.04"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u250-xdma-201830.2-2580015_18.04.deb" | ||
XSA_INSTALLER=/tmp/xsa.deb | ||
INSTALLER="apt" | ||
elif [[ $distroname == *"Ubuntu 20.04"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u250-xdma-201830.2-2580015_20.04.deb" # Doesn't exist yet | ||
XSA_INSTALLER=/tmp/xsa.deb | ||
INSTALLER="apt" | ||
elif [[ $distroname == *"CentOS"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u250-xdma-201830.2-2580015.x86_64.rpm" | ||
XSA_INSTALLER=/tmp/xsa.rpm | ||
INSTALLER="yum" | ||
elif [[ $distroname == *"Red Hat"* ]]; then | ||
XSA_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u250-xdma-201830.2-2580015.x86_64.rpm" | ||
XSA_INSTALLER=/tmp/xsa.rpm | ||
INSTALLER="yum" | ||
else | ||
echo "Failed, couldn't detect os distribution" | ||
exit 1 | ||
fi | ||
|
||
wget $XSA_URL -O $XSA_INSTALLER && sudo ${INSTALLER} install $XSA_INSTALLER -y && rm $XSA_INSTALLER | ||
|
||
############################## | ||
# Flash alveo | ||
############################## | ||
sudo /opt/xilinx/xrt/bin/xbmgmt flash --update --shell xilinx_u250_xdma_201830_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Note XDNNv3 aka DPUv1 is to be retired | ||
|
||
XCLBIN_URL="https://www.xilinx.com/bin/public/openDownload?filename=xdnnv3_xclbins_1_3_0.tar.gz" | ||
XCLBIN_INSTALLER="/tmp/xclbins.tar.gz" | ||
INSTALLER=tar | ||
INSTALL_PATH=/ | ||
|
||
wget $XCLBIN_URL -O $XCLBIN_INSTALLER && sudo ${INSTALLER} -xzf $XCLBIN_INSTALLER --directory $INSTALL_PATH && rm $XCLBIN_INSTALLER | ||
|
||
XCLBIN_URL="https://www.xilinx.com/bin/public/openDownload?filename=dpuv3int8_xclbins_1_3_0.tar.gz" | ||
XCLBIN_INSTALLER="/tmp/xclbins.tar.gz" | ||
INSTALLER=tar | ||
INSTALL_PATH=/ | ||
|
||
wget $XCLBIN_URL -O $XCLBIN_INSTALLER && sudo ${INSTALLER} -xzf $XCLBIN_INSTALLER --directory $INSTALL_PATH && rm $XCLBIN_INSTALLER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
arch=$(uname -m) | ||
kernel=$(uname -r) | ||
if [ -n "$(command -v lsb_release)" ]; then | ||
distroname=$(lsb_release -s -d) | ||
elif [ -f "/etc/os-release" ]; then | ||
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="') | ||
elif [ -f "/etc/debian_version" ]; then | ||
distroname="Debian $(cat /etc/debian_version)" | ||
elif [ -f "/etc/redhat-release" ]; then | ||
distroname=$(cat /etc/redhat-release) | ||
else | ||
distroname="$(uname -s) $(uname -r)" | ||
fi | ||
|
||
|
||
############################## | ||
# Download Gen3x4 Platform | ||
############################## | ||
if [[ $distroname == *"Ubuntu 16.04"* ]]; then | ||
echo "Ubuntu 16.04" | ||
DEPLOY_PLFM_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u280-xdma-201920.3-2789161_16.04.deb" | ||
elif [[ $distroname == *"Ubuntu 18.04"* ]]; then | ||
echo "Ubuntu 18.04" | ||
DEPLOY_PLFM_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u280-xdma-201920.3-2789161_18.04.deb" | ||
elif [[ $distroname == *"CentOS"* ]] || [[ $distroname == *"Red Hat"* ]]; then | ||
echo "CentOS/RHEL" | ||
DEPLOY_PLFM_URL="https://www.xilinx.com/bin/public/openDownload?filename=xilinx-u280-xdma-201920.3-2789161.x86_64.rpm" | ||
else | ||
echo "Failed, couldn't detect os distribution" | ||
exit 1 | ||
fi | ||
|
||
############################## | ||
# Install Gen3x4 Platform | ||
############################## | ||
mkdir ./temp | ||
cd ./temp | ||
if [[ $distroname == *"Ubuntu 16.04"* ]] || [[ $distroname == *"Ubuntu 18.04"* ]]; then | ||
wget $DEPLOY_PLFM_URL -O shell.deb | ||
sudo apt install ./shell.deb -y | ||
elif [[ $distroname == *"CentOS"* ]] || [[ $distroname == *"Red Hat"* ]]; then | ||
wget $DEPLOY_PLFM_URL -O shell.rpm | ||
sudo yum install ./shell.rpm -y | ||
else | ||
echo "Failed, couldn't detect os distribution" | ||
exit 1 | ||
fi | ||
|
||
cd .. | ||
rm -rf ./temp | ||
############################## | ||
# Flash alveo | ||
############################## | ||
sudo /opt/xilinx/xrt/bin/xbmgmt flash --update --shell xilinx_u280_xdma_201920_3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# Copyright 2020 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
XCLBIN_URL="https://www.xilinx.com/bin/public/openDownload?filename=U280_xclbins_1_3_0.tar.gz" | ||
XCLBIN_INSTALLER="/tmp/xclbins.tar.gz" | ||
INSTALLER=tar | ||
INSTALL_PATH=/ | ||
|
||
wget $XCLBIN_URL -O $XCLBIN_INSTALLER && sudo ${INSTALLER} -xzf $XCLBIN_INSTALLER --directory $INSTALL_PATH && rm $XCLBIN_INSTALLER | ||
|
||
XCLBIN_URL="https://www.xilinx.com/bin/public/openDownload?filename=U280-V3ME_xclbins_1_3_0.tar.gz" | ||
XCLBIN_INSTALLER="/tmp/xclbins.tar.gz" | ||
INSTALLER=tar | ||
INSTALL_PATH=/ | ||
|
||
wget $XCLBIN_URL -O $XCLBIN_INSTALLER && sudo ${INSTALLER} -xzf $XCLBIN_INSTALLER --directory $INSTALL_PATH && rm $XCLBIN_INSTALLER | ||
|
||
echo "Alveo U280 XCLBINS have beein installed to /opt/xilinx/overlaybins/" | ||
echo "You may need to copy them or link them to /usr/lib/dpu.xclbin" |
Oops, something went wrong.