-Whats wrong with the free articles at lwn.net?
There are new books that you are supposed to buy which will
tell you how to re-write all your modules to interface with
the new crap.
This is utterly crap.
I attached a typical makefile so you can see how complicated
this new crap is.
There is no difference in the Makefile being in-kernel or for an
external module if the Makefile is used solely to specify content of the
Module.
So for a sample module named mymodule you need:
Makefile:
obj-m := mymodule.o
mymodule-y := file1.o file2.o file3.o
Here assuming 3 files are needed to build the actual module.
If you then want some wrapping to make things a bit easier you can add a
second file:
makefile:
VERS := $(shell uname -r)
CDIR := $(shell pwd)
all:
$(MAKE) V=1 -C /usr/src/linux-$(VERS) SUBDIRS=$(CDIR) modules
strip -x -R .note -R .comment mymodule.ko
And nothing special is needed with respect to vermagic etc. The kernel
do it for you.
Please keep in mind the original poster did not ask for a method that
could be used for both 2.4 _and_ 2.6.
Sam