using depmod and modprobe
I'm trying to package a device driver I've written for the DoubleTalk
speech synthesizer, but I can't get depmod (and therefore modprobe) to
work.
I have compiled the module (dtlk.o) for the current kernel. I think I
included all the relevant compiler switches:
gcc -g -O -Wstrict-prototypes -fomit-frame-pointer -malign-jumps=2
-fno-strength-reduce -pipe -malign-loops=2 -malign-functions=2 -m486
-D__KERNEL__ -DMODVERSIONS -DMODULE -DLINUX -D__GENKSYMS__
-DCPU=`uname --machine|sed -e s/^i//` -c -o dtlk.o dtlk.c
I installed it into /lib/module/2.0.29/misc. insmod installs the
module fine. However, recording the module dependency information
does not work. The usual command gives only an uninformative error
message:
# depmod -a
modprobe: error reading ELF header: No such file or directory
However, I think this is unrelated to dtlk.
Using strace, I find depmod was looking for ipv4.o:
open("/lib/modules/2.0.29/misc/NET_MISC_MODULES", O_RDONLY) = 104
fstat(104, {st_mode=S_IFREG|0644, st_size=7, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4011f000
lseek(104, 0, SEEK_SET) = 0
read(104, "ipv4.o\n", 4096) = 7
read(104, "", 4096) = 0
write(2, "modprobe: ", 10) = 10
write(2, "error reading ELF header: No suc"..., 51) = 51
The only entry in misc/NET_MISC_MODULES is one for ipv4.o:
/lib/modules/2.0.29/misc$ cat NET_MISC_MODULES
ipv4.o
However, there is no file ipv4.o in the whole lib/modules directory
tree. I don't know where that entry came from. Should I delete the
whole file NET_MISC_MODULES?
Trying to record the dependency information explicitly for the dtlk
module also fails:
# depmod -e dtlk.o
dtlk.o: unresolved symbol(s)
request_region
schedule
current_set
unregister_chrdev
release_region
register_chrdev
verify_area
loops_per_sec
check_region
jiffies
printk
dtlk.o:
I did RTFM (the depmod(1) man page and
/usr/src/linux/Documentation/modules.txt). I'd appreciate any suggestions.
- Jim Van Zandt
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: