一、下载网讯网卡驱动
千兆网卡驱动下载地址:
https://www.net-swift.com/uploads/20230712/网迅千兆网卡Linux PF驱动源码.zip
万兆网卡驱动下载地址:
https://www.net-swift.com/uploads/20230421/网迅万兆网卡Linux PF驱动源码.zip
二、安装CentOS 8.5
采用U盘、安装虚拟机也可以,安装系统,选择Minimal Install,安装过程略。
三、配置CentOS 8.5本地yum源
3.1、创建本地系统文件目录
# mkdir /media/CentOS
2.2、将系统安装文件全部复制到“/media/CentOS”目录
注意:不是复制系统的ISO镜像文件,可以将安装系统U盘中的全部文件复制到“/media/CentOS”目录。
2.3、安装tar工具
# cd /media/CentOS/BaseOS/Packages
# rpm -ivh tar-1.30-5.el8.x86_64.rpm
[root@localhost Packages]# rpm -ivh tar-1.30-5.el8.x86_64.rpm warning: tar-1.30-5.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:tar-2:1.30-5.el8 ################################# [100%] |
3.4、备份、移除其他repo
# cd /etc/yum.repos.d/
# tar -zcvf repo-bak.tgz CentOS-*
# rm -f CentOS-Linux-AppStream.repo CentOS-Linux-BaseOS.repo CentOS-Linux-ContinuousRelease.repo CentOS-Linux-Debuginfo.repo CentOS-Linux-Devel.repo CentOS-Linux-Extras.repo CentOS-Linux-FastTrack.repo CentOS-Linux-HighAvailability.repo CentOS-Linux-Plus.repo CentOS-Linux-PowerTools.repo CentOS-Linux-Sources.repo
3.5、配置本地yum源
# vi CentOS-Linux-local.repo 新建本地安装源repo配置文件
修改后的repo文件内容如下
将以上的内容修改如下并保存。
# vi CentOS-Linux-local.repo # # You can use this repo to install items directly off the installation media. # Verify your mount point matches one of the below file:// paths. [media-baseos] name=CentOS Linux $releasever - Media - BaseOS baseurl=file:///media/CentOS/BaseOS gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial [media-appstream] name=CentOS Linux $releasever - Media - AppStream baseurl=file:///media/CentOS/AppStream gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial |
3.6、制作cache
# yum clean all
# yum makecache
四、制作驱动RPM安装包
4.1、安装依赖包
# cd /media/CentOS/BaseOS/Packages
# yum -y install perl
# yum -y install kernel-devel-*
# yum -y install kernel-headers-*
# yum -y install glibc-headers-*
# yum -y install glibc-devel-*
# yum -y install gcc-*
# yum -y install net-tools-*
# yum -y install pciutils-*
# yum -y install rpm-build
4.2、制作千兆网卡RPM驱动包
# unzip ngbe-1.2.5.zip
# tar -zcvf ngbe-1.2.5.tar.gz ngbe-1.2.5
# cp ngbe-1.2.5.tar.gz /root/rpmbuild/SOURCES/
# cp ngbe-1.2.5/ngbe.spec /root/rpmbuild/SPECS/
# cd /root/rpmbuild/SPECS/
# rpmbuild -ba ngbe.spec
rpmbuild结果如下:
[root@localhost SPECS]# rpmbuild -ba ngbe.spec warning: Macro expanded in comment on line 15: %define debug_package %{nil} Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.42Y6h5 + umask 022 + cd /root/rpmbuild/BUILD + cd /root/rpmbuild/BUILD + rm -rf ngbe-1.2.5 + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/ngbe-1.2.5.tar.gz + /usr/bin/tar -xvvof - drwxr-xr-x root/root 0 2023-03-01 16:24 ngbe-1.2.5/ -rw-r--r-- root/root 29212 2023-03-01 16:24 ngbe-1.2.5/README drwxr-xr-x root/root 0 2023-03-01 16:24 ngbe-1.2.5/src/ -rw-r--r-- root/root 10959 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_hw.h -rw-r--r-- root/root 28329 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_ptp.c -rw-r--r-- root/root 28331 2023-03-01 16:24 ngbe-1.2.5/src/kcompat_ethtool.c -rw-r--r-- root/root 7867 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_pcierr.c -rw-r--r-- root/root 263387 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_main.c -rw-r--r-- root/root 35564 2023-03-01 16:24 ngbe-1.2.5/src/ngbe.h -rw-r--r-- root/root 23912 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_param.c -rw-r--r-- root/root 2802 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_sriov.h -rw-r--r-- root/root 44367 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_phy.c -rw-r--r-- root/root 20223 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_debugfs.c -rw-r--r-- root/root 17 2023-03-01 16:24 ngbe-1.2.5/src/Module.supported -rw-r--r-- root/root 25875 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_procfs.c -rw-r--r-- root/root 1995 2023-03-01 16:24 ngbe-1.2.5/src/configure -rw-r--r-- root/root 40853 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_sriov.c -rw-r--r-- root/root 117587 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_type.h -rw-r--r-- root/root 14554 2023-03-01 16:24 ngbe-1.2.5/src/common.mk -rw-r--r-- root/root 480 2023-03-01 16:24 ngbe-1.2.5/src/kcompat_gcc.h -rw-r--r-- root/root 106 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_pcierr.h -rw-r--r-- root/root 7607 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_phy.h -rw-r--r-- root/root 8326 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_osdep.h -rw-r--r-- root/root 75562 2023-03-01 16:24 ngbe-1.2.5/src/kcompat.c -rw-r--r-- root/root 1622 2023-03-01 16:24 ngbe-1.2.5/src/kcompat_chn_os.h -rw-r--r-- root/root 239466 2023-03-01 16:24 ngbe-1.2.5/src/kcompat.h -rw-r--r-- root/root 111403 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_ethtool.c -rw-r--r-- root/root 5789 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_sysfs.c -rw-r--r-- root/root 20696 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_lib.c -rw-r--r-- root/root 16622 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_mbx.c -rw-r--r-- root/root 5940 2023-03-01 16:24 ngbe-1.2.5/src/kcompat_sles_defs.h -rw-r--r-- root/root 138897 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_hw.c -rw-r--r-- root/root 7275 2023-03-01 16:24 ngbe-1.2.5/src/ngbe_mbx.h -rw-r--r-- root/root 7917 2023-03-01 16:24 ngbe-1.2.5/src/Makefile -rw-r--r-- root/root 3111 2023-03-01 16:24 ngbe-1.2.5/kmod-ngbe.spec -rw-r--r-- root/root 8032 2023-03-01 16:24 ngbe-1.2.5/ngbe.7 -rw-r--r-- root/root 18092 2023-03-01 16:24 ngbe-1.2.5/COPYING -rw-r--r-- root/root 2972 2023-03-01 16:24 ngbe-1.2.5/ngbe_kmp.spec drwxr-xr-x root/root 0 2023-03-01 16:24 ngbe-1.2.5/scripts/ -rw-r--r-- root/root 6099 2023-03-01 16:24 ngbe-1.2.5/scripts/set_irq_affinity -rw-r--r-- root/root 2098 2023-03-01 16:24 ngbe-1.2.5/pci.updates -rw-r--r-- root/root 8185 2023-03-01 16:24 ngbe-1.2.5/ngbe release notes -rw-r--r-- root/root 1218 2023-03-01 16:24 ngbe-1.2.5/Makefile -rw-r--r-- root/root 9660 2023-03-01 16:24 ngbe-1.2.5/ngbe.spec + STATUS=0 + '[' 0 -ne 0 ']' + cd ngbe-1.2.5 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.gRlVP3 + umask 022 + cd /root/rpmbuild/BUILD + cd ngbe-1.2.5 + make -C src clean make: Entering directory '/root/rpmbuild/BUILD/ngbe-1.2.5/src' *** 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-348.el8.x86_64' make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' make: Leaving directory '/root/rpmbuild/BUILD/ngbe-1.2.5/src' + make -C src make: Entering directory '/root/rpmbuild/BUILD/ngbe-1.2.5/src' *** 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-348.el8.x86_64' CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_main.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_ethtool.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_lib.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_mbx.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_sriov.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_param.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_phy.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_procfs.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_hw.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_pcierr.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_debugfs.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_ptp.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe_sysfs.o CC [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/kcompat.o LD [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe.o Building modules, stage 2. MODPOST 1 modules CC /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe.mod.o LD [M] /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe.ko make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' make: Leaving directory '/root/rpmbuild/BUILD/ngbe-1.2.5/src' + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.7Sy164 + umask 022 + cd /root/rpmbuild/BUILD + '[' /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 '!=' / ']' + rm -rf /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 ++ dirname /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 + mkdir -p /root/rpmbuild/BUILDROOT + mkdir /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 + cd ngbe-1.2.5 + make -C src INSTALL_MOD_PATH=/root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 MANDIR=/usr/share/man install make: Entering directory '/root/rpmbuild/BUILD/ngbe-1.2.5/src' *** 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-348.el8.x86_64' Building modules, stage 2. MODPOST 1 modules make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' Installing modules... *** 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-348.el8.x86_64' INSTALL /root/rpmbuild/BUILD/ngbe-1.2.5/src/ngbe.ko DEPMOD 4.18.0-348.el8.x86_64 depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.builtin: No such file or directory make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' Running depmod manually... /sbin/depmod -e -F /lib/modules/4.18.0-348.el8.x86_64/source/System.map -b /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 -a 4.18.0-348.el8.x86_64 depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.builtin: No such file or directory Copying manpages... Updating initramfs... make: Leaving directory '/root/rpmbuild/BUILD/ngbe-1.2.5/src' + find /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/lib/modules/4.18.0-348.el8.x86_64 -name 'modules.*' -exec rm -f '{}' ';' + cd /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 + find lib -name 'ngbe.*o' -exec mv '{}' '{}.new' ';' -fprintf /root/rpmbuild/BUILD/ngbe-1.2.5/file.list '/%p.new\n' + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig /sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile '' 1 + /usr/lib/rpm/brp-python-hardlink + PYTHON3=/usr/libexec/platform-python + /usr/lib/rpm/redhat/brp-mangle-shebangs Processing files: ngbe-1.2.5-1.x86_64 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.DipHs5 + umask 022 + cd /root/rpmbuild/BUILD + cd ngbe-1.2.5 + DOCDIR=/root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/usr/share/doc/ngbe + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/usr/share/doc/ngbe + cp -pr COPYING /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/usr/share/doc/ngbe + cp -pr README /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/usr/share/doc/ngbe + cp -pr file.list /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/usr/share/doc/ngbe + cp -pr pci.updates /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64/usr/share/doc/ngbe + exit 0 warning: Ignoring invalid regex ^%{_scl_prefix}/.*|%{_root_sysconfdir}/rpm/macros.gcc-toolset-9-config$ warning: Ignoring invalid regex ^%{_root_sysconfdir}/rpm/macros.gcc-toolset-9-config$ Provides: ngbe ngbe = 1.2.4-1 ngbe(x86-64) = 1.2.4-1 Requires(interp): /bin/sh /bin/sh /bin/sh Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /bin/sh Requires(preun): /bin/sh Requires(postun): /bin/sh Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 Wrote: /root/rpmbuild/SRPMS/ngbe-1.2.5-1.src.rpm Wrote: /root/rpmbuild/RPMS/x86_64/ngbe-1.2.5-1.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.vwW9U5 + umask 022 + cd /root/rpmbuild/BUILD + cd ngbe-1.2.5 + rm -rf /root/rpmbuild/BUILDROOT/ngbe-1.2.5-1.x86_64 + exit 0 |
进入RPM包目录,查看生成的RPM包。
# cd /root/rpmbuild/RPMS/x86_64
# ll
[root@localhost x86_64]# ll total 132 -rw-r--r--. 1 root root 132832 Aug 7 23:36 ngbe-1.2.5-1.x86_64.rpm |
4.3、制作万兆网卡RPM驱动包
# unzip txgbe-1.3.4.zip
# tar -zcvf txgbe-1.3.4.tar.gz txgbe-1.3.4
# cp txgbe-1.3.4.tar.gz /root/rpmbuild/SOURCES/
# cp txgbe-1.3.4/txgbe.spec /root/rpmbuild/SPECS/
# cd /root/rpmbuild/SPECS/
# rpmbuild -ba txgbe.spec
[root@localhost SPECS]# rpmbuild -ba txgbe.spec warning: Macro expanded in comment on line 16: %define debug_package %{nil} Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.1k2IlG + umask 022 + cd /root/rpmbuild/BUILD + cd /root/rpmbuild/BUILD + rm -rf txgbe-1.3.4 + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/txgbe-1.3.4.tar.gz + /usr/bin/tar -xvvof - drwxr-xr-x root/root 0 2023-04-19 11:15 txgbe-1.3.4/ -rw-r--r-- root/root 8436 2023-04-19 11:15 txgbe-1.3.4/release note.txt -rw-r--r-- root/root 34543 2023-04-19 11:15 txgbe-1.3.4/README -rw-r--r-- root/root 8039 2023-04-19 11:15 txgbe-1.3.4/txgbe.7 drwxr-xr-x root/root 0 2023-04-19 11:15 txgbe-1.3.4/src/ -rw-r--r-- root/root 327472 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_main.c -rw-r--r-- root/root 28611 2023-04-19 11:15 txgbe-1.3.4/src/kcompat_ethtool.c -rw-r--r-- root/root 7279 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_dcb.h -rw-r--r-- root/root 32979 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_phy.c -rw-r--r-- root/root 23149 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_dcb_nl.c -rw-r--r-- root/root 809 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_bp.h -rw-r--r-- root/root 3053 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_sriov.h -rw-r--r-- root/root 29164 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_ptp.c -rw-r--r-- root/root 26430 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_procfs.c -rw-r--r-- root/root 6147 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_sysfs.c -rw-r--r-- root/root 18 2023-04-19 11:15 txgbe-1.3.4/src/Module.supported -rw-r--r-- root/root 7739 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_mbx.h -rw-r--r-- root/root 48496 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_sriov.c -rw-r--r-- root/root 55546 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_mtd.h -rw-r--r-- root/root 18453 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_dcb.c -rw-r--r-- root/root 4108 2023-04-19 11:15 txgbe-1.3.4/src/configure -rw-r--r-- root/root 14549 2023-04-19 11:15 txgbe-1.3.4/src/common.mk -rw-r--r-- root/root 115 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_pcierr.h -rw-r--r-- root/root 23962 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_bp.c -rw-r--r-- root/root 34857 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_lib.c -rw-r--r-- root/root 41053 2023-04-19 11:15 txgbe-1.3.4/src/txgbe.h -rw-r--r-- root/root 8680 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_osdep.h -rw-r--r-- root/root 8138 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_pcierr.c -rw-r--r-- root/root 480 2023-04-19 11:15 txgbe-1.3.4/src/kcompat_gcc.h -rw-r--r-- root/root 144756 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_ethtool.c -rw-r--r-- root/root 41621 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_mtd.c -rw-r--r-- root/root 26682 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_fcoe.c -rw-r--r-- root/root 39923 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_param.c -rw-r--r-- root/root 8415 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_phy.h -rw-r--r-- root/root 75838 2023-04-19 11:15 txgbe-1.3.4/src/kcompat.c -rw-r--r-- root/root 136100 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_type.h -rw-r--r-- root/root 1657 2023-04-19 11:15 txgbe-1.3.4/src/kcompat_chn_os.h -rw-r--r-- root/root 12467 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_hw.h -rw-r--r-- root/root 240833 2023-04-19 11:15 txgbe-1.3.4/src/kcompat.h -rw-r--r-- root/root 2646 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_fcoe.h -rw-r--r-- root/root 21027 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_debugfs.c -rw-r--r-- root/root 6209 2023-04-19 11:15 txgbe-1.3.4/src/kcompat_sles_defs.h -rw-r--r-- root/root 17691 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_mbx.c -rw-r--r-- root/root 219916 2023-04-19 11:15 txgbe-1.3.4/src/txgbe_hw.c -rw-r--r-- root/root 8048 2023-04-19 11:15 txgbe-1.3.4/src/Makefile -rw-r--r-- root/root 3112 2023-04-19 11:15 txgbe-1.3.4/kmod-txgbe.spec -rw-r--r-- root/root 2991 2023-04-19 11:15 txgbe-1.3.4/txgbe_kmp.spec -rw-r--r-- root/root 18092 2023-04-19 11:15 txgbe-1.3.4/COPYING drwxr-xr-x root/root 0 2023-04-19 11:15 txgbe-1.3.4/scripts/ -rw-r--r-- root/root 6099 2023-04-19 11:15 txgbe-1.3.4/scripts/set_irq_affinity -rw-r--r-- root/root 1446 2023-04-19 11:15 txgbe-1.3.4/pci.updates -rw-r--r-- root/root 9692 2023-04-19 11:15 txgbe-1.3.4/txgbe.spec + STATUS=0 + '[' 0 -ne 0 ']' + cd txgbe-1.3.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.zhmOtH + umask 022 + cd /root/rpmbuild/BUILD + cd txgbe-1.3.4 + make -C src clean make: Entering directory '/root/rpmbuild/BUILD/txgbe-1.3.4/src' *** 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-348.el8.x86_64' make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' make: Leaving directory '/root/rpmbuild/BUILD/txgbe-1.3.4/src' + make -C src make: Entering directory '/root/rpmbuild/BUILD/txgbe-1.3.4/src' *** 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-348.el8.x86_64' CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_main.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_dcb.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_ethtool.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_lib.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_mbx.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_sriov.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_param.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_phy.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_procfs.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_hw.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_mtd.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_pcierr.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_bp.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_dcb_nl.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_debugfs.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_ptp.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe_sysfs.o CC [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/kcompat.o LD [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe.o Building modules, stage 2. MODPOST 1 modules CC /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe.mod.o LD [M] /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe.ko make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' make: Leaving directory '/root/rpmbuild/BUILD/txgbe-1.3.4/src' + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.phf8iI + umask 022 + cd /root/rpmbuild/BUILD + '[' /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 '!=' / ']' + rm -rf /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 ++ dirname /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 + mkdir -p /root/rpmbuild/BUILDROOT + mkdir /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 + cd txgbe-1.3.4 + make -C src INSTALL_MOD_PATH=/root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 MANDIR=/usr/share/man install make: Entering directory '/root/rpmbuild/BUILD/txgbe-1.3.4/src' *** 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-348.el8.x86_64' Building modules, stage 2. MODPOST 1 modules make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' Installing modules... *** 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-348.el8.x86_64' INSTALL /root/rpmbuild/BUILD/txgbe-1.3.4/src/txgbe.ko DEPMOD 4.18.0-348.el8.x86_64 depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.builtin: No such file or directory make[1]: Leaving directory '/usr/src/kernels/4.18.0-348.el8.x86_64' Running depmod manually... /sbin/depmod -e -F /lib/modules/4.18.0-348.el8.x86_64/source/System.map -b /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 -a 4.18.0-348.el8.x86_64 depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/lib/modules/4.18.0-348.el8.x86_64/modules.builtin: No such file or directory Copying manpages... Updating initramfs... make: Leaving directory '/root/rpmbuild/BUILD/txgbe-1.3.4/src' + find /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/lib/modules/4.18.0-348.el8.x86_64 -name 'modules.*' -exec rm -f '{}' ';' + cd /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 + find lib -name 'txgbe.*o' -exec mv '{}' '{}.new' ';' -fprintf /root/rpmbuild/BUILD/txgbe-1.3.4/file.list '/%p.new\n' + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig /sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile '' 1 + /usr/lib/rpm/brp-python-hardlink + PYTHON3=/usr/libexec/platform-python + /usr/lib/rpm/redhat/brp-mangle-shebangs Processing files: txgbe-1.3.4-1.x86_64 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.BzKpUH + umask 022 + cd /root/rpmbuild/BUILD + cd txgbe-1.3.4 + DOCDIR=/root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/usr/share/doc/txgbe + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/usr/share/doc/txgbe + cp -pr COPYING /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/usr/share/doc/txgbe + cp -pr README /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/usr/share/doc/txgbe + cp -pr file.list /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/usr/share/doc/txgbe + cp -pr pci.updates /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64/usr/share/doc/txgbe + exit 0 warning: Ignoring invalid regex ^%{_scl_prefix}/.*|%{_root_sysconfdir}/rpm/macros.gcc-toolset-9-config$ warning: Ignoring invalid regex ^%{_root_sysconfdir}/rpm/macros.gcc-toolset-9-config$ Provides: txgbe txgbe = 1.3.4-1 txgbe(x86-64) = 1.3.4-1 Requires(interp): /bin/sh /bin/sh /bin/sh Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /bin/sh Requires(preun): /bin/sh Requires(postun): /bin/sh Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 Wrote: /root/rpmbuild/SRPMS/txgbe-1.3.4-1.src.rpm Wrote: /root/rpmbuild/RPMS/x86_64/txgbe-1.3.4-1.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.QJlv9J + umask 022 + cd /root/rpmbuild/BUILD + cd txgbe-1.3.4 + rm -rf /root/rpmbuild/BUILDROOT/txgbe-1.3.4-1.x86_64 + exit 0 |
进入RPM包目录,查看生成的RPM包。
# cd /root/rpmbuild/RPMS/x86_64
# ll
[root@localhost x86_64]# ll total 164 -rw-r--r--. 1 root root 164940 Aug 7 23:43 txgbe-1.3.4-1.x86_64.rpm |