3

I have patched a file for my wifi driver in net/wireless/drivers/zd1211rw/, and I couldn't get it to compile just that driver. so I backed up into the main directory of my linux kernel source, and issued the command make modules. It is taking forever, even though I have a quad core, so is there any way I can tell it specifically to just compile the wireless drivers? or even just zd1211rw?

Thanks. I have 3.2.0.

4
  • 1
    the majority of the procedure is documented here: codewhirl.com/2012/04/… if anyone wants some easy rep Sep 22, 2012 at 0:08
  • hum so I just tried it, and it is not what I am looking for. Because when I get to the command make EXTRAVERSION=-21-generic O=/usr/src/mytree modules SUBDIRS=scripts it starts at the beginning, and compiles every single module [starting with arch/], which is what I am already doing now. Thanks anyway though. My modules are still compiling, and it has reached the zd1211rw folder, but so far there is no .ko file, just an zd1211rw.o file. I guess it makes .ko's at the end?
    – Matt
    Sep 22, 2012 at 1:03
  • iirc you can skip that line Sep 22, 2012 at 1:11
  • Thank you, that linked showed me how to do it; I answered my own question
    – Matt
    Oct 21, 2012 at 3:21

1 Answer 1

3

Set up for compiling:

extraversion="-"$(uname -r|sed 's/[0-9].[0-9].[0-9]-//' ) # extraversion in 3.5.0-17-generic is -17-generic
mkdir ~/tmp/build/
cd ~/tmp/build/
cp /boot/config-`uname -r`  .config
cp /usr/src/linux-headers-3.5.0$extraversion/Module.symvers ./
cd /usr/src/linux-source-3.5.0/
make EXTRAVERSION=$extraversion O=~/tmp/build oldconfig
make EXTRAVERSION=$extraversion O=~/tmp/build prepare
make EXTRAVERSION=$extraversion O=~/tmp/build outputmakefile
make EXTRAVERSION=$extraversion O=~/tmp/build archprepare
make EXTRAVERSION=$extraversion O=~/tmp/build modules SUBDIRS=scripts

Now you are ready. To compile module put in the folder of its location. For zd1211

make EXTRAVERSION=$extraversion O=~/tmp/build/ modules SUBDIRS=drivers/net/wireless/zd1211rw

cd into ~/tmp/build/drivers/net/wireless/zd1211rw/ to find the .ko file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .