소스 코드로 드라이버 컴파일 및 설치
摘要: Linux 드라이버는 커널에 연결되어 있습니다. 다운로드할 Linux RPM 드라이버의 대부분은 각 릴리스의 원래 커널 버전용입니다. 커널이 특정 버전으로 업데이트된 경우 RPM 드라이버가 업데이트된 커널에 더 이상 적합하지 않습니다. 이 KB는 소스 코드에서 업데이트된 커널에 대한 드라이버를 업데이트하는 방법입니다.
本文适用于
本文不适用于
本文并非针对某种特定的产品。
本文并非包含所有产品版本。
说明
이 KB에서는 X710 NIC를 예로 들어 보겠습니다. 다른 모든 Linux 소스 코드는 비슷합니다.
컴파일에 필요한 패키지를 설치합니다.
1. Dell 지원 포털에서 드라이버를 다운로드합니다.
2. 소스 코드를 추출하고 다운로드합니다.
3a. 문제: "make" 명령을 실행할 때 다음과 같은 오류가 발생하는 경우
3b. 문제: 설치하기 전에 드라이버를 테스트합니다. "Required key not available"이라는 오류가 표시되면 서버에 자체 컴파일된 드라이버를 로드할 수 없는 "보안 부팅"이 활성화되어 있다는 것을 의미합니다. BIOS로 부팅하여 "보안 부팅"을 비활성화할 수 있습니다.
4. 이 서버에 드라이버를 설치합니다.
추가:
이 드라이버를 기반으로 RPM을 생성하여 다른 서버에 설치하려는 경우(타겟 서버에서 동일한 커널 버전이어야 합니다) 다음 명령을 실행하여 rpm을 생성합니다.
컴파일에 필요한 패키지를 설치합니다.
[root@rhel87 ~]# yum groupinstall "Development Tools" [root@rhel87 ~]# yum install kernel-devel-$(uname -r)
1. Dell 지원 포털에서 드라이버를 다운로드합니다.
2. 소스 코드를 추출하고 다운로드합니다.
[root@rhel87 i40e]# tar xf Intel_LAN_21.5.0_Linux_Source_A02.tar.gz [root@rhel87 i40e]# cd Source/base_driver/ [root@rhel87 base_driver]# tar xf i40e-2.20.12.tar.gz [root@rhel87 base_driver]# cd i40e-2.20.12/ [root@rhel87 i40e-2.20.12]# ls COPYING i40e.7 i40e.spec pci.updates README scripts src SUMS root@rhel87 i40e-2.20.12]# cd src/ [root@rhel87 src]# ls auxiliary.c i40e_client.h i40e_diag.c i40e_hmc.c i40e_ptp.c i40e_virtchnl_pf.c kcompat_impl.h linux auxiliary_compat.h i40e_common.c i40e_diag.h i40e_hmc.h i40e_register.h i40e_virtchnl_pf.h kcompat_overflow.h Makefile common.mk i40e_dcb.c i40e_ethtool.c i40e_lan_hmc.c i40e_status.h i40e_xsk.c kcompat_rhel_defs.h Module.supported i40e_adminq.c i40e_dcb.h i40e_ethtool_stats.h i40e_lan_hmc.h i40e_trace.h i40e_xsk.h kcompat_sles_defs.h virtchnl.h i40e_adminq_cmd.h i40e_dcb_nl.c i40e_filters.c i40e_main.c i40e_txrx.c kcompat.c kcompat_std_defs.h i40e_adminq.h i40e_ddp.c i40e_filters.h i40e_nvm.c i40e_txrx_common.h kcompat_defs.h kcompat_ubuntu_defs.h i40e_alloc.h i40e_debugfs.c i40e.h i40e_osdep.h i40e_txrx.h kcompat_gcc.h kcompat_vfd.c i40e_client.c i40e_devids.h i40e_helper.h i40e_prototype.h i40e_type.h kcompat.h kcompat_vfd.h3. 드라이버를 컴파일합니다.
[root@rhel87 src]# make *** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but *** the signing key cannot be found. Module signing has been *** disabled for this build. make[1]: Entering directory '/usr/src/kernels/4.18.0-80.el8.x86_64' /root/i40e/Source/base_driver/i40e-2.20.12/src/Makefile:38: 2 CC [M] /root/i40e/Source/base_driver/i40e-2.20.12/src/i40e_main.o ...skipped... LD [M] /root/i40e/Source/base_driver/i40e-2.20.12/src/i40e.o CC [M] /root/i40e/Source/base_driver/i40e-2.20.12/src/auxiliary.o Building modules, stage 2. /root/i40e/Source/base_driver/i40e-2.20.12/src/Makefile:38: 2 MODPOST 2 modules CC /root/i40e/Source/base_driver/i40e-2.20.12/src/auxiliary.mod.o LD [M] /root/i40e/Source/base_driver/i40e-2.20.12/src/auxiliary.ko CC /root/i40e/Source/base_driver/i40e-2.20.12/src/i40e.mod.o LD [M] /root/i40e/Source/base_driver/i40e-2.20.12/src/i40e.ko make[1]: Leaving directory '/usr/src/kernels/4.18.0-80.el8.x86_64' [root@rhel87 src]# echo $? 0 [root@rhel87 src]# modinfo ./i40e.ko filename: /root/i40e/Source/base_driver/i40e-2.20.12/src/./i40e.ko version: 2.20.12 license: GPL description: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver author: Intel Corporation, <e1000-devel@lists.sourceforge.net> rhelversion: 8.0 srcversion: A92CB6A1AD515E14A84C283 alias: pci:v00008086d0000158Bsv*sd*bc*sc*i* ...skipped... alias: pci:v00008086d00001572sv*sd*bc*sc*i* depends: auxiliary name: i40e vermagic: 4.18.0-80.el8.x86_64 SMP mod_unload modversions parm: debug:Debug level (0=none,...,16=all) (int) parm: l4mode:L4 cloud filter mode: 0=UDP,1=TCP,2=Both,-1=Disabled(default) (int) [root@rhel87 src]#
3a. 문제: "make" 명령을 실행할 때 다음과 같은 오류가 발생하는 경우
common.mk:82: *** Kernel header files not in any of the expected locations. common.mk:83: *** Install the appropriate kernel development package, e.g. common.mk:84: *** kernel-devel, for building kernel modules and try again. Stop.동일한 커널 버전이 설치된 패키지 "kernel-devel"을 확인합니다. (첫 번째 단계)
[root@rhel87 ~]# yum install kernel-devel-$(uname -r)
3b. 문제: 설치하기 전에 드라이버를 테스트합니다. "Required key not available"이라는 오류가 표시되면 서버에 자체 컴파일된 드라이버를 로드할 수 없는 "보안 부팅"이 활성화되어 있다는 것을 의미합니다. BIOS로 부팅하여 "보안 부팅"을 비활성화할 수 있습니다.
[root@rhel87 src]# modprobe -r i40e [root@rhel87 src]# insmod ./i40e.ko insmod: ERROR: could not insert module ./i40e.ko: Required key not available
4. 이 서버에 드라이버를 설치합니다.
[root@rhel87 src]# make install5. 서버를 재부팅하면 부팅 후 새 드라이버가 자동으로 로드됩니다.
추가:
이 드라이버를 기반으로 RPM을 생성하여 다른 서버에 설치하려는 경우(타겟 서버에서 동일한 커널 버전이어야 합니다) 다음 명령을 실행하여 rpm을 생성합니다.
[root@rhel87 src]# cd ../.. [root@rhel87 base_driver]# ls -lh i40e-2.20.12.tar.gz -rw-r--r-- 1 5714316 1049089 673K Jul 11 2022 i40e-2.20.12.tar.gz [root@rhel87 base_driver]# rpmbuild -tb i40e-2.20.12.tar.gz ...skipped... [root@rhel87 base_driver]# ls /root/rpmbuild/RPMS/x86_64/설치할 타겟 서버에 rpm을 복사합니다.
受影响的产品
Red Hat Enterprise Linux Version 6, Red Hat Enterprise Linux Version 7, Red Hat Enterprise Linux Version 9, Red Hat Enterprise Linux Version 8文章属性
文章编号: 000211258
文章类型: How To
上次修改时间: 19 12月 2024
版本: 3
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。