El Fri, Jan 09, 2009 at 09:38:26PM +1100 Microbit_Ubuntu ha dit:
> First of all, in the meantime I discovered that it's NOT the timer
> code... A simple module entry and exit with a printk() will cause a
> (very) occasional fault in free_module().
>
> It seems the problem is solved by using modpost through make.
> I've scoured on Google but I can't seem to readily find proper
> documentation on the usage of the "obj -m += xxxx.o" command in a
> makefile ?
>
> I've got several books such as Linux Bible (2006 edition), Linux Device
> Drivers 2nd edition and Understanding the Linux Kernel 3rd edition.
> However, not a single one mentions the "obj -m" command. One book
> briefly mentions the structure (basic) of a Makefile, that's it.
>
> Does anyone know where I can find a good description of Makefile, with
> better explanation of this command above ?
>
> Naturally something was incomplete when I manually added in the
> __this_module struct and so on.
>
> All I seem to need for now is a Makefile in my module source directory
> containing :
> obj-m += test.o
> (I only have 1 dependency so far, just for testing&studying)
>
> If I source the linux_cross_compile, setting the environment vars, and call
> from there :
> k...@ubuntu:~/Documents/linux-2.6.26.3-at91-olimex$ make M=~/test
> I get proper module code it seems :
>
> LD /home/kris/test/built-in.o
> CC [M] /home/kris/test/test.o
> Building modules, stage 2.
> MODPOST 1 modules
> CC /home/kris/test/test.mod.o
> LD [M] /home/kris/test/test.ko
>
>
> If anyone can get me going on how this magical "obj -m += test.o works, I'd
> be grateful
obj-m ist not a command, it's a Makefile target used by the kernel
build system. it serves to specify the object files needed to build a
module
for more details have a look at section 3.3 of
Documentation/kbuild/makefiles.txt
--
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona
Yo soy como soy y tú eres como eres, construyamos un mundo donde yo
pueda ser sin dejar de ser yo, donde tú puedas ser sin dejar de ser
tú, y donde ni yo ni tú obliguemos al otro a ser como yo o como tú
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