yihe_guo 发表于 2004-3-29 12:56:37

驱动编写问题

本人在编写驱动程序时,经常需要边查看运行结果,后再修改源程序,这时如果直接rmmod 会提示设备忙,想请问各位高手,如何能不重新启动计算机,就能再次编译后加载模块?

Dragonfly 发表于 2004-3-30 02:25:13

i suggest u to use the UML if possible. search this forum to check the UML post I posted before.

if u module reference count is not 0, u can not rmmod. kernel development can not have dynamic compiling at least till now.

超级用户 发表于 2004-4-1 23:11:44

of coures if <used> flag is set(!=unused),mod canNOT be remod.

check Ur driver-code.

ttjswdy 发表于 2004-4-16 11:19:25

请问二楼,您说的"dynamic compiling" 是什么意思,是动态编译吗?为什么内核程序不能动态编译

Dragonfly 发表于 2004-4-16 11:54:42

what i mean is to recompile the part of the code u changed during runtime and execute new instructions directly.

prox2004 发表于 2004-4-22 21:56:42

记不清了,
我在linux2.2,好像修改
1)加载的设备程序名xxx.o改为xxx1.o
2)register_chrdev(SOUND_MAJOR, "sound", &soundcore_fops);"sound"这个东东要不要改,记不得了.

试试,应该可以insmod xxx1.o, 不用管rmmod xxx.o成功与否.
页: [1]
查看完整版本: 驱动编写问题