摘要: 1.insmod——载入模块 insmod 就是install module的缩写 功能说明:载入模块。 语法:insmod [-fkmpsvxX][-o <模块名称>][模块文件][符号名称 = 符号值] 说明:Linux有许多功能是通过模块的方式,在需要时才载入kernel。如此可使kernel较为精简,进而提高效率,以及保有较大的弹性。这类可载入的模块,通常是设备驱动程序。参数:-f 不检查目前kernel版本与模块编译时的kernel版本是否一致,强制将模块载入。 -k 将模块设置为自动卸除。 -m 输出模块的载入信息。 -o<模块名称> 指定模块的名称,可.. 阅读全文
posted @ 2012-11-07 21:50 hallou 阅读(165) 评论(0) 推荐(0) 编辑
摘要: linux内核编程(1)—内核模块helloworld1.代码helloworld.c#include <linux/init.h>#include <linux/kernel.h>#include <linux/module.h>static int hello_init(void){ printk("Hello! This is the helloworld module!\n"); return 0;}static void hello_exit(void){printk("Module exit! Bye Bye!\n& 阅读全文
posted @ 2012-11-07 21:33 hallou 阅读(507) 评论(0) 推荐(0) 编辑