LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Trying to compile pcwd_pci kernel module in Fedora 7 (https://www.linuxquestions.org/questions/fedora-35/trying-to-compile-pcwd_pci-kernel-module-in-fedora-7-a-666495/)

magnus_simius 08-30-2008 12:31 PM

Trying to compile pcwd_pci kernel module in Fedora 7
 
I recently purchased a watchdog timer card from Berkshire products. I have followed two different instruction sets and neither one has given me any results. The instructions that came with it are as follows:
INSTALL PCWD_PCI DRIVER AS KERNEL MODULE

Copy pcwd_pci.c in /usr/src/linux/drivers/char/watchdog
Compile kernel with pcwd_pci as a module:
make modules
make modules_install
depmod -a
modprobe pcwd_pci
There is no "/usr/src/linux/drivers/char/watchdog" directory in Fedora so I created a symlink from "/usr/src/linux/" -> "/usr/src/kernels/2.6.23.17-88.fc7-i686/"
where "2.6.23.17-88.fc7-i686" is my current kernel.

However, when I type in "make modules" it gives me
"make: *** No rule to make target `modules'. Stop."

I also followed a set of instructions from the fedora project website on compiling kernel modules. I modified the Makefile in /usr/src/kernels/2.6.23.17-88.fc7-i686/drivers/char/watchdog/ to include the following lines:
# Added on August 30, 2008
obj-m:= pcwd_pci.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
# End of additions
When I try running the make command it says
"make: Nothing to be done for `default'."
even though the module was not created.

The pcwd_pci.c file I'm using can be found here.

Any help would be great.

magnus_simius 08-30-2008 03:00 PM

It seems to be working for the most part now. The second method must have worked, but I just didn't realize it. The README file that came with it says I should be able to check the status by entering
"echo /proc/pcwd"
However there is no /proc/pcwd.
I'm able to check the boot status via "dmesg | grep pcwd", though. It's working well enough for me at least.


All times are GMT -5. The time now is 08:38 AM.