On Wed, 2010-08-25 at 19:11 +0200, Philipp Thomas wrote:
* Roger Oberholtzer (roger@opq.se) [20100825 17:44]:
Isn't /lib/modules where the compiled things wind up? I did not think it was consulted when a module is being compiled.
A correctly written script as for instance the nvidia one uses that symlink as one of several possible plases to look for the sources. /lib/modules/$(uname -r)/build was introduced to point to the sources from which the modules for the specified kernel were built.
Things in /lib/modules have already completed the compilation step. So I am talking about earlier in the chain of events.
Have you actually looked at the output of
ls -ld /lib/modules/$(uname -r)/build
? I guess not as otherwise you wouldn't state the above. When compiling modules for a given kernel, the most interesting things are the path to the sources and the files generated when building the kernel. On an openSUSE system these differ because we want to build drivers for multiple kernel flavours from the same sources. Therefor the autogenerated files and the necessary makefile are stored below /usr/src/linux-obj/<architecture>/<kernel_flavour/ A correctly written script will use the second method described in the README.suse I mentioned to build an external module.
Philipp
I'm getting old. I had to refer to one of my own out-of-kernel Makefiles to see how I do it. These work in drivers I have on OBS that build for many openSUSE releases and Factory. I do this: KERNEL_BUILD := /lib/modules/`uname -r`/build obj-m := dc_photocell.o MAKEFLAGS += --no-print-directory modules modules_install clean: $(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@ So I was remembering wrong. Not the first time. But the vmware player makefile also uses the /lib/modules/`uname -r`/build idiom to locate things. So I can't figure why I have the problem discussed in the other thread about vmplayer kernel modules (not exactly the same problem as here). I am going to try the links the OP in this thread suggested about making links. I just need to get vmplayer running again. But I will be looking in to replacing it with virtual box. BTW, I blame OBS for my lapse of memory. You put things there and then they just keep getting rebuilt as new things come along. Who can remember things they are not required to fiddle with all the time :) -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org