當前位置:首頁 » 操作系統 » linux查看驅動

linux查看驅動

發布時間: 2022-01-31 18:40:56

linux平台下,如何查看系統信息和裝載驅動程序

顯卡安裝: 一、下載驅動程序 首先要找到顯卡for Linux的驅動程序。現在絕大多數的3D顯卡都已有了for Linux的驅動程序,可到各顯卡廠商的主頁或Linux的相關站點上去尋找。在安裝顯卡時,伺服器根據顯卡的情況來載入不同的顯示模塊,如果顯示模塊載入不正確,顯卡就不能正常顯示。 二、裝載磁碟驅動器 Linux需要裝載磁碟驅動器才能讀取文件。啟動Linux後,在字元界面下輸入「mount -t vfat /dev/hda1 /mnt/winc」命令,將C盤裝載到Linux下。需要注意的是,如果下載的是壓縮文件,選擇的是在Linux下解壓,就得先進行裝載磁碟驅動器這一步,再進行文件的解壓縮。 三、拷貝文件 將XF86_SVGA文件拷貝到/usr/X11R6/bin目錄下。注意,這是針對Red Hat版本來說,其它版本的路徑不一定相同。「cp /mnt/winc/win98/TEMP/XF86_SVGA /usr/X11R6/bin」(根據自己的情況靈活掌握,關鍵是路徑一定要正確,還要分清字母的大小寫)。如果系統提示有同名文件,問是否覆蓋,一定要選擇「y」。這些舊文件可能是以前安裝顯卡時載入的,沒有實際用處。在輸入文件名的時候,輸完XF86後按一下Tab鍵,再接著輸SVGA,下劃線_就可以出來了,按鍵盤上的下劃線鍵是沒用的,切記。 四、配置顯卡 文件拷貝完成後,輸入Xconfigurator,啟動顯卡配置程序。我在顯卡列表中仍然沒有找到Trident Blade 3D,於是選最後一個選項「Unlist」,然後選擇載入的顯示模塊為SVGA,再選擇顯示器型號、顯存大小、刷新頻率 總結:在Linux下安裝顯卡驅動程序,首先要下載顯卡支持Linux的驅動程序,再將其拷貝到/usr/X11R6/bin目錄下,然後啟動顯卡配置程序進行配置即可。 網卡、音效卡等驅動安裝可以依此類推。《Linux就該這么學》里有相關介紹,建議看看。

⑵ linux查看未安裝驅動的設備

linux查看系統硬體信息,是通過不同命令實現的,簡單羅列如下:

  1. lscpu命令,查看的是cpu的統計信息;

  2. cat /proc/cpuinfo 可以知道每個cpu信息,如每個cpu的型號,主頻等


2. free -m命令, 概要查看內存情況;

cat /proc/meminfo 查看內存詳細使用



3. lsblk命令, 查看硬碟和分區分布;

fdisk -l 如果要看硬碟和分區的詳細信息



4. lspci | grep -i 'eth' 命令, 查看網卡硬體信息

ifconfig -a 或ip link show 查看系統的所有網路介面



5. 其他

lspci命令,查看pci信息,即主板所有硬體槽信息。

⑶ linux下怎麼看顯卡驅動版本

用glxinfo命令,看輸出。
其中應該有"driver=xxx"字樣,xxx是你現在使用的驅動。
顯卡驅動就是用來驅動顯卡的程序,它是硬體所對應的軟體。驅動程序即添加到操作系統中的一小塊代碼,其中包含有關硬體設備的信息。

⑷ linux7.0怎麼查看hba驅動

1、使用linux系統登錄賬號登錄。

⑸ 怎樣在linux下查看無線網卡是否被驅動

多數不驅動無線網卡的燈是暗的驅動後正常的話應該是亮的
查看應該是:
iwconfig
ifconfig應該也可以,看到有無線網卡的信息就差不多了,別的就差配置了。

⑹ linux下怎麼看顯卡驅動版本

用glxinfo命令,看輸出。 其中應該有"driver=xxx"字樣,xxx是你現在使用的驅動。

