error while trying to compile realtek8168 network driver package
I am trying to install the driver for realtek network 8111c chip on Linux kernel2.6.9-34ELsmp. I downloaded the package, unpacked the distribution and tried to compile but run into this error when I do a make all.
makefile details below......... make -C src/ clean make[1]: Entering directory `/root/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/r8168-8.008.00/src' make -C src/ modules make[1]: Entering directory `/root/r8168-8.008.00/src' make -C SUBDIRS=/root/r8168-8.008.00/src modules make: *** SUBDIRS=/root/r8168-8.008.00/src: No such file or directory. Stop. make: Entering an unknown directorymake: Leaving an unknown directorymake[1]: *** [modules] Error 2 make[1]: Leaving directory `/root/r8168-8.008.00/src' make: *** [modules] Error 2 [root@localhost r8168-8.008.00]# ls Makefile readme release_note.txt src Top level makefile ################################################################################ all: clean modules install modules: $(MAKE) -C src/ modules clean: $(MAKE) -C src/ clean install: $(MAKE) -C src/ install [root@localhost r8168-8.008.00]# cd src [root@localhost src]# ls Makefile Makefile_linux24x r8168.h r8168_n.c [root@localhost src]# Makefile ################################################################################ KVER := $(shell uname -r) KDIR := /lib/modules/$(KVER)/build KMISC := /lib/modules/$(KVER)/kernel/drivers/net/ KEXT := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o KFLAG := 2$(shell echo $(KVER) | sed -ne 's/^2\.[4]\..*/4/p')x modules: ifeq ($(KFLAG),24x) $(MAKE) -f Makefile_linux24x else $(MAKE) -C SUBDIRS=$(PWD)/src modules strip --strip-debug r8168.$(KEXT) endif clean: |
Hmmm. I would first try
cd /root/r8168-8.008.00 make modules The '-C' makes it do a cd there before building. It seems to be attempting to cd into the src directory when it is already there. I am taking it the Makefile is in /root/r8168-8.008.00, and the .c and .h files in /root/r8168-8.008.00/src/ As a side point, it's safer not to build as root; build as a luser, install as root. |
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 |
I presume you have modules for that kernel in /lib/modules/<version>.
Make sure you are running on that kernel, as the package will use uname to detect the correct kernel /lib/modules/u.6.34whatever/build should point to the kernel source in /usr/src/linux-<version> ln -sf /usr/src/linux-2.6.9-34.ELsmp /lib/modules/2.6.9-34.ELsmp/build should accomplish that. Then we'll move on to the next error :). |
or while trying to compile realtek8168 network driver package
I dont have the kernel in /usr/src. It is empty.
This is what I have in /usr/lib/modules/2.6.9-34.Elsmp [root@localhost 2.6.9-34.ELsmp]# pwd /lib/modules/2.6.9-34.ELsmp [root@localhost 2.6.9-34.ELsmp]# ls kernel modules.dep modules.isapnpmap modules.usbmap modules.alias modules.ieee1394map modules.pcimap modules.ccwmap modules.inputmap modules.symbols I dont find a build directory. Do I have to change build to kernel in the makefile ? |
OK. So you have to install the kernel source. It's linux-something or kernel-something and has the word source in it. You can use the distro package, I used the tarball from kernel.org. 642Megs is the built kernel. It would shrink by 200 megs if I ran 'make clean'
bash-3.1$ du -sh linux* 642M linux-2.6.30.5 57M linux-2.6.30.5.tar.bz2 |
Okay I have installed the source for linux-2.6.32.1, so I have to compile this first.
Then I have to go into realtek directory and then compile from their so it gets compiled with the kernel. Then I have to restart the system with the new kernel, How do I do that? |
No, you start in the top source directory
cd /usr/src/linux-2.6.32 To save myself typing, this is good http://www.linuxfromscratch.org/lfs/...08/kernel.html |
error while trying to compile kernel source tree
I am trying to compile the linux kernel 2.6.32.1 and it fails with this error.
Any ideas [root@localhost linux-2.6.32.1]# make CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-x86 CALL scripts/checksyscalls.sh CHK include/linux/compile.h CC kernel/rcutree.o kernel/rcutree.c: In function `__rcu_init': kernel/rcutree.h:301: sorry, unimplemented: inlining failed in call to 'rcu_bootup_announce': function body not available kernel/rcutree.c:1740: sorry, unimplemented: called from here make[1]: *** [kernel/rcutree.o] Error 1 make: *** [kernel] Error 2 |
You need to update the system. If you're using Red Hat: yum update. If you're using Debian: apt-get update and then apt-get upgrade. If you're using a stock kernel, all the network device modules would ordinarily be compiled.
|
am trying to compile the linux kernel 2.6.32.1 and it fails with this error.
Any ideas [root@localhost linux-2.6.32.1]# make CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-x86 CALL scripts/checksyscalls.sh CHK include/linux/compile.h CC kernel/rcutree.o kernel/rcutree.c: In function `__rcu_init': kernel/rcutree.h:301: sorry, unimplemented: inlining failed in call to 'rcu_bootup_announce': function body not available kernel/rcutree.c:1740: sorry, unimplemented: called from here make[1]: *** [kernel/rcutree.o] Error 1 make: *** [kernel] Error 2 |
To me, this looks like a versions issue. This box, for example, runs slackware-12.0. I am shy of updating it because it has an old Nvidia card, and I _can't_ update the driver for that. I recently threw in alsa-utils-1.0.18 in place of 1.0.14, and alsactl wouldn't work, throwing up a similar message
Have you recently updated something? |
error while compiling kernel
Ni I havent updated anything, I am running RHAS4 enterprise version.
|
error compiling r8168 driver on linux
Okay: Let me start I have downloaded the r8168 package and unpacked in tie root directory.
Pls take a look at these two makefiles. [root@prashanth r8168-8.008.00]# ls Makefile readme release_note.txt src all: clean modules install modules: $(MAKE) -C src/ modules clean: $(MAKE) -C src/ clean install: [root@prashanth r8168-8.008.00]# cd src [root@prashanth src]# ls Makefile Makefile~ Makefile_linux24x r8168.h r8168_n.c KVER := $(shell uname -r) KDIR := /lib/modules/$(KVER)/build KMISC := /lib/modules/$(KVER)/kernel/drivers/net/ KEXT := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o KFLAG := 2$(shell echo $(KVER) | sed -ne 's/^2\.[4]\..*/4/p')x modules: ifeq ($(KFLAG),24x) $(MAKE) -f Makefile_linux24x else $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)/src modules strip --strip-debug r8168.$(KEXT) endif clean: rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order install: install -m 744 -c r8168.$(KEXT) $(KMISC) ifneq ($(KFLAG),24x) r8168-objs := r8168_n.o obj-m += r8168.o endif#($(KFLAG),24x) ---------------------------------------------------------------------------------- Below is the the structure of my /lib/modules. Initially the /lib/modules/build was empty. I made a symbolic link from /usr/src/redhat/BUILD/kernel-2.6.9 to this location. I compiled the kernel and it successfully compiled. I then tried to run make modules from /root/r8168-8.008.00 but I run into this error. [root@prashanth r8168-8.008.00]# make modules make -C src/ modules make[1]: Entering directory `/root/r8168-8.008.00/src' make -C /lib/modules/2.6.9-34.ELsmp/build SUBDIRS=/root/r8168-8.008.00/src modules make[2]: Entering directory `/lib/modules/2.6.9-34.ELsmp/build' make[2]: *** No rule to make target `modules'. Stop. make[2]: Leaving directory `/lib/modules/2.6.9-34.ELsmp/build' make[1]: *** [modules] Error 2 make[1]: Leaving directory `/root/r8168-8.008.00/src' make: *** [modules] Error 2 [root@prashanth 2.6.9-34.ELsmp]# pwd /lib/modules/2.6.9-34.ELsmp [root@prashanth 2.6.9-34.ELsmp]# ls build modules.ccwmap modules.inputmap modules.symbols kernel modules.dep modules.isapnpmap modules.usbmap modules.alias modules.ieee1394map modules.pcimap contents of /lib/modules/build after making the symbolic link [root@prashanth linux-2.6.9]# ls arch Documentation ipc mm scripts vmlinux configs drivers kernel Module.symvers security COPYING fs lib net sound CREDITS include MAINTAINERS README System.map crypto init Makefile REPORTING-BUGS usr |
I always get a headache grokking this stuff. Any programmer reading this, you are wanted!
Out of that build thing, this is the key line make -C /lib/modules/2.6.9-34.ELsmp/build SUBDIRS=/root/r8168-8.008.00/src modules I take it you are in /root/r8168-8.008.00/ and there is a Makefile there. The make command will start reading that, after doing a cd to /lib/modules/2.6.9-34.ELsmp/build which should be your kernel top source. What I think is happening is that it then looks for a src directory in the kernel source. So give it one in /lib/modules/2.6.9-34.ELsmp/build. ln -s /root/r8168-8.008.00/src src If it throws an error looking for a src/src directory, change that symlink to /root/r8168-8.008.00/ Is the kernel version your box is running on exactly the same as the kernel version you are building? It has to be. |
All times are GMT -5. The time now is 04:21 AM. |