首页 > 系统服务 > 详细

Linux内核编程:从hello world 开始-(3)_run      

时间:2014-12-28 01:51:08      阅读:339      评论:0      收藏:0      [点我收藏+]
/*   
 *File    : test.c 
 *Author  : DavidLin      
 *Date    : 2014-12-07pm      
 *Email   : linpeng1577@163.com or linpeng1577@gmail.com      
 *world   : the city of SZ, in China      
 *Ver     : 000.000.001      
 *history :     editor      time            do      
 *          1)LinPeng       2014-12-07      created this file!      
 *          2)      
 */


1.获得root权限:su root;

2.make   

3.insmod ./test.ko

4.rmmod test

5.tail -n 3 /var/log/messages

6.lsmod

执行完上述流程,就可以看到内核打印信息了,其中lsmod可以看到test模块的靓影,欢迎来到内核的世界,Hello World。


Linux内核编程:从hello world 开始-(3)_run      

原文:http://linpeng.blog.51cto.com/9779987/1596712

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!