From: Gordon H. <go...@gh...> - 2000-07-16 11:03:21
|
fh...@at... wrote: > > I have been trying to learn how to program char devices. > Well really trying to get my Hypercom4+ and Delfina Plus cards > to work. I've made test drivers for both. Both drivers contain printk > statements so I can see if they are doing anything remotely like they are > supposed to. Even though the drivers seem to compile OK and are > "installed" in the kernel, no printk statements are visible in the dmesg > output. Is this a problem peculiar to char devices? I suspect I have not > quite got the driver code installed correctly in the kernel source tree. Try changing the printk's to printk(KERN_INFO "Blah"); /* KERN_* are defined in linux/kernel.h */ then it may goto dmesg and the kernel log. > Can anyone tell me the general procedure for adding a driver > to the kernel? i.e. so it can be chosen in the .config and loaded into > the kernel? Or maybe point me to some docs somewhere. Sure, for 2.2 add a config option in arch/ppc/config.in and change drivers/char/Makefile. Or compile it as a module. with gcc -c module.c -DMODULE -D__KERNEL__ -o module.o then load the mod with /sbin/insmod module.o Module programing infos at http://www.linuxdoc.org/LDP/lkmpg/mpg.html Gordon |