linux平台:中标麒麟桌面操作系统

GCC:gcc (GCC) 4.9.3 20150626 (NeoKylin 4.9.3-3)

买回来一款Intel的网卡,型号I210

如果想要安装这个网卡的驱动,需要去找此网卡的驱动源码。

当然,Intel已经帮我们把驱动源码写好了,我们要做的

只需要交叉编译这个驱动源码。

进入Intel驱动官网

https://downloadcenter.intel.com/zh-cn/download/13663

igb-5.3.5.36

英特尔®适用于 82575/6、82580、I350 和 I210/211 基于 Linux 的千兆位网络连接的网络适配器驱动程序

解压之后,查看README文件

Building and Installation
-------------------------
To build a binary RPM* package of this driver, run 'rpmbuild -tb
igb-<x.x.x>.tar.gz', where <x.x.x> is the version number for the driver tar
file.Note: For the build to work properly, the currently running kernel MUST match
the version and configuration of the installed kernel sources. If you have just
recompiled the kernel reboot the system before building.- To compile the driver on some kernel/arch combinations, a package with the
development version of libelf (e.g. libelf-dev, libelf-devel,
elfutilsl-libelf-devel) may need to be installed.Note: RPM functionality has only been tested in Red Hat distributions.1. Move the base driver tar file to the directory of your choice. Forexample, use '/home/username/igb' or '/usr/local/src/igb'.2. Untar/unzip the archive, where <x.x.x> is the version number for thedriver tar file:tar zxf igb-<x.x.x>.tar.gz3. Change to the driver src directory, where <x.x.x> is the version numberfor the driver tar:cd igb-<x.x.x>/src/4. Compile the driver module:# make installThe binary will be installed as:/lib/modules/<KERNEL VERSION>/updates/drivers/net/ethernet/intel/igb/igb.koThe install location listed above is the default location. This may differfor various Linux distributions.5. Load the module using the modprobe command:modprobe <igb> [parameter=port1_value,port2_value]Make sure that any older igb drivers are removed from the kernel beforeloading the new module:rmmod igb; modprobe igb6. Assign an IP address to the interface by entering the following,where ethX is the interface name that was shown in dmesg after modprobe:ip address add <IP_address>/<netmask bits> dev ethX7. Verify that the interface works. Enter the following, where IP_addressis the IP address for another machine on the same subnet as the interfacethat is being tested:ping <IP_address>To build igb driver with DCA
----------------------------
If your kernel supports DCA, the driver will build by default with DCA enabled.Note: For certain distributions like (but not limited to) RedHat Enterprise
Linux 7 and Ubuntu, once the driver is installed the initrd/initramfs file may
need to be updated to prevent the OS loading old versions of the igb driver.
The dracut utility may be used on RedHat distributions:# dracut --forceFor Ubuntu:# update-initramfs -u

查看完building and Insallation之后

具体步骤

[root@localhost igb-5.3.5.36]# ls
COPYING  igb.7  igb.spec  pci.updates  README  scripts  src  SUMS
[root@localhost igb-5.3.5.36]# cd src
[root@localhost src]# ls
common.mk        e1000_manage.h  igb_ethtool.c  igb_ptp.o
e1000_82575.c    e1000_manage.o  igb_ethtool.o  igb_regtest.h
e1000_82575.h    e1000_mbx.c     igb.h          igb_vmdq.c
e1000_82575.o    e1000_mbx.h     igb_hwmon.c    igb_vmdq.h
e1000_api.c      e1000_mbx.o     igb_hwmon.o    igb_vmdq.o
e1000_api.h      e1000_nvm.c     igb.ko         kcompat.c
e1000_api.o      e1000_nvm.h     igb_main.c     kcompat_ethtool.c
e1000_defines.h  e1000_nvm.o     igb_main.o     kcompat.h
e1000_hw.h       e1000_osdep.h   igb.mod.c      kcompat.o
e1000_i210.c     e1000_phy.c     igb.mod.o      kcompat_overflow.h
e1000_i210.h     e1000_phy.h     igb.o          Makefile
e1000_i210.o     e1000_phy.o     igb_param.c    modules.order
e1000_mac.c      e1000_regs.h    igb_param.o    Module.supported
e1000_mac.h      igb.7.gz        igb_procfs.c   Module.symvers
e1000_mac.o      igb_debugfs.c   igb_procfs.o
e1000_manage.c   igb_debugfs.o   igb_ptp.c
[root@localhost src]# make clean
make[1]: Entering directory '/usr/src/kernels/3.10.0-2.nd7.33.mips64el'CLEAN   /home/100trust/igb-5.3.5.36/src/.tmp_versionsCLEAN   /home/100trust/igb-5.3.5.36/src/Module.symvers
make[1]: Leaving directory '/usr/src/kernels/3.10.0-2.nd7.33.mips64el'
[root@localhost src]# make install
make[1]: Entering directory '/usr/src/kernels/3.10.0-2.nd7.33.mips64el'CC [M]  /home/100trust/igb-5.3.5.36/src/igb_main.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_api.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_ethtool.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_hwmon.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_mbx.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_mac.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_manage.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_nvm.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_param.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_phy.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_procfs.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_vmdq.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_82575.oCC [M]  /home/100trust/igb-5.3.5.36/src/e1000_i210.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_debugfs.oCC [M]  /home/100trust/igb-5.3.5.36/src/igb_ptp.oCC [M]  /home/100trust/igb-5.3.5.36/src/kcompat.oLD [M]  /home/100trust/igb-5.3.5.36/src/igb.oBuilding modules, stage 2.MODPOST 1 modulesCC      /home/100trust/igb-5.3.5.36/src/igb.mod.oLD [M]  /home/100trust/igb-5.3.5.36/src/igb.ko
make[1]: Leaving directory '/usr/src/kernels/3.10.0-2.nd7.33.mips64el'
Copying manpages...
Installing modules...
make[1]: Entering directory '/usr/src/kernels/3.10.0-2.nd7.33.mips64el'INSTALL /home/100trust/igb-5.3.5.36/src/igb.koDEPMOD  3.10.0-2.nd7.33.mips64el
make[1]: Leaving directory '/usr/src/kernels/3.10.0-2.nd7.33.mips64el'
Running depmod...
[root@localhost src]# ls
common.mk        e1000_manage.h  igb_ethtool.c  igb_ptp.o
e1000_82575.c    e1000_manage.o  igb_ethtool.o  igb_regtest.h
e1000_82575.h    e1000_mbx.c     igb.h          igb_vmdq.c
e1000_82575.o    e1000_mbx.h     igb_hwmon.c    igb_vmdq.h
e1000_api.c      e1000_mbx.o     igb_hwmon.o    igb_vmdq.o
e1000_api.h      e1000_nvm.c     igb.ko         kcompat.c
e1000_api.o      e1000_nvm.h     igb_main.c     kcompat_ethtool.c
e1000_defines.h  e1000_nvm.o     igb_main.o     kcompat.h
e1000_hw.h       e1000_osdep.h   igb.mod.c      kcompat.o
e1000_i210.c     e1000_phy.c     igb.mod.o      kcompat_overflow.h
e1000_i210.h     e1000_phy.h     igb.o          Makefile
e1000_i210.o     e1000_phy.o     igb_param.c    modules.order
e1000_mac.c      e1000_regs.h    igb_param.o    Module.supported
e1000_mac.h      igb.7.gz        igb_procfs.c   Module.symvers
e1000_mac.o      igb_debugfs.c   igb_procfs.o
e1000_manage.c   igb_debugfs.o   igb_ptp.c
[root@localhost src]# modprobe igb
[root@localhost src]# dmesg | grep igb
[    3.414062] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    3.414062] igb: Copyright (c) 2007-2014 Intel Corporation.
[root@localhost src]# lsmod
Module                  Size  Used by
nls_cp936             130566  0
vfat                   11334  0
fat                    61117  1 vfat
usb_storage            58814  0
fuse                   88700  3
snd_hda_codec_hdmi     42111  0
snd_hda_intel          24076  2
r8169                  80994  0
shpchp                 29282  0
ip_tables              18188  0
x_tables               28893  1 ip_tables
ipv6                  431873  50
autofs4                28486  2

