linux driver 02 note
来源:互联网 发布:淘宝上的妹汁是什么 编辑:程序博客网 时间:2024/05/09 19:49
1. The printk function
2. insmod rmmod command
modprobe
lsmod works by reading the /proc/modules virtual file.
Information on currently loaded modules can also be found in the sysfs virtual filesystem under /sys/module.
3. klogd tools
4. /var/log/messages
5. The Current Process
printk(KERN_INFO "The process is \"%s\" (pid %i)\n",current->comm, current->pid);
6.Compiling and Loading
The kernel build system is a complex beast, and we just look at a tiny piece of it. The files
found in the Documentation/kbuild directory in the kernel source are required reading
for anybody wanting to understand all that is really going on beneath the surface.
The first is to ensure that you have sufficiently current versions of the
compiler, module utilities, and other necessary tools. The file Documentation/Changes
in the kernel documentation directory always lists the required tool versions;
7.The Kernel Symbol Table
EXPORT_SYMBOL(name);
EXPORT_SYMBOL_GPL(name);
When a module is loaded, any symbol exported by the module becomes part of the kernel symbol table.
In the usual case, a module implements its own functionality without the need to
export any symbols at all. You need to export symbols, however, whenever other
modules may benefit from using them.
8. The various MODULE_ declarations
Other descriptive definitions that can be contained within a module include
MODULE_AUTHOR (stating who wrote the module), MODULE_DESCRIPTION (a human-readable
statement of what the module does), MODULE_VERSION (for a code revision number;
see the comments in <linux/module.h> for the conventions to use in creating
version strings), MODULE_ALIAS (another name by which this module can be known),
and MODULE_DEVICE_TABLE (to tell user space about which devices the module supports).
9.Error Handling During Initialization
- linux driver 02 note
- DM9161 linux kernel driver note
- Note: Linux network device driver construct
- Book Note: Linux Device Driver Dos and Don'ts
- Linux Note
- Linux Note
- linux note
- Linux Note
- linux note
- Linux Note
- Linux Note
- Linux driver
- linux driver
- Linux Driver
- linux driver
- note : current IRQL value on driver
- linux kernel, driver, network driver
- Linux commands note
- Spring中@Autowired注解、@Resource注解的区别
- 返回大于等于N的最小整数值?
- 黑马程序员_主函数
- java jsf
- MFC Group Box 组合框的简单使用 笔记
- linux driver 02 note
- 【leetcode】 3Sum
- C++ 友元类
- hdu1426 数独
- Android开发之dip, dp, px, sp等区别
- hdu 2955(Robberies)
- 空中充值缴费改电脑缴费系统
- 最大子序列和问题~~
- mkyaffs2image的用法