LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-22-2004, 06:14 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
compiling a module (ndiswrapper)


sorry if this has been asked a hundred times -- I just want to be sure I'm doing this right...

The installation instructions for ndiswrapper want /lib/modules/VERSION/build to be a link to the kernel sources. Right now, my /lib/modules/VERSION/build is a link to the kernel headers, so I used Synaptic to install the kernel sources. Now, the kernel source is still in a tar.bz file. Should I leave it that way, or use tar to unpack it?

Also, should I delete /lib/modules/VERSION/build and make a new one linking to the kernel sources?

Will doing that "break" anything else?

edit: on second thought, should I delete the kernel-headers? are they included in the kernel-source?


Last edited by r.stiltskin; 10-22-2004 at 06:42 PM.
 
Old 10-22-2004, 09:25 PM   #2
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,248

Rep: Reputation: 79
You need to unpack the source and symbolic link it to /usr/src/linux:
Code:
cd /usr/src
tar -jxf kernel-source-2.4.26.tar.bz2
rm linux
ln -s kernel-source-2.4.26 linux
 
Old 10-22-2004, 09:38 PM   #3
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,248

Rep: Reputation: 79
Also, installation instructions are here: http://ndiswrapper.sourceforge.net/w...p/Installation

I got ndiswrapper working on my laptop, but I was using a kernel that I actually compiled, so I'm not sure about making the symbolic links to modules manually.

If you want to do it the same way that I did, you can compile a kernel as described here:

http://www.linuxquestions.org/questi...hreadid=206992

It is for the 2.6.7 kernel, but the same stuff generally applies to the 2.4.x kernel except you don't need the psmouse driver or /sys directory. After compiling, you can install ndiswrapper as described here:

http://www.linuxquestions.org/questi...hreadid=227055

Hope that helps somewhat. It is pretty tricky getting wireless working.
 
Old 10-23-2004, 01:45 AM   #4
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Thanks, I'm sure that'll be helpful when I'm ready to compile a new kernel, but for now I have to keep the 2.4 kernel so there doesn't seem to be much point in recompiling it.

So, I followed these instructions:
Quote:
apt-get install kernel-image-2.6.8-1-386 kernel-source-2.6.8 kernel-package libncurses5-dev

cd /usr/src

tar xvjf kernel-source-2.6.8

cd kernel-source-2.6.8

cp /boot/config-2.6.8-1-386 .config (This is from the kernel-image you just installed)

make oldconfig (I do not know if this is neccessary...)

make-kpkg --revision=1 --append-to-version=-1-386 kernel_headers (this should take three or four minutes)

(if the previous command fails, try "make-kpkg clean" and then re-run)

And now you have a source-tree that is needed to make the ndiswrapper debs. Make a symlink /lib/modules/2.6.8-1-386/build to your kernel-source tree. Reboot into your new kernel. (if neccessary)
(well, I already had 2.4.26-6 versions of kernel-headers and kernel-source and the latest libncurses5-dev, so I ignored those & installed the 2.4.26-6 kernel-image and happily after rebooting everything still seems to work.) I also installed fakeroot and debhelper and kernel-package, & then i was able to follow the rest of those instructions & they all worked.

But I'm wondering what make oldconfig and make-kpkg actually did. Can anyone explain those?


As for the rest, I didn't bother making the script; i just ran from the shell prompt:

cd /usr/src
tar xfz ndiswrapper-source.tar.gz
cd modules/ndiswrapper
fakeroot debian/rules binary
dpkg -i ../ndiswrapper-*.deb

Finally I verified that I can modprobe ndiswrapper and -- miracle of miracles -- lsmod shows that it was installed.

Now I have to see if I can actually do anything with it.

 
Old 10-23-2004, 03:14 PM   #5
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,248

Rep: Reputation: 79
"make oldconfig" is used when you upgrade a kernel. You copy the old .config file to the new kernel, the run "make oldconfig". It keeps the options you had for the previous kernel version and only asks you questions for new options that are available with the new version.

"make-kpkg" compiles your kernel-headers. If you used "kernel_image" instead of "kernel_headers", you would have compiled a new kernel to install instead.
 
  


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
ndiswrapper module not loadable quarry_06 Linux - Wireless Networking 9 08-10-2005 09:25 PM
ndiswrapper: unsupported module toddncl Linux - Wireless Networking 14 04-30-2005 08:35 AM
Missing ndiswrapper module Norky Linux - Wireless Networking 0 05-08-2004 08:28 AM
need help with ndiswrapper module marzojl Linux - Wireless Networking 6 02-14-2004 03:42 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:52 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