LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices


Reply
  Search this Thread
Old 04-12-2008, 12:24 PM   #1
MikeB23930
LQ Newbie
 
Registered: Sep 2006
Posts: 6

Rep: Reputation: 0
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
 
Old 04-12-2008, 01:55 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 04-12-2008, 03:13 PM   #3
MikeB23930
LQ Newbie
 
Registered: Sep 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Reply to Brian1

Quote:
Originally Posted by Brian1 View Post
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

Last edited by MikeB23930; 04-12-2008 at 03:14 PM.
 
Old 04-13-2008, 09:25 AM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 04-13-2008, 12:15 PM   #5
MikeB23930
LQ Newbie
 
Registered: Sep 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Reply to Brian1

Quote:
Originally Posted by Brian1 View Post
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
 
Old 04-13-2008, 12:36 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 04-13-2008, 03:06 PM   #7
MikeB23930
LQ Newbie
 
Registered: Sep 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Reply to Brian1

Quote:
Originally Posted by Brian1 View Post
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
 
Old 04-13-2008, 03:22 PM   #8
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Unsure exactly what to do from here on a Mepis distro.

Brian
 
Old 04-17-2008, 03:42 AM   #9
sivaraj
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
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.
 
Old 12-13-2009, 05:30 AM   #10
mylvarab
LQ Newbie
 
Registered: Dec 2009
Posts: 18

Rep: Reputation: 0
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
 
  


Reply

Tags
compile, driver, mepis, realtek, smp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Realtek 8139/8168/8169 on 2.6.21.3 or newer Gato Azul Linux - Networking 6 05-05-2009 09:56 PM
Realtek 8168 driver problem delinne Linux - Hardware 5 07-16-2008 04:51 AM
Realtek 8111/8168 LAN Driver will not install on RHEL4.5 Astol Linux - Networking 6 05-08-2008 11:36 AM
Realtek 8168(AS) driver? blueskyhff Linux - Networking 2 03-01-2007 06:42 AM
RealTek 8168/8110 with fedora zolorin Linux - Hardware 0 09-07-2004 07:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration