Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/khg/237.html
Дата изменения: Thu Mar 23 12:37:55 2000 Дата индексирования: Wed Sep 15 00:51:55 2010 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п |
Using RedHat 5.0 and following KHG I performed the following steps in developing a driver 'x': 1) created x.o with gcc -O -DMODULE -D__KERNEL__ 2) created /dev/x crw-r--r-- 126 0 3) insmod ./x.o 4) lsmod listed it but ksyms did not 5) user root: fildef = open('/dev.x',O_RDWR); (fildef = 17) 6) user root:ioctl(fildef,_IOW(126,1,sizeof(daud)),(int)&daud) returns -1 as well as does all other ioctl's and write's I try from user app and do not print "printk's".
7) rmmod removes it OK. It seems that 'open' and 'release' are the only functions that work (perform as expected and "printk's" work). I copied device file_operations, ioctl and write parameter lists from KHG, basically replacing 'foo' with 'x'. I copied 'x.o' to /lib/modules/2.0.31/char and added 'alias char-major-126 x' to conf.module. Depmod -a does not add it to modules.dep and Modprobe doesn't know that 'x' exists.
|
Depmod Unresolved symbols? by Carl Schwartz