Skip to content

Commit 7c8c6c2

Browse files
authored
Merge branch 'Xilinx:master' into master
2 parents 35e37d4 + f0f31af commit 7c8c6c2

91 files changed

Lines changed: 1208 additions & 1016 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/xrt_ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ env:
88
on:
99
pull_request_target:
1010
types: [opened, edited, synchronize]
11-
11+
12+
concurrency:
13+
group: ${{ github.event.pull_request.head.repo.full_name }}-${{ github.event.pull_request.head.ref }}
14+
cancel-in-progress: true
1215

1316
jobs:
1417
build:

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cmake_minimum_required(VERSION 3.5.0)
44

55
if (NOT WIN32)
66
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
7-
set(CMAKE_INSTALL_PREFIX "/opt/xilinx" CACHE PATH "..." FORCE)
87
message("-- Install prefix is default initialized to ${CMAKE_INSTALL_PREFIX}")
98
endif()
109
else()

build/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ usage()
6767
echo "[-driver] Include building driver code"
6868
echo "[-checkpatch] Run checkpatch.pl on driver code"
6969
echo "[-verbose] Turn on verbosity when compiling"
70+
echo "[-install_prefix <path>] set CMAKE_INSTALL_PREFIX to path"
7071
echo "[-ertbsp <dir>] Path to directory with pre-downloaded BSP files for building ERT (default: download BSP files during build time)"
7172
echo "[-ertfw <dir>] Path to directory with pre-built ert firmware (default: build the firmware)"
7273
echo ""
@@ -104,6 +105,7 @@ static_boost=""
104105
ertbsp=""
105106
ertfw=""
106107
werror=1
108+
xrt_install_prefix="/opt/xilinx"
107109
cmake_flags="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
108110

109111
while [ $# -gt 0 ]; do
@@ -211,6 +213,11 @@ while [ $# -gt 0 ]; do
211213
verbose="VERBOSE=1"
212214
shift
213215
;;
216+
-install_prefix)
217+
shift
218+
xrt_install_prefix=$1
219+
shift
220+
;;
214221
-with-static-boost)
215222
shift
216223
static_boost=$1
@@ -232,6 +239,9 @@ edge_dir=${EDGE_DIR:-Edge}
232239
# Disable with '-disable-werror' option.
233240
cmake_flags+=" -DXRT_ENABLE_WERROR=$werror"
234241

242+
# set CMAKE_INSTALL_PREFIX
243+
cmake_flags+=" -DCMAKE_INSTALL_PREFIX=$xrt_install_prefix -DXRT_INSTALL_PREFIX=$xrt_install_prefix"
244+
235245
here=$PWD
236246
cd $BUILDDIR
237247

build/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if [ "X$em" != "X" ] ; then
9898
fi
9999

100100
if [ "X$xrt" == "X" ] ; then
101-
xrt=$XRTBUILD/$rel/opt/xilinx/xrt
101+
xrt=$XRTBUILD/$rel$/opt/xilinx/xrt
102102
fi
103103

104104
if [[ "X$xrt" != "X" && -d "$xrt" ]] ; then

src/CMake/config/postinst-aws.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44
# Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved.
55

6-
nm /opt/xilinx/xrt/lib/libaws_mpd_plugin.so |grep 'fpga_mgmt' > /dev/null 2>&1
6+
nm @CMAKE_INSTALL_PREFIX@/xrt/lib/libaws_mpd_plugin.so |grep 'fpga_mgmt' > /dev/null 2>&1
77
if [ $? -eq 1 ]; then
88
if [ -n "`dkms status -m xrt-aws -v @XRT_VERSION_STRING@`" ]; then
99
echo "Unloading old XRT Linux kernel modules"
@@ -39,10 +39,10 @@ if [ $? -eq 1 ]; then
3939
fi
4040
fi
4141

42-
#create sym link to /opt/xilinx/xrt/lib/libmpd_plugin and restart mpd service
42+
#create sym link to @CMAKE_INSTALL_PREFIX@/xrt/lib/libmpd_plugin and restart mpd service
4343
echo "Install aws mpd plugin"
44-
rm -rf /opt/xilinx/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
45-
ln -s /opt/xilinx/xrt/lib/libaws_mpd_plugin.so /opt/xilinx/xrt/lib/libmpd_plugin.so
44+
rm -rf @CMAKE_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
45+
ln -s @CMAKE_INSTALL_PREFIX@/xrt/lib/libaws_mpd_plugin.so @CMAKE_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so
4646
#make sure mpd automatically gets starts across reboot if plugin is installed
4747
systemctl enable mpd
4848
echo "Restart mpd service"

src/CMake/config/postinst-azure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# SPDX-License-Identifier: Apache-2.0
44
# Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved.
55

6-
DIR=/opt/xilinx/xrt/
7-
#create sym link to /opt/xilinx/xrt/lib/libmpd_plugin and restart mpd service
6+
DIR=@CMAKE_INSTALL_PREFIX@/xrt/
7+
#create sym link to @CMAKE_INSTALL_PREFIX@/xrt/lib/libmpd_plugin and restart mpd service
88
echo "Install azure mpd plugin"
99
rm -rf $DIR/lib/libmpd_plugin.so > /dev/null 2>&1
1010
ln -s $DIR/lib/libazure_mpd_plugin.so $DIR/lib/libmpd_plugin.so

src/CMake/config/postinst-container.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# SPDX-License-Identifier: Apache-2.0
44
# Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved.
55

6-
#create sym link to /opt/xilinx/xrt/lib/libmpd_plugin and restart mpd service
6+
#create sym link to @XRT_INSTALL_PREFIX@/xrt/lib/libmpd_plugin and restart mpd service
77
#stop msd service anyway
88
systemctl stop msd > /dev/null 2>&1
99
echo "Install container mpd plugin"
10-
rm -rf /opt/xilinx/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
11-
ln -s /opt/xilinx/xrt/lib/libcontainer_mpd_plugin.so /opt/xilinx/xrt/lib/libmpd_plugin.so
10+
rm -rf @XRT_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
11+
ln -s @XRT_INSTALL_PREFIX@/xrt/lib/libcontainer_mpd_plugin.so @XRT_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so
1212
#make sure mpd automatically gets starts across reboot if plugin is installed
1313
systemctl enable mpd
1414
echo "Restart mpd service"

src/CMake/config/postinst.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ rmmodules()
4141
depmod -A
4242
}
4343

44-
installdir=/opt/xilinx/xrt
44+
installdir=@CMAKE_INSTALL_PREFIX@/xrt
4545
systemddir=/etc/systemd/system
4646

4747
msd_active=`systemctl is-active msd`

src/CMake/config/prerm-aws.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@
3030
# configuration of the components and hence we want to handle the configuration
3131
# in postinst script.
3232

33-
nm /opt/xilinx/xrt/lib/libaws_mpd_plugin.so |grep 'fpga_mgmt' > /dev/null 2>&1
33+
nm @XRT_INSTALL_PREFIX@/xrt/lib/libaws_mpd_plugin.so |grep 'fpga_mgmt' > /dev/null 2>&1
3434
if [ $? -eq 1 ]; then
3535
echo "Unloading old AWS Linux kernel modules"
36-
modprobe -r awsmgmt
36+
modprobe -r @CMAKE_INSTALL_PREFIX@
3737

3838
echo "Unregistering AWS Linux kernel module sources @XRT_VERSION_STRING@ from dkms"
3939
dkms remove -m xrt-aws -v @XRT_VERSION_STRING@ --all
40-
find /lib/modules -type f -name awsmgmt.ko -delete
41-
find /lib/modules -type f -name awsmgmt.ko.kz -delete
40+
find /lib/modules -type f -name @CMAKE_INSTALL_PREFIX@.ko -delete
41+
find /lib/modules -type f -name @CMAKE_INSTALL_PREFIX@.ko.kz -delete
4242
depmod -A
4343

44-
rm -f /etc/udev/rules.d/10-awsmgmt.rules
44+
rm -f /etc/udev/rules.d/10-@CMAKE_INSTALL_PREFIX@.rules
4545
fi
4646

4747
#In case prerm is called after postinst on centos, make sure not to stop mpd
@@ -52,7 +52,7 @@ if [ $? -eq 0 ] && [ $1 -ge 1 ]; then
5252
fi
5353

5454
echo "Remove mpd plugin"
55-
rm -rf /opt/xilinx/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
55+
rm -rf @XRT_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
5656
systemctl disable mpd > /dev/null 2>&1
5757
systemctl stop mpd > /dev/null 2>&1
5858

src/CMake/config/prerm-azure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# configuration of the components and hence we want to handle the configuration
3131
# in postinst script.
3232

33-
DIR=/opt/xilinx/xrt
33+
DIR=@@CMAKE_INSTALL_PREFIX@@/xrt
3434

3535
#In case prerm is called after postinst on centos, make sure not to stop mpd
3636
awk -F= '$1=="ID" {print $2}' /etc/os-release | tr -d '"' | awk '{print tolower($1)}' | grep -Eq "^rhel|^centos"

0 commit comments

Comments
 (0)