linux如何编译Intel网卡驱动源码,并进行安装相关推荐

  1. linux网卡驱动源码分析(一)

    linux网卡驱动源码分析(一) linux struct linux内核 网络 descriptor resources 转自http://blog.csdn.net/ustc_dylan/arti ...

  2. 我的内核学习笔记10:Intel GPIO驱动源码分析

    本文对Intel e3800的GPIO驱动源码进行分析. 一.概述 1.1 内核配置 Intel e3800的GPIO在Linux内核中使用的驱动名为gpio_ich(为了行文方便,将对应的设备称为& ...

  3. linux网卡驱动源码分析

    转自http://blog.csdn.net/ustc_dylan/article/details/6329375 网络驱动是一种典型的PCI设备驱动,无论在嵌入式平台还是在PC领域,网络相关的项目开 ...

  4. rtl8139网卡驱动源码解析

    学习应该是一个先把问题简单化,在把问题复杂化的过程.一开始就着手处理复杂的问题,难免让人有心惊胆颤,捉襟见肘的感觉.读Linux网卡驱动也是一样.那长长的源码夹杂着那些我们陌生的变量和符号,望而生畏便 ...

  5. opencv4.0在linux下编译,Ubuntu 18.04源码编译安装OpenCV 4.0步骤

    Ubuntu 18.04下标准常规安装方法安装的OpenCV版本比较低,想尝鲜使用4.0版本,只好源码安装. 安装环境 OS:Ubuntu 18.04 64 bit 显卡:NVidia GTX 108 ...

  6. PCI设备驱动与虚拟网卡驱动源码分析

    虚拟网卡驱动例程 #include<linux/module.h> #include<linux/sched.h> #include<linux/kernel.h> ...

  7. linux maven编译代码,git拉源码maven构建后部署脚本详解

    部署某个中间件到测试机器脚本 从git取源码,再maven构建,将jar拷贝到服务器,备份旧版本,重启. #!/bin/bash server_ips=(132.121.100.44 132.121. ...

  8. r8169驱动源码阅读记录

    r8169驱动源码阅读记录 初始化 发包 收包 源码地址:linux-4.19.90\drivers\net\ethernet\realtek\r8169.c 源码阅读环境:Windows 搭建 op ...

  9. Davinci DM6446开发攻略——LINUX GPIO驱动源码移植

    一.             DM6446 GPIO的介绍 说到LINUX 驱动移植,没有移植过的朋友,或刚刚进入LINUX领域的朋友,最好去看看<LINUX 设备驱动程序>第三版,有个理 ...

最新文章

  1. 机器学习中的L1与L2正则化图解!
  2. 轻松管理Win 2003的“远程桌面”
  3. mysql 删除多余帐号_安装完mysql数据库后的优化(删除多余用户和数据库)
  4. notepad比对文本_仵航说 notepad++怎么对比文件 仵老大
  5. irms模拟数据生成及数据分析
  6. mysql increment by_Mysql设置auto_increment_increment和auto_increment_offset
  7. 32位hex转浮点 python_python——int()、hex()、oct()、bin()、float()数值类型转换函数
  8. [SQL Server]用于压力测试和性能分析的两个支持实用工具[转]
  9. druid连接池以及数据源了解
  10. VC调用Delphi对象接口
  11. 修改linux的文件时,如何快速找到要修改的内容并修改
  12. vivado 开发教程(三) 在SDK中创建应用工程
  13. c语言 大写字母转换为小写字母后的第五个,将大写字母转换为对应小写字母之后的第5字母;若小写字母为v~z,使小写字母的值减21。...
  14. Unity 查找重复图片资源以及引用 工具
  15. php百度网盘登录,php百度网盘同步_http200_mmdb
  16. wps插入公式与文字不平行问题解决办法
  17. 在立创商城上快速制作PCB原理图库
  18. Nexus私服 (一)
  19. 中科大少年班、26岁数学天才回国任教,刚以中科大教授之名攻破世界级难题...
  20. ubuntu 18.04 安装gdb

热门文章

  1. oracle 查询日期最大值,sql语句查询每天数据中的最大值
  2. ftl模板导出excel_使用freemark模板生成excel
  3. 地理模块化施工的优点_河南省郑州市2018届高三下学期第三次模拟考试文综地理试题...
  4. 磨金石教育插画技能干货分享|插画怎么配色才好看?
  5. Meta云游戏架构解析,目标是降低AR/VR游戏门槛
  6. IEEE 802.15.4的信道接入机制三信标网络中的GTS
  7. beta冲刺6-咸鱼
  8. lisp绘制直齿圆柱齿轮_基于AutoLISP的模拟滚齿以及滚刀齿形验证
  9. 缓冲区溢出基础与实践
  10. qnx与linux区别,实时Linux和RTOS进行比较