⑺ linux怎麼查看已裝好硬體驅動

linux系統中的設備驅動是否安裝好一般檢查幾個方面:1、系統日誌。嵌入式系統多是直接dmesg一下,看有沒有設備關鍵字相關的出錯信息(通用系統可檢查/var/log/messages文件)。
2、已載入的模塊。檢查模塊載入列表中有沒有相關設備的模塊。
lsmod
3、設備列表。檢查已載入的設備中有沒有相關設備
cat /proc/devices
4、設備入口。如果以上檢查都正常,還需要檢查設備目錄下設備入口是否已經創建
ls /dev/xxxx

如果以上檢查都正常(驅動模塊已經正常載入、設備入口存在且沒有錯誤),而設備還不能正常工作,就需要檢查設備驅動是否與晶元匹配或者驅動中的硬體資源配置是否與硬體對應了。

⑻ x86架構下linux驅動編程 看什麼書

編寫好驅動,通過掛載的方法將驅動程序掛載到內核裡面,大致步驟如下:
一: 1>建立以.c為後綴的c語言程序文件(裡麵包含了設備名及設備號等)
2>建立Makefile文件(作用是通過make來產生設備文件*.ko文件,裡面可以建立自己的平台所需的設備文件如:arm等).make產生相應的設備文件
二: 要在/dev下建立相應的設備結點(設備名),用insomd *.ko命令將相應的驅動設備文件掛載到內核中.
三:編寫測試文件(.c文件)用來測試內核是否已近成功掛載到內核.(編寫好相應的測試文件後,用gcc –o Filename Filename.c(測試文件名)來產生相應的可執行文件).
四:如果設備驅動掛載成功,當執行測試文件(./Filename)時會產生相應的結果.

五:可能用到的相關命令:
1.lsmod:列出內核已經載入模塊的專題.
輸出:
Mole(模塊名)size(大小)used by (被..使用)
2.demop:分析可載入模塊的依賴性,生成moles.dep文件和映射文件
3.uname –r 顯示內核版本(在編寫Makefile時使用到)
4.modprobe : linux內核添加和刪除模塊(相關參數請查看man幫助文檔)
5.modinfo:顯示內核模塊的信息.
6.insmod: 向linux內核中載入一個模塊,用法:insmod[filename] [mole options…]
7.rmmod: 刪除內核中的模塊, 用法: rmmod [-f,w,s,v][molename]
8.dmesg: 顯示內核緩沖區,內核的各種信息,內核啟動時的信息會寫入到/var/log/下.

六.例子1:
第一步:增加頭文件和宏定義
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/cdev.h>
#include <linux/uaccess.h>
#include <linux/mole>
#include <linux/kernel>

第二步:添加與字元設備定義及注冊有關的數據成員
//定義設備名稱
#define DEVICE_NAME "test" //設備名
#define BUF_SIZE 1024
static char tmpbuf[BUF_SIZE];

//定義主次設備號
static unsigned int TestMajor=0; //主
static unsigned int TestMinor=0; //次

static struct cdev *test_cdev;
static dev_t dev;

第三步:增加open/release函數

static int test_chardev_open(struct inode *inode,struct file *file)
{
printk("open major=%d, minor=%d\n", imajor(inode),
iminor(inode));
return 0;
}

static int test_chardev_release(struct inode *inode,struct file *file)
{
printk("close major=%d,minor=%d\n",imajor(inode),
iminor(inode));
return 0;
}

第四步:增加read函數
static ssize_t test_chardev_read(struct file *file,char __user *buf,
size_t const count,loff_t *offset)
{
if(count < BUF_SIZE)
{
if(_to_user(buf,tmpbuf,count))
{
printk(" to user fail \n");
return -EFAULT;
}
}else{
printk("read size must be less than %d\n", BUF_SIZE);
return -EINVAL;
}
*offset += count;
return count;
}

第五步:增加write函數
static ssize_t test_chardev_write(struct file *file, const char __user*buf,size_t const count,loff_t *offset)
{
if(count < BUF_SIZE)
{
if(_from_user(tmpbuf,buf,count))
{
printk(" from user fail \n");
return -EFAULT;
}
}else{

printk("size must be less than %d\n", BUF_SIZE);
return -EINVAL;
}
*offset += count;
return count;
}

第六步:添加增加file_operations成員

static struct file_operations chardev_fops={
.owner = THIS_MODULE,
.read = test_chardev_read,
.write = test_chardev_write,
.open = test_chardev_open,
.release = test_chardev_release,
};

第七步:在模塊的入口添加設備的設備號獲取及設備注冊
static int __init chrdev_init(void)
{
int result;

if(TestMajor)
{
dev=MKDEV(TestMajor,TestMinor);//創建設備編號
result=register_chrdev_region(dev,1,DEVICE_NAME);
} else {
result=alloc_chrdev_region(&dev,TestMinor,1,DEVICE_NAME);
TestMajor=MAJOR(dev);
}
if(result<0)
{
printk(KERN_WARNING"LED: cannot get major %d \n",TestMajor);
return result;
}

test_cdev=cdev_alloc();
cdev_init(test_cdev,&chardev_fops);
//test_cdev->ops=&chardev_fops;
test_cdev->owner=THIS_MODULE;
result=cdev_add(test_cdev,dev,1);
if(result)
printk("<1>Error %d while register led device!\n",result);

return 0;
}

第八步:在模塊的出口函數增加設備設備號釋放及設備注銷函數

unregister_chrdev_region(MKDEV(TestMajor,TestMinor),1);
cdev_del(test_cdev);

第九步:編譯並載入該模塊

第十步:根據設備號的設置,在文件系統中建立對應的設備節點
#mknod /dev/test c XXX XX

例子2:
驅動文件:
#include <linux/init.h>
#include <linux/mole.h>
#include <linux/cdev.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/uaccess.h>

#define DEVICENAME "ccccc"

unsigned int major=221;
unsigned int minor=0;
struct cdev *abc;
dev_t dev;
static char bufrh[1024]="read success!";

static int aaaaa_open(struct inode *inodep, struct file *filep)
{
printk("read success!\n");
return 0;
}

int aaaaa_release(struct inode *inodep, struct file *filep)
{
return 0;
}
static ssize_t aaaaa_read (struct file *filep, char __user *buf, size_tcount, loff_t *offset)
{
if(_to_user(buf, bufrh, 1))
{
printk("_to_user fail!\n");
}
return 0;
}

ssize_t aaaaa_write (struct file *filep, const char __user *buf,size_t count, loff_t *offse)
{
printk("write!\n");
return 0;
}

static const struct file_operations fops = {
.owner = THIS_MODULE,
.open = aaaaa_open,
.release = aaaaa_release,
.read = aaaaa_read,
.write = aaaaa_write,

};

static int __init aaaaa_init(void)
{
int a;
dev=MKDEV(major, minor);
a=register_chrdev_region(dev, 1, DEVICENAME);

abc=cdev_alloc();
abc->owner=THIS_MODULE;
cdev_init(abc, &fops);

cdev_add(abc, dev, 1);

return 0;
}

static void __exit aaaaa_cleanup(void)
{
cdev_del(abc);
unregister_chrdev_region(dev, 1);
}

mole_init(aaaaa_init);
mole_exit(aaaaa_cleanup);
MODULE_LICENSE("GPL ");

Makefile文件:

obj-m += firstqd.o(相應設備文件名)

KERDIR = /usr/src/linux-headers-2.6.32-24-generic
#KERDIR=/home/linux2.6/linux #arm騫沖彴
PWD=$(shell pwd)

moles:
$(MAKE) -C $(KERDIR) M=$(PWD)moles

pc:
gcc -o fristqd firstqd.c
arm:
arm-linux-gcc -o fristqd firstqd.c

clean:
rm -rf *.o *~core *.depend *.cmd *.ko *.mod.c *.tmp_versions

測試文件(test.c):

#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>

char buf[1024];
char bufw[1024]="write success";
int main()
{
int fd,m,n;
fd=open("/dev/aaa",O_RDWR);
if (fd)
{
m=read(fd,buf,100);
printf("read kernel:%s\n",buf);

n=write(fd,bufw,10);
}
//printf("ni hao");
return 0;

}

