Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
1  
the majority of the procedure is documented here: codewhirl.com/2012/04/… if anyone wants some easy rep –  hbdgaf Sep 22 '12 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 '12 at 1:03
    
iirc you can skip that line –  hbdgaf Sep 22 '12 at 1:11
    
Thank you, that linked showed me how to do it; I answered my own question –  Matt Oct 21 '12 at 3:21

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.