make modules_install fails
I have been struggling with adding a device driver on kernel version 2.4.27 for days. the same procedure had worked well on 2.6.8. unfortunately I have to stay with the old kernel.
after installing 2.4.27 and its kernel source (uname -r is 2.4.27-2-386), there is a /lib/modules/2.4.27-2-386/ directory with many device drivers in the tree. I did a make menuconfig to enabled loading modules, followed by make dep.
I copied the device driver sources into /usr/src/linux/drivers/usb, made the modification to Makefile and Config.in according to instructions.
make modules ran fine, then make modules_install. at this point, I found out that a
/lib/modules/2.4.7 dir was created, and make modules_install only installed a few .o files under drivers/media/video and drivers/net subdirectories, and dumped out a whole bunch of missing symbols for these .o's.
then I tried copying /boot/config-2.4.27 over to /usr/src/.config, and retried make modules; make modules_install. I get a whole bunch of warnings about redefinition of many functions calls, then ended up with the same missing symbols error messages.
then I tried to compiled a new kernel using make-kpkg --append-to-version=.051106. it produced the proper .deb file which I did kpkg -i on. this created /lib/modules/2.4.27.051206 but with only one drivers/net subdirectories under it. re-running make modules; make modules_install only produce the same missing symbols errors. make modules_install still copies new .o files to /lib/modules/2.4.27, and not to /lib/modules/2.4.27.051206
my questions is
1) is it necessary to recompile a new kernel after enabling loading modules? or should I be able to stay with the original kernel, and simply try to make modules.
2) it seems if I run make menuconfig without copying /boot/config-2.4.27 and make oldconfig, the configuration reverts to some very minimum selection producing only a handful of modules?
3) why is it even if I copy the original config and add new settings, I get all the missing symbol errors?
4) is make modules_install supposed to copy .o outputs to /lib/modules/2.4.27 instead of /lib/modules/{uname -r}? if so, why are the /lib/modules/{uname -r} directories created? which /lib/modules directory tree does modprobe <module name> use?
anyone with experience in this area?
Thanks
|