⑼ linux下如何查看網卡驅動版本信息

Linux下查看網卡驅動和版本信息
查看網卡生產廠商和信號
查看基本信息:lspci
查看詳細信息:lspci -vvv # 3個小寫的v
查看網卡信息:lspci | grep Ethernet
查看網卡驅動
查看網卡驅動信息:lspci -vvv # 找到網卡設備的詳細信息,包括網卡驅動
# lsmod 列出載入的所有驅動,包括網卡驅動

查看網卡驅動版本
查看模塊信息:modifo<mole name> # 其中包含version信息
或 # ethtool-i <device name>
RHEL 6.3中的網卡驅動版本:
# modinfo igb
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/igb/igb.ko
version: 3.2.10-k
license: GPL
description: Intel(R) Gigabit Ethernet Network Driver
# modinfo e1000e
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/e1000e/e1000e.ko
version: 1.9.5-k
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation,<[email protected]>
# modinfo e1000
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/e1000/e1000.ko
version: 8.0.35-NAPI
license: GPL
description: Intel(R) PRO/1000 Network Driver
# modinfo ixgbe
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/ixgbe/ixgbe.ko
version: 3.6.7-k
license: GPL
description: Intel(R) 10 Gigabit PCI Express NetworkDriver
# modinfo r8169
filename: /lib/moles/2.6.32-279.el6.x86_64/kernel/drivers/net/r8169.ko
version: 2.3LK-NAPI
license: GPL
description: RealTek RTL-8169 Gigabit Ethernet driver
查看網路介面隊列數
查看網卡介面的中斷信息:#cat /proc/interrupts | grep eth0
或 # ethtool-S eth0
查看網卡驅動源碼的版本號
解壓Intel網卡驅動源碼,打開解壓縮目錄下的*.spec文件查看驅動的版本。
例如:解壓e1000-8.0.35.tar.gz網卡驅動後,查看e1000.spec文件。
Name:e1000
Summary:Intel(R) Gigabit Ethernet Connection
Version: 8.0.35
Release:1
Source:%{name}-%{version}.tar.gz
Vendor:Intel Corporation
License:GPL
ExclusiveOS:linux
Group:System Environment/Kernel
在驅動源碼src目錄中查找:
#grep DRV_VERSION * # forLinux
#findstr DRV_VERSION * # for Windows
在e1000_main.c中也能找到定義驅動版本的一行:
#define DRV_VERSION"8.0.35" DRV_NAPI DRV_DEBUG DRV_HW_PERF
在e1000e中src目錄下netdev.c文件:
#define DRV_VERSION"3.0.4.1" DRV_EXTRAVERSION
igb_main.c:
#define MAJ 5
#define MIN 2
#define BUILD 9.4
#define DRV_VERSION__stringify(MAJ) "." __stringify(MIN) "."\
ixgbe_main.c:
#define DRV_VERSION __stringify(3.22.3) DRIVERIOVDRV_HW_PERF FP GA \

熱點內容
html文件上傳表單 發布:2024-09-17 03:08:02 瀏覽:783
聊天軟體編程 發布:2024-09-17 03:00:07 瀏覽:725
linuxoracle安裝路徑 發布:2024-09-17 01:57:29 瀏覽:688
兩個安卓手機照片怎麼同步 發布:2024-09-17 01:51:53 瀏覽:207
cf編譯後沒有黑框跳出來 發布:2024-09-17 01:46:54 瀏覽:249
安卓怎麼禁用應用讀取列表 發布:2024-09-17 01:46:45 瀏覽:524
win10設密碼在哪裡 發布:2024-09-17 01:33:32 瀏覽:662
情逢敵手迅雷下載ftp 發布:2024-09-17 01:32:35 瀏覽:337
安卓如何讓軟體按照步驟自動運行 發布:2024-09-17 01:28:27 瀏覽:197
Z包解壓命令 發布:2024-09-17 01:27:51 瀏覽:221