LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2003, 02:07 PM   #1
canfirman
LQ Newbie
 
Registered: Jul 2003
Distribution: Redhat 9
Posts: 6

Rep: Reputation: 0
Kernelsrc


Good day all.

Since I'm new to Linux, I could really use some help!

I'm installed Redhat 9 which had kernel 2.4.20-8. I downloaded drivers for my modem (it's a HSF modem) for my kernel version, and it worked fine.

I have just updated my kernel to 2.4.20-19.9. Unfortunately, nobody has precompiled modem drivers for this kernel version. So, I'm trying to re-install the HSF modem drivers by recompiling from source code.

However, when I run RPMBUILD --rebuild, I get the following error message:

common.mak:11: *** Is the kernel-source package installed? KERNELSRC does not point to a proper directory (/lib/modules/2.4.20-19.9/build). Stop.
make: *** [install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.16622 (%install)

Unfortunately, the link " /lib/modules/2.4.20-19.9/build" points to a directory that doesn't exist.

I assume I need to get the kernel somehow, but where do I get it, where dp I put it, and how do I put it there?

Any assistance on this matter would be greatly appreciated. Thanks.
 
Old 08-01-2003, 02:28 PM   #2
martinman
Member
 
Registered: Apr 2003
Distribution: Gentoo 1.4
Posts: 290

Rep: Reputation: 30
what that's saying is that you need the kernel source tree to be intact. redhat.com or ftp.redhat.com should have the kernel source package you're looking for.

Side note: you could also use the source provided by kernel.org, but all those kernels are "vanilla", where as RH kernels have many added features and the like to them. In the end, using a kernel.org source on a kernel you installed from rpm (most likely from RH themselves) wont work.
 
Old 08-01-2003, 02:53 PM   #3
canfirman
LQ Newbie
 
Registered: Jul 2003
Distribution: Redhat 9
Posts: 6

Original Poster
Rep: Reputation: 0
OK. I've downloaded the kernel (kernel-2.4.20-19.9.i686.rpm). So, do I now just install it using "rpm -u (or -i) kernel..."?

Thanks.
 
Old 08-01-2003, 02:58 PM   #4
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
Yes, read the README in your modem driver directory. In most cases u need to change path in Makefile in which you tell it where your source it. Usually, its in /usr/src/kernel-2.4.20-19.9/include

just look for source and you have to point your makefile to the "include" subdirectory. Hope it helps
 
Old 08-05-2003, 02:07 PM   #5
canfirman
LQ Newbie
 
Registered: Jul 2003
Distribution: Redhat 9
Posts: 6

Original Poster
Rep: Reputation: 0
OK. I must be missing something here, so please bear with me.

I downloaded the kernel version required, then tried to install it (first with -i, then with -U), but I get the following message:

[root@localhost root]# rpm -Uv kernel-2.4.20-19.9.i686.rpm
Preparing packages for installation...
package kernel-2.4.20-19.9 is already installed

So, I tried rebuilding the source package again. Here is the complete output:

[root@localhost root]# rpmbuild --rebuild hsflinmodem-5.03.27lnxtbeta03042700-1.src.rpm
Installing hsflinmodem-5.03.27lnxtbeta03042700-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.52784
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ cd /usr/src/redhat/BUILD
+ rm -rf hsflinmodem-5.03.27lnxtbeta03042700
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/hsflinmodem-5.03.27lnxtbeta03042700.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hsflinmodem-5.03.27lnxtbeta03042700
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.99966
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd hsflinmodem-5.03.27lnxtbeta03042700
+ LANG=C
+ export LANG
+ make --quiet --no-print-directory all
+ cp /usr/src/redhat/SOURCES/100498D_RM_HxF_Released.pdf .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.34138
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd hsflinmodem-5.03.27lnxtbeta03042700
+ LANG=C
+ export LANG
+ rm -rf /var/tmp/hsflinmodem-5.03.27lnxtbeta03042700-root
+ make --quiet --no-print-directory ROOT=/var/tmp/hsflinmodem-5.03.27lnxtbeta03042700-root install
common.mak:11: *** Is the kernel-source package installed? KERNELSRC does not point to a proper directory (/lib/modules/2.4.20-19.9/build). Stop.
make: *** [install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.34138 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.34138 (%install)


Does RPM unpackage the files to a directory and THEN performs the compile? If so, do I alter the makefile in that directory?

Still not getting it (sorry).

Thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KERNELSRC doesnt what? i need help! warheros Linux - Software 9 06-24-2003 02:20 AM


All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration