LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   error while trying to compile realtek8168 network driver package (https://www.linuxquestions.org/questions/linux-newbie-8/error-while-trying-to-compile-realtek8168-network-driver-package-775195/)

mylvarab 02-01-2010 10:13 AM

Yes, the kernel version is same , I successfully compiled it.

business_kid 02-02-2010 03:41 AM

did you make the symlink and try the compile again?

mylvarab 02-03-2010 05:17 AM

Yes, I did that it still does not work. Now what should be in the build directory that is my question. What is the Makefile looking for becuse it still errors

make[2]: Entering directory `/lib/modules/2.6.9-34.ELsmp/build'
make[2]: *** No rule to make target `modules'. Stop

Is there a specific module that it is looking for which I presume drivers , Right now this is what build location contains. This is the right version as it successfully compiles. So what is the Makefile from thr r8168 package trying to compile in this source tree.

[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

business_kid 02-04-2010 04:32 AM

Right. What they are trying to do is compile the source in /root with files in the kernel. There will be files in the C or C++ invoked this way

# include foo.h

These may be in the kernel source. They can also link in .o files, compiled kernel source, and make it pretend your new module is part of the kernel tree. the command ld stitches together all the small C files into your module. That's what's not happening.

You had this error.
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

try
grep -r rcu_bootup_announce *
in the kernel source, and in the driver source. Then we might know what's going on.

DontYouWish 05-24-2010 10:24 PM

Did you try running the Makefile from the parent directory?

I got this first from the /src directory Makefile
[root@localhost src]# make
make -C /lib/modules/2.6.18-194.3.1.el5/build SUBDIRS=/src/r8168-8.018.00/src/src modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-194.3.1.el5-x86_64'
scripts/Makefile.build:17: /src/r8168-8.018.00/src/src/Makefile: No such file or directory
make[2]: *** No rule to make target `/src/r8168-8.018.00/src/src/Makefile'. Stop.
make[1]: *** [_module_/src/r8168-8.018.00/src/src] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-194.3.1.el5-x86_64'
make: *** [modules] Error 2

Then I went to the highest directory in the extracted tree...


[root@localhost src]# cd ..
[root@localhost r8168-8.018.00]# make
make -C src/ clean
make[1]: Entering directory `/src/r8168-8.018.00/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers Module.markers *.order
make[1]: Leaving directory `/src/r8168-8.018.00/src'
make -C src/ modules
make[1]: Entering directory `/src/r8168-8.018.00/src'
make -C /lib/modules/2.6.18-194.3.1.el5/build SUBDIRS=/src/r8168-8.018.00/src modules
make[2]: Entering directory `/usr/src/kernels/2.6.18-194.3.1.el5-x86_64'
CC [M] /src/r8168-8.018.00/src/r8168_n.o
/src/r8168-8.018.00/src/r8168_n.c: In function ârtl8168_tx_clearâ:
/src/r8168-8.018.00/src/r8168_n.c:8073: warning: unused variable âdevâ
/src/r8168-8.018.00/src/r8168_n.c: In function ârtl8168_pollâ:
/src/r8168-8.018.00/src/r8168_n.c:8770: warning: cast from pointer to integer of different size
CC [M] /src/r8168-8.018.00/src/r8168_asf.o
CC [M] /src/r8168-8.018.00/src/rtl_eeprom.o
LD [M] /src/r8168-8.018.00/src/r8168.o
Building modules, stage 2.
MODPOST
CC /src/r8168-8.018.00/src/r8168.mod.o
LD [M] /src/r8168-8.018.00/src/r8168.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.18-194.3.1.el5-x86_64'
strip --strip-debug r8168.ko
make[1]: Leaving directory `/src/r8168-8.018.00/src'
make -C src/ install
make[1]: Entering directory `/src/r8168-8.018.00/src'
install -m 744 -c r8168.ko /lib/modules/2.6.18-194.3.1.el5/kernel/drivers/net/
make[1]: Leaving directory `/src/r8168-8.018.00/src'
[root@localhost r8168-8.018.00]#


and it built and installed. Now I have to figure out how to get this baby
into my ESXi 4.0U1 install disk so I can get that on my new system board GA-P55A-UD6


All times are GMT -5. The time now is 08:12 PM.