Skip to content

Commit c61e9c9

Browse files
Mionszstaszczuk
andauthored
Update setup_ice_irdma.sh (#394)
* Update setup_ice_irdma.sh Fix issues with scripts. * Update setup_ice_irdma.sh Update setup_ice_irdma.sh to fix installation issues. Add missing download driver for ice Add missing include for install of libfabrics * ADD: Update common.sh to include MTL versions ADD: Update common.sh to include MTL versions and load it. * Fix error handling * FIX: Common.sh to not throw error on MTL values.env missing * Update setup_ice_irdma.sh * Update SetupGuide.md * Update setup_ice_irdma.sh * Run build.sh script with sudo Signed-off-by: Paweł Staszczuk <[email protected]> --------- Signed-off-by: Miłosz Linkiewicz <[email protected]> Signed-off-by: Paweł Staszczuk <[email protected]> Co-authored-by: Pawel Staszczuk <[email protected]>
1 parent 496e976 commit c61e9c9

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

docs/SetupGuide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
* **Option A** – Use environment preparation scripts. The scripts were tested under environments with `Ubuntu 20.04`, `Ubuntu 22.04`, `Ubuntu 24.04`, `CentOS Stream8`, and `CentOS Stream9`, installed alongside the Linux kernel 5.15.
2626

27-
Run the following commands, execute `setup_ice_irdma.sh` to setup and install patched drivers for NIC cards, and exec second one `setup_build_env.sh` to prepared whole build stack that is mandatory for bare metal version build of MCM:
27+
Run the following commands, execute `setup_build_env.sh` to prepare the whole build stack and build dependencies that are mandatory for bare metal version of MCM and exec second one `setup_ice_irdma.sh all` to download, patch, setup and install ICE as well as iRDMA drivers for CLV NIC (E810) cards:
2828

2929
```bash
3030
sudo ./scripts/setup_build_env.sh
@@ -51,10 +51,10 @@
5151
sudo yum install -y libbsd-devel cmake make rdma-core libibverbs-devel librdmacm-devel dracut
5252
```
5353

54-
* Install the `irdma` driver and `libfabric`:
54+
* Install the `irdma` driver and `libfabric` using script:
5555

5656
```bash
57-
./scripts/setup_rdma_env.sh install
57+
./scripts/setup_ice_irdma.sh get-irdma
5858
```
5959
For more information, see [Building and installing libfabric from source](https://github.com/ofiwg/libfabric?tab=readme-ov-file#building-and-installing-libfabric-from-source).
6060

@@ -65,7 +65,7 @@
6565
Run the build script
6666

6767
```bash
68-
./build.sh
68+
sudo ./build.sh
6969
```
7070

7171
This script builds and installs the following software components

scripts/common.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ export BUILD_DIR="${BUILD_DIR:-${REPO_DIR}/_build}"
99
export DRIVERS_DIR="${DRIVERS_DIR:-/opt/intel/drivers}"
1010
export PREFIX_DIR="${PREFIX_DIR:-${REPO_DIR}/_install}"
1111

12-
VERSIONS_FILE_PATH="$(readlink -f "${VERSIONS_FILE:-${REPO_DIR}/versions.env}")"
13-
export VERSIONS_FILE_PATH
12+
MCM_VERSIONS_FILE_PATH="$(readlink -f "${MCM_VERSIONS_FILE:-${REPO_DIR}/versions.env}")"
13+
export MCM_VERSIONS_FILE_PATH
1414

1515
# shellcheck source="versions.env"
16-
. "${VERSIONS_FILE_PATH}"
16+
. "${MCM_VERSIONS_FILE_PATH}"
1717

1818
export MTL_DIR="${BUILD_DIR}/mtl"
19+
MTL_VERSIONS_FILE_PATH="${MTL_VERSIONS_FILE:-${MTL_DIR}/versions.env}"
20+
21+
if [[ -f "${MTL_VERSIONS_FILE_PATH}" ]]; then
22+
MTL_VERSIONS_FILE_PATH="$(readlink -f "${MTL_VERSIONS_FILE_PATH}")"
23+
export MTL_VERSIONS_FILE_PATH
24+
. "${MTL_VERSIONS_FILE_PATH}"
25+
fi
26+
1927
export DPDK_DIR="${BUILD_DIR}/dpdk"
2028
export XDP_DIR="${BUILD_DIR}/xdp"
2129
export BPF_DIR="${XDP_DIR}/lib/libbpf"

scripts/setup_ice_irdma.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SCRIPT_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")")"
44
export WORKING_DIR="${BUILD_DIR:-${REPO_DIR}/build/rdma}"
55
export PERF_DIR="${DRIVERS_DIR}/perftest"
66

7-
. "${SCRIPT_DIR}/common.sh"
7+
. "${SCRIPT_DIR}/setup_build_env.sh"
88

99
function print_usage()
1010
{
@@ -61,7 +61,6 @@ function install_os_dependencies()
6161
python3-pyverbs \
6262
libelf-dev \
6363
infiniband-diags \
64-
rdma-core \
6564
ibverbs-utils \
6665
perftest \
6766
ethtool
@@ -94,6 +93,10 @@ function get_and_patch_intel_drivers()
9493
log_error "MTL patch for ICE=v${ICE_VER} could not be found: ${MTL_DIR}/patches/ice_drv/${ICE_VER}"
9594
return 1
9695
fi
96+
if [[ -d "${ICE_DIR}" ]]; then
97+
rm -rf "${ICE_DIR}"
98+
fi
99+
git_download_strip_unpack "intel/ethernet-linux-ice" "refs/tags/v${ICE_VER}" "${ICE_DIR}"
97100

98101
pushd "${ICE_DIR}" && \
99102
patch -p1 -i <(cat "${MTL_DIR}/patches/ice_drv/${ICE_VER}/"*.patch) && \
@@ -121,7 +124,6 @@ function build_install_and_config_irdma_drivers()
121124
{
122125
IRDMA_REPO="$(get_irdma_driver_tgz)"
123126
wget_download_strip_unpack "${IRDMA_REPO}" "${IRDMA_DIR}"
124-
git_download_strip_unpack "intel/ethernet-linux-ice" "refs/tags/v${ICE_VER}" "${ICE_DIR}"
125127

126128
if pushd "${IRDMA_DIR}"; then
127129
"${IRDMA_DIR}/build_core.sh" -y || exit 2
@@ -193,9 +195,9 @@ function install_perftest()
193195
exit 1
194196
fi
195197
make -j "${NPROC}" && \
196-
as_root make install
198+
as_root make install || \
199+
{ log_error log_error "Intel irdma: Could not make and/or install the perftest."; return 1; }
197200

198-
log_error "Intel irdma: Could not make and/or install the perftest."
199201
popd || log_warning "Intel irdma: Could not popd (directory). Ignoring."
200202
log_info "End of install_perftest method. Finished installing perftest-24.07.0."
201203
}
@@ -293,11 +295,11 @@ then
293295
fi
294296
if [[ "${1}" == "get-irdma" || "${1}" == "all" ]]; then
295297
if [[ "${1}" == "get-irdma" ]]; then
296-
install_os_dependencies
298+
install_os_dependencies && \
299+
lib_install_fabrics
297300
fi
298301
build_install_and_config_irdma_drivers && \
299-
config_intel_rdma_driver && \
300-
lib_install_fabrics
302+
config_intel_rdma_driver
301303
return_code="$?"
302304
if [[ "${return_code}" == "0" ]]; then
303305
log_success "Finished: irdma driver configuration for Intel hardware backend."

0 commit comments

Comments
 (0)