[ubuntu-uk] Non-default driver

Rowan rowan.berkeley at googlemail.com
Mon Mar 2 14:49:42 GMT 2009



Al, this is exactly the sort of thing that made me ask over and over for 
hands-on help - which would not only be more likely to succeed but would 
be faster than all this online discussion.

 Alan Pope wrote:
> 2009/3/2 Rowan <rowan.berkeley at googlemail.com>:
>   
>> Sean, is "make clean modules" an instruction you type in? I assumed it
>> was an instruction to ME, to make them clean somehow.
>>
>>     
>
> It is a command, yes. However I just tried it here using that driver
> and it fails, because the (realtek - not LC) seem to have hard-wired
> the kernel version in the Makefile.
>
> Note:-
>
> root at mpc-xubuntu:/root/lc2000# grep KVER r8168-8.008.00/src/Makefile
> KVER            := 2.6.25.17
>
> So when you come to run the "make clean modules" command it will fail thusly:-
>
> root at mpc-xubuntu:/root/lc2000/r8168-8.008.00# make clean modules
> make -C src/ clean
> make[1]: Entering directory `/root/lc2000/r8168-8.008.00/src'
> rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
> .tmp_versions Module.symvers Modules.symvers *.order
> make[1]: Leaving directory `/root/lc2000/r8168-8.008.00/src'
> make -C src/ modules
> make[1]: Entering directory `/root/lc2000/r8168-8.008.00/src'
> make -C /lib/modules/2.6.25.17/build
> SUBDIRS=/root/lc2000/r8168-8.008.00/src modules
> make: Entering an unknown directory
> make: *** /lib/modules/2.6.25.17/build: No such file or directory. Stop.
> make: Leaving an unknown directory
> make[1]: *** [modules] Error 2
> make[1]: Leaving directory `/root/lc2000/r8168-8.008.00/src'
> make: *** [modules] Error 2
>
> (Note it's looking for /lib/modules/2.6.25.17/build which wont exist
> on my system (and probably yours) because that's not a kernel I've
> ever used - and certainly don't currently).
>
> If you're lucky then perhaps LC have modified the file already from
> the version shipped by RealTek, (I don't have an LC machine to check
> this) and so that command above may well work. However what I did was
> modify the file /root/lc2000/r8168-8.008.00/src/Makefile to change the
> following line from:-
>
> KVER            := 2.6.25.17
>
> to:-
>
> KVER            := `uname -r`
>
> This means that when you run the "make" commands in their guide, it
> will determine at runtime what the current kernel version is - which
> is what the command "uname -r" does:-
>
> root at mpc-xubuntu:/root/lc2000/r8168-8.008.00# uname -r
> 2.6.27-11-generic
>
> So now, when I run the command they recommend, it works (unlike
> earlier where it failed to find 2.6.25.17):-
>
> root at mpc-xubuntu:/root/lc2000/r8168-8.008.00# make clean modules
> make -C src/ clean
> make[1]: Entering directory `/root/lc2000/r8168-8.008.00/src'
> rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
> .tmp_versions Module.symvers Modules.symvers *.order
> make[1]: Leaving directory `/root/lc2000/r8168-8.008.00/src'
> make -C src/ modules
> make[1]: Entering directory `/root/lc2000/r8168-8.008.00/src'
> make -C /lib/modules/`uname -r`/build
> SUBDIRS=/root/lc2000/r8168-8.008.00/src modules
> make[2]: Entering directory `/usr/src/linux-headers-2.6.27-11-generic'
>   CC [M]  /root/lc2000/r8168-8.008.00/src/r8168_n.o
> /root/lc2000/r8168-8.008.00/src/r8168_n.c: In function ârtl8168_downâ:
> /root/lc2000/r8168-8.008.00/src/r8168_n.c:4494: warning: unused
> variable âpoll_lockedâ
> /root/lc2000/r8168-8.008.00/src/r8168_n.c: At top level:
> /root/lc2000/r8168-8.008.00/src/r8168_n.c:2420: warning:
> ârtl8168_phy_power_downâ defined but not used
> /root/lc2000/r8168-8.008.00/src/r8168_n.c:3834: warning:
> ârtl8168_reinit_taskâ defined but not used
>   LD [M]  /root/lc2000/r8168-8.008.00/src/r8168.o
>   Building modules, stage 2.
>   MODPOST 1 modules
>   CC      /root/lc2000/r8168-8.008.00/src/r8168.mod.o
>   LD [M]  /root/lc2000/r8168-8.008.00/src/r8168.ko
> make[2]: Leaving directory `/usr/src/linux-headers-2.6.27-11-generic'
> strip --strip-debug r8168.ko
> make[1]: Leaving directory `/root/lc2000/r8168-8.008.00/src'
>
> Note that it now uses 2.6.27-11-generic which (as you see from uname
> -r above) is the kernel I am running. I have not installed it because
> my ,machine doesn't have that chipset so the driver would be
> redundant, but I just wanted you to see what happens when you run the
> command so you know what output to expect.
>
> Note: In the pasted output above, ignore the odd accented characters,
> these are an artifact of the way I am connected to my server.
>
> Cheers,
> Al.
>
>   




More information about the ubuntu-uk mailing list