LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   MEPIS (http://www.linuxquestions.org/questions/mepis-64/)
-   -   How to compile driver for Realtek 8168 ethernet controller in Mepis 7.0 64 release? (http://www.linuxquestions.org/questions/mepis-64/how-to-compile-driver-for-realtek-8168-ethernet-controller-in-mepis-7-0-64-release-634895/)

MikeB23930 04-12-2008 12:24 PM

How to compile driver for Realtek 8168 ethernet controller in Mepis 7.0 64 release?
 
I am unable to get the onboard ethernet card in my in Asus M3A78-EMH HDMI motherboard to work. Mepis 7.0 64 smp installs the r8169. I gather from the web that this card needs the r8168 driver. I have downloaded the linux drivers from the Asus website. When I try to follow the instructions to complie the r8168 driver I get an error that there is no module rule. See readme file below. Any help anyone could offer would be greatly appreciated.

Thanks

Mike

Readme file:

<Linux device driver for Realtek Ethernet controllers>

This is the Linux device driver released for RealTek RTL8168B/8111B
and RTL8168C/8111C, Gigabit Ethernet controllers with PCI-Express
interface.

<Requirements>

- kernel source tree (supported Linux kernel 2.6.x)
- compiler/binutils for kernel compilation

<Quick install with proper kernel settings>

Unpack the tarball :
# tar vjxf r8168-8.aaa.bb.tar.bz2

Change to the directory:
# cd r8168-8.aaa.bb

If you are running the target kernel, then you should be able to do :

# make clean modules (as root or with sudo)
# make
# make install
# depmod -a
# insmod ./src/r8168.ko

You can check whether the driver is loaded by using following commands.

# lsmod | grep r8168
# ifconfig -a

If there is a device name, ethX, shown on the monitor, the linux
driver is loaded. Then, you can use the following command to activate
the ethX.

# ifconfig ethX up

,where X=0,1,2,...

<Set the network related information>
1. Set manually
a. Set the IP address of your machine.

# ifconfig ethX "the IP address of your machine"

b. Set the IP address of DNS.

Insert the following configuration in /etc/resolv.conf.

nameserver "the IP address of DNS"

c. Set the IP address of gateway.

# route add default gw "the IP address of gateway"

2. Set by doing configurations in /etc/sysconfig/network-scripts
/ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network
/ifcfg-ethX for SuSE. There are two examples to set network
configurations.

a. Fix IP address:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.1
GATEWAY=192.168.1.254
BROADCAST=192.168.1.255

b. DHCP:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

<Modify the MAC address>
There are two ways to modify the MAC address of the NIC.
1. Use ifconfig:

# ifconfig ethX hw ether YY:YY:YY:YY:YY:YY

,where X is the device number assigned by Linux kernel, and
YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

2. Use ip:

# ip link set ethX address YY:YY:YY:YY:YY:YY

Brian1 04-12-2008 01:55 PM

I don't understand. I see the install docs but is the exact error you are getting and at which step in the install process.

Brian

MikeB23930 04-12-2008 03:13 PM

Reply to Brian1
 
Quote:

Originally Posted by Brian1 (Post 3119215)
I don't understand. I see the install docs but is the exact error you are getting and at which step in the install process.

Brian

The error is:

*** No rule to make target `modules'. Stop

Complete output of the first make command below.

Thanks,

Mike

Output of first make command:

# make clean modules
make -C src/ clean
make[1]: Entering directory `/home/mikeb/Desktop/r8168-8.005.00/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers rset
make[1]: Leaving directory `/home/mikeb/Desktop/r8168-8.005.00/src'
make -C src/ modules
make[1]: Entering directory `/home/mikeb/Desktop/r8168-8.005.00/src'
make -C /lib/modules/2.6.22-1-mepis64-smp/build SUBDIRS=/home/mikeb/Desktop/r8168-8.005.00/src modules
make[2]: Entering directory `/lib/modules/2.6.22-1-mepis64-smp/build'
make[2]: *** No rule to make target `modules'. Stop.
make[2]: Leaving directory `/lib/modules/2.6.22-1-mepis64-smp/build'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/mikeb/Desktop/r8168-8.005.00/src'
make: *** [modules] Error 2

Brian1 04-13-2008 09:25 AM

Skip the first make modules clean command and start with the second and go from there. I am not sure what the error means at the moment. Just wondering if the make which will build the new module off the kernel source which is located in /usr/src/2.6.22-1-mepis64-smp. Does that directory exist for the kernel source?

Brian

MikeB23930 04-13-2008 12:15 PM

Reply to Brian1
 
Quote:

Originally Posted by Brian1 (Post 3119853)
Skip the first make modules clean command and start with the second and go from there. I am not sure what the error means at the moment. Just wondering if the make which will build the new module off the kernel source which is located in /usr/src/2.6.22-1-mepis64-smp. Does that directory exist for the kernel source?

Brian

Brian,

The folder /usr/src/2.6.22-1-mepis64-smp doesn't exist. The linux-source-2.6.22.tar.bz2 file is in the folder /usr/src.

There is a folder 2.6.22-1-mepis64-smp in /lib/modules/. That folder contains a bunch of files with names like modules.ccwmap, modules.pcimap and so on that suggest to me that they may be needed to build different types of modules. This in turn suggests that the necessary files may be on my computer, just not where the make file is looking for them. Assuming this is right, can you tell me how to point the make command to the correct locations?

As always, thanks for your help.

Mike

Brian1 04-13-2008 12:36 PM

I don't know anything about Mepis but in fedora kernel version naming must be exact. So to me the 2.6.22-1 is not the same as 2.6.22 as in /usr/src. I wonder if you have updated the kernel and do not have the source for the newer kernel.

Brian

MikeB23930 04-13-2008 03:06 PM

Reply to Brian1
 
Quote:

Originally Posted by Brian1 (Post 3120016)
I don't know anything about Mepis but in fedora kernel version naming must be exact. So to me the 2.6.22-1 is not the same as 2.6.22 as in /usr/src. I wonder if you have updated the kernel and do not have the source for the newer kernel.

Brian

The 2.6.22-1 kernel is the one that shipped on the live/installation CD. The only kernel source files I can find in the repos are linux-tree-2.6.22 and linux-tree-2.6.18. The linux-tree-2.6.22 fails to download with the message:

linux-tree-2.6.22:
Depends: linux-patch-debian-2.6.22 (=2.6.22-18mepis1) but it is not installable

Thanks for the help.

Mike

Brian1 04-13-2008 03:22 PM

Unsure exactly what to do from here on a Mepis distro.

Brian

sivaraj 04-17-2008 03:42 AM

If you have dual boot with Windows try Wake up on LAN - Enable.
No blinking lamp on the LAN port after boot up indicates mostly this issue.
see this link. ubuntuforums.org/showthread.php?t=538448&page=4

This worked for me for RTL8111 LAN chip with Gigabyte motherboard and just works with module 8139 .No need to compile new driver.

mylvarab 12-13-2009 05:30 AM

unable to compile realtek 8168 package on kernel 2.6.9-34.ELsmp
 
Has anybody tried to compile the realtek 8168 driver package on linux kernel 2.6.9-34.ELsmp. make tried to cd into lib/modules/2.6.9-34.ELsmp/build....this build directory does not exist. I am not sure what the contents are in the build directory but when I cd lib/modules/2.6.9-34.ELsmp I dont see a build directory there.

Any ideas..


[root@localhost r8168-8.011.00]# make
make -C src/ clean
make[1]: Entering directory `/home/mylvarab/r8168-8.011.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 `/home/mylvarab/r8168-8.011.00/src'
make -C src/ modules
make[1]: Entering directory `/home/mylvarab/r8168-8.011.00/src'
make -C /lib/modules/2.6.9-34.ELsmp/build SUBDIRS=/home/mylvarab/r8168-8.011.00/src modules
make: *** /lib/modules/2.6.9-34.ELsmp/build: No such file or directory. Stop.
make: Entering an unknown directorymake: Leaving an unknown directorymake[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/mylvarab/r8168-8.011.00/src'
make: *** [modules] Error 2


All times are GMT -5. The time now is 09:00 AM.