Configurar para compilar:
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
Agora você está pronto. Para compilar o módulo colocado na pasta de sua localização. Para zd1211
make EXTRAVERSION=$extraversion O=~/tmp/build/ modules SUBDIRS=drivers/net/wireless/zd1211rw
cd em ~ / tmp / build / drivers / net / wireless / zd1211rw / para encontrar o arquivo .ko.