Linux查看硬件信息
在LINUX环境开发驱动程序,首先要探测到新硬件,接下来就是开发驱动程序。
常用命令整理如下:
用硬件检测程序kudzu探测新硬件:service kudzu start ( or restart)
查看CPU信息:cat /proc/cpuinfo
查看板卡信息:cat /proc/pci
查看PCI信息:lspci (相比cat /proc/pci更直观)
查看内存信息:cat /proc/meminfo
查看USB设备:cat /proc/bus/usb/devices
查看键盘和鼠标:cat /proc/bus/input/devices
查看系统硬盘信息和使用情况:fdisk & disk - l & df
查看各设备的中断请求(IRQ):cat /proc/interrupts
查看系统体系结构:uname –a
dmidecode查看硬件信息,包括bios、cpu、内存等信息
dmesg | more 查看硬件信息
对于“/proc”中文件可使用文件查看命令浏览其内容,文件中包含系统特定信息:
Cpuinfo 主机CPU信息
Dma 主机DMA通道信息
Filesystems 文件系统信息
Interrupts 主机中断信息
Ioprots 主机I/O端口号信息
Meninfo 主机内存信息
Version Linux内存版本信息
相关文档:
引:
Linux操作系统是由Linus Torvalds先生在1991年创建的,之后不断获得互联网上众多程序员的自愿支持,经过十几年的发展,如今已经成为继Windows之后的第二大电脑操作系统软件。
你是否对Linux有充分的了解呢?作为一种平台,Linux首先获得了沉溺于某种癖好之士和黑客们的
青睐。Linux操作系统是由Linus
Torvalds先生 ......
10.5.2 精通定时器设置
函数alarm设置的定时器只能精确到秒,而以下函数理论上可以精确到微妙:
#include <sys/select.h>
#include <sys/itimer.h>
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval
*value, struct itimerval *ovalue ......
原文出处:http://www.svn8.com/shouce/Linux/kernel_options.html尊重原创!
Code maturity level options
代码成熟度选项
Prompt for development and/or incomplete code/drivers 显示尚在开发中或尚未完成的代码与驱动.除非你是测试人员或者开发者,否则请勿选择
General setup
常规设置
Local version - append ......
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
......