LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   compile a single kernel module (https://www.linuxquestions.org/questions/linux-general-1/compile-a-single-kernel-module-47364/)

wr3ck3d 02-27-2003 01:18 AM

compile a single kernel module
 
i kinda already posted this in the slackware forum but not really getting any help so will jsut make it quick in here.....after i patch the kernel and do a make "menuconfig", how can i just compile a single module instead doing "make modules" and making them all?? the file is ppp_mppe.c and its in the /drivers/net folder of the kernel source. I looked in the makefile in there and the new module is listed in there just need to know how to make it -thanks

xYko 02-27-2003 02:08 AM

No idea. But once you 'make modules', don't do a 'make clean'. That way if you configure in a new module and make modules, only it will get compiled. Works for me...

wr3ck3d 02-27-2003 02:41 AM

lol, i am having deja vu, i just made all of them, then

cp /drivers/net/ppp_mppe.o /lib/modules/linux/drviers/net
depmod -a (have no clue what that does but always remember instructions say to do it, so just figured maybe needed to be done)
modprobe ppp_mppe----cant find it
modprobe ppp_mppe.o---cant find it
insmod ppp_mppe---unresoved symbol register compressor, unregister compresser

i am getting a unresolved symbol error and that is the same error i got when trying to manually put in a r128 module before. Also all the modules are in gzip format, this is just the .o (object i think its called) file. Hopefully i there is a way to do this without installing all of the modules. -thanks

xYko 02-27-2003 04:48 AM

I'm no expert but that looks like you don't have the same version of the kernel as the module. I used to get that unresolved symbol error when I accidentally ran 2.4 modules with 2.2 kernel..

Not sure whether its actually *possible* to run a different version module than your kernel is, but it sure never worked for me :)
So if you patched the kernel and only made modules, that could be it.

DaOne 02-28-2003 06:32 AM

Quote:

Not sure whether its actually *possible* to run a different version module than your kernel is, but it sure never worked for me
I believe that there is something in the kernel that sets the version for the modules that allows you to run different version modules or 3rd party modules.

I believe that if you do all the things in order and don't skip anything you should be ok.

make menuconfig
make dep
make clean
make bzImage
make
make install (as long as you've properly edited lilo.conf and Makefile)
make modules
make modules_install

I think xYko is right...you need to do a make modules_install.

wr3ck3d 02-28-2003 08:22 AM

ok, i did what you said DaOne and just installed all of the modules...now i am back to where was before with getting Direct Rendering to work.....here is the error in am getting when trying to install DRI.

make: `r128.o' is up to date.
/usr/X11R6/lib
/lib/modules/2.4.18/kernel/drivers/char/drm/r128.o: unresolved symbol cmpxchg
/lib/modules/2.4.18/kernel/drivers/char/drm/r128.o: insmod
/lib/modules/2.4.18/kernel/drivers/char/drm/r128.o failed
/lib/modules/2.4.18/kernel/drivers/char/drm/r128.o: insmod r128 failed

I am still using the 2.4.18 kernel, when i reinstalled all the moduels it does not include DRI this time.....its pretty obvious to me that this is the problem but just want a experienced person opinion..................... ..http://dri.sourceforge.net/faq/faq_display.phtml?id=18, seems like i am going to have to either download all of X again (at a internet cafe of course), or say screw mppc compression and just reinstall linux, or maybe there is a way to just reinstall X from the installation CD since that came DRI ready but without there being module difference problems...i know for sure the 2.4.19 kernels dont include dri so maybe the 2.4.20 does, anyone know?? -thanks

mesa 02-28-2003 02:38 PM

This is how i always setup dri-hardware accleration- 3d whatever you want to call it!

I disable dri/drm support in the kernel.

Then i either :

A) download dri-cvs and go through that entire process of upgrading my Xfree86 and use the modules it builds for the kernel. You just copy them from the dri source tree to /lib/modules/whatever whatever , then you run depmod -a.

OR

B) Download the binary module package from the DRI site and build my video drivers with that. Then copy the driver your needing to /lib/modules/<kernel-version>/whatever/path/

Either way never gives me a problem.

Make sure you kernel source is in /usr/src/linux before doing any of this.

mesa

Linux = Freedom

UnTamed 02-28-2003 04:43 PM

>/lib/modules/2.4.18/kernel/drivers/char/drm/r128.o: unresolved symbol cmpxchg

Compile your kernel for i586 or better.

wr3ck3d 02-28-2003 08:34 PM

Thanks Un Tamed.....when i compiled the 2.4.20 kernel i used the xconfig with help and realized i had left it at the 386 setting...got dri working also now :), so everything seems ok. just hope i picked all the right settings in the xconfig.

mesa 03-01-2003 11:54 AM

Im just curious as to which way you ahceived your dri.

I had posted a couple of exmples on how to do so ,which did you use ?

Did you compile dri-cvs or just get the modules-package from dri and insert those modules into the kernel ?

Just in case someone else reads and wants to know which direction you took !

Thanks,

mesa
Linux = Freedom

wr3ck3d 03-01-2003 12:00 PM

I got the module package and ran ./install (something).....the problem was that when i recompiled the kernel i left it on 386 instead of changing to my pc.


All times are GMT -5. The time now is 07:42 AM.