Ubuntu 20.04.5安装Solarflare网卡Openonload驱动

2024年 1月 15日 135.1k 0

1.查看OS版本

root@tes-htzq-sz-t30:~#
cat /etc/lsb-release 

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=20.04

DISTRIB_CODENAME=focal

DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

root@tes-htzq-sz-t30:~# 

2.下载并上传并解压openonload

官方找到对应所需要版本的OpenOnload DEB Release Package并下载并上传/soft

cd /soft

unzip SF-122451-LS-7-OpenOnload-DEB-Release-Package.zip 

tar -xvzf onload_7.1.3.202-debiansource.tgz 

tar -xvzf  onload_7.1.3.202.orig.tar.gz

3.安装openonload

cd /soft/onload-7.1.3.202/scripts

./onload_install 

报错原因:
由于系统安装是未安装gcc、make软件,推荐安装:gcc、gdb、make、g++、及ntp、iftop、dos2unix、net-tools

onload_install: Building Onload.

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 152: gcc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 461: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 469: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 473: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 477: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 441: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 481: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 98: gcc: command not found

mmake: Cannot find a make command.  Please define MMAKE_MAKE.

mmakebuildtree: mmake buildtree MMAKEBUILDTREE=1 FAILED

onload_build: FAILED: mmakebuildtree --driver -d x86_64_linux-5.4.0-135-generic

onload_install: ERROR: Build failed.  Not installing.

root@bigdata# 

4.离线安装gcc、g++、make

若具备互联网权限访问则直接使用
sudo apt-get update 后sudo apt-get install <Package_name>
安装gcc、gdb、make等;

若不具备互联网权限则需要通过知笔记本虚拟机上安装对应系统,通过在线的方式下载对应对应的包后

拷贝上传到系统中进行离线安装即可

在线下载的安装包则默认保存路径:
/var/cache/apt/archives/  

cd gcc+gdb+ntp++iftop+dos2unix+net-tools+g++/

ls

g++.tar.gz

gcc.tar.gz

gdb.tar.gz

make_4.2.1-1.2_amd64

tar -xvzf gcc.tar.gz 

dpkg -i *.deb

tar -xvzf gdb.tar.gz 

dpkg -i *.deb

dpkg -i make_4.2.1-1.2_amd64

5.安装Openonload驱动

cd /soft/onload-7.1.3.202/scripts

./onload_install 

onload_install: Building Onload.

mmake: Cannot find a make command.  Please define MMAKE_MAKE.

mmakebuildtree: mmake buildtree MMAKEBUILDTREE=1 FAILED

onload_build: FAILED: mmakebuildtree --driver -d x86_64_linux-5.4.0-135-generic

onload_install: ERROR: Build failed.  Not installing.

root@tes-htzq-sz-t30:/home/bigdata/onload-7.1.3.202/scripts# 

root@tes-htzq-sz-t30:/home/bigdata# dpkg -i make_4.2.1-1.2_amd64.deb 

……………………………………省略………………………………………………………………………………

root@tes-htzq-sz-t30:/home/bigdata# cd onload-7.1.3.202/

root@tes-htzq-sz-t30:/home/bigdata/onload-7.1.3.202/scripts# ./onload_install 

onload_install: Building Onload.

Build tree made for linux as x86_64_linux-5.4.0-135-generic

make: Entering directory '/home/bigdata/onload-7.1.3.202/build/x86_64_linux-5.4.0-135-generic'

# Build both autocompat.h files: linux_net and linux_affinity.

make -C driver/linux_net

make[1]: Entering directory '/home/bigdata/onload-7.1.3.202/build/x86_64_linux-5.4.0-135-generic/driver/linux_net'

make -C /usr/src/linux-headers-5.4.0-135-generic CC="cc" M=$(pwd)

make[2]: Entering directory '/usr/src/linux-headers-5.4.0-135-generic'

/home/bigdata/onload-7.1.3.202/src/driver/linux_net/Makefile:61: SFE4001/Falcon is no longer supported

  AR      /home/bigdata/onload-7.1.3.202/build/x86_64_linux-5.4.0-135-generic/driver/linux_net/built-in.a

…………………………………………………………………………省略……………………………………………………………………………………

onload_install: Install complete.

onload_install: WARNING: 32-bit libraries were not installed.  As a result it will not be possible to accelerate 32-bit applications with OpenOnload.  See build log for further details.

onload_install: WARNING: An 'sfc' driver is already loaded.  You should

onload_install: WARNING: unload and reload (or reboot) to ensure you are

onload_install: WARNING: using the version supplied with OpenOnload.

onload_install: WARNING: Try: 

 onload_tool reload

onload_install: WARNING: If this problem persists you may need to update

onload_install: WARNING: your initramfs to include the correct sfc module

 

6.加载onload_tool

onload_tool reload

onload_tool: /sbin/modprobe -r sfc

onload_tool: /sbin/modprobe onload

7.查看onload版本

onload --version

onload: WARNING: EF_TCP_SYNRECV_MAX=16384 and EF_MAX_ENDPOINTS=8192 are inconsistent.

onload: EF_TCP_SYNRECV_MAX is set to 16384 based on /proc/sys/net/ipv4/tcp_max_syn_backlog value and assuming up to 4 listening sockets in the Onload stack

onload: Too few endpoints requested: ~4 syn-receive states consume one endpoint. 

Onload 7.1.3.202

Copyright 2019-2022 Xilinx, 2006-2019 Solarflare Communications, 2002-2005 Level 5 Networks

Built: Jan 12 2024 17:30:59 (release)

Build profile header: <ci/internal/transport_config_opt_extra.h>

Kernel module: 7.1.3.202

8.重启OS

reboot

相关文章

服务器端口转发,带你了解服务器端口转发
服务器开放端口,服务器开放端口的步骤
产品推荐:7月受欢迎AI容器镜像来了,有Qwen系列大模型镜像
如何使用 WinGet 下载 Microsoft Store 应用
百度搜索:蓝易云 – 熟悉ubuntu apt-get命令详解
百度搜索:蓝易云 – 域名解析成功但ping不通解决方案

发布评论