LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I'm in way over my head!!! (https://www.linuxquestions.org/questions/linux-software-2/im-in-way-over-my-head-102235/)

leavingwindows 10-09-2003 05:15 PM

I'm in way over my head!!!
 
Ok, I'm a newbie, and I'm trying to add modules to my kernel to make a "linmodem" work on RedHat9. Here's what's happening.

I've got the source for pctel's drivers. I've run thru the instructions a million and 4 times. I do "./configure" and then "make" and then "make install" and everything works fine.

There are two things created after this: pctel.o and ptserial.o.

I'm supposed to exec "insmod -f pctel" and then "insmod -f ptserial" but when I run the second, I get errors about unresolved symbols. I've got no clue what this means, but I found a script called "fixscript" that I used to try to fix it. It gave me errors like:

:confused: ERROR: Symbol 'such-n-such' not found in kernel symbols.
:confused: Insert the appropriate module and try again.

I get about 50 of these errors and have no clue what to do now. Can somebody please explain what's goin on and maybe point me into the right direction.

I know that if I just get a hardware modem or a serial modem, my problems would go away. I just don't have a way to get either.

My instructions are from http://www.peacefulaction.org/sayamindu/pctel.html just in case somebody wants to know what i've been doing.

pesho_p 10-09-2003 05:49 PM

Are 100% sure that following conditions are satisfied:
Quote:

5. Compiling and installing the drivers

The first requisite for installation is that you have a kernel source in /usr/src/linux/ (see section 7.7) and it must be configured, that is, you should have done a bash$ make configure and bash$ make dep on it.

While doing these make sure that you have the source for your running kernel...for example, if you are running kernel 2.4.8 and if you have the source for kernel 2.4.9 in /usr/src/linux/, then the drivers would not work.

Moreover, you must configure the kernel with isapnp and pnp support and see to the fact that you don't have a smp/uniprocessor mismatch ( that is, running uniprocessor kernel but having a kernel source with smp support in /usr/src/linux). Also, you will need a kernel which supports loadable modules.

And of course, you need to have gcc installed, check it by issuing the command bash$ gcc -v . If you do not get any errors, then everything is all right


If you have gcc version 3 or above , and have problems during compiling, please refer to this section in the FAQ.

leavingwindows 10-09-2003 06:10 PM

I know I have a kernel source in /usr/src/linux/ and I did the "make configure" and make dep" just to be sure.
As far as the kernel versions, I assume that the kernel RH9 installed is the kernel they have on their disk and is the source I got during installation.
I did run "make menuconfig" to make sure that isapnp and pnp were installed and that my kernel supported loadable modules.
I even went and looked thru the FAQs to make sure I didn't miss anything. That's where I found fixscript which I made executable and ran by typing:

./fixscript /lib/modules/2.4.20-8/misc/ptserial.o /lib/modules/2.4.20-8/misc/newptserial.o

I thought this was right. Did I do this part wrong?:confused:
I ran "uname -r" to check the running kernel version. It gave back 2.4.20-8. Just in case, how do I check the source to make sure it's version 2.4.20-8?

pesho_p 10-09-2003 06:47 PM

Quote:

I thought this was right. Did I do this part wrong?
I'm not sure about that "make configure" and make dep" done against your kernel tree (I didn't noticed previously that you're with RedHat). This is not vanilla kernel from kernel.org. Can you remove your kernel package (rpm -blah_blah...), install it again (this way kernel tree will be intact) and try without "make configure / make dep" steps? They are required for vanilla kernels downloaded form kernel.org and not for those pre-build RedHat/SuSE/Mandrake/etc. ones (as far as I know tough). If this "exercise" (i.e. removing current kernel tree and installing it again) doesn't help maybe compiling one new kernel (say 2.4.22) on your own will solve those problems (however not exactly I'm at least 75% sure).

Quote:

Just in case, how do I check the source to make sure it's version 2.4.20-8?
Open Makefile located in /usr/src/linux and look for these lines (near top):
Code:

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 20
EXTRAVERSION = -8


leavingwindows 10-09-2003 07:20 PM

Ok... now RH is pretty easy, but how (in as many failsafe details as possible) do I remove the source and put it back?

pesho_p 10-09-2003 08:48 PM

I'm not familiar with RedHat nor I understand RPM altogether, but:

1. Try rpm -q kernel-source* and it should print the exact name of the package.
2. Then type rpm -e kernel-source-2.4.20-8-i386.rpm (or whatever it prints in 1.) followed by rpm -ivh kernel-source-2.4.20-8-i386.rpm.
3. Or you can try rpm -ivh --replacepkgs kernel-source-2.4.20-8-i386.rpm.
4. Or rpm -Uhv kernel-source-2.4.20-8-i386.rpm.

See here for more details - http://www.redhat.com/docs/manuals/l...pm-using.html:
Quote:

What you don't see above is that RPM automatically uninstalled any old versions of the foo package. In fact you may want to always use -U to install packages, since it works fine even when there are no previous versions of the package installed.
In this train of thoughts last one (4.) seems like the best way for me, however "Nothing is ever foolproof." Keep this in mind, just in case... ;)

P.S. To be sure that your current tree is replaced afterwards you can create one empty file called 'test' (touch test) or something inside /usr/src/linux before starting this procedure (or change EXTRAVERSION in Makefile, or...). If this file is not there, well, the source tree was replaced. If not...

leavingwindows 10-09-2003 10:47 PM

it works now
 
Ok. I did everything you said. I removed the source and put it back. Without executing make configure or dep or anything, I went ahead and recompiled and installed the drivers. Now I'm online in linux and can give up on Windoze98! Many many thanx!


All times are GMT -5. The time now is 08:22 PM.