linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux 2.6 kernel module compilation without using KBUILD
@ 2007-11-28  6:11 murtuja bharmal
  2007-11-28 10:00 ` Adam T. Bowen
  0 siblings, 1 reply; 2+ messages in thread
From: murtuja bharmal @ 2007-11-28  6:11 UTC (permalink / raw)
  To: linux-admin

Hello All,
   
I want to compile external linux kernel module without
using KBUILD.
I tried to find out whole process of kernel module
compilation using KBUILD after enabling flag 
KBUILD_VERBOSE=1.
   
If we look at 2.6 kernel module building process.
   
1. gcc is making ".hello.o.d" and ".tmp_hello.o"
   from "hello.c" file.
2. Creating "hello.o" file using ".hello.o.d"
   and ".tmp_hello.o". 
3. Running Script "scripts/mod/modpost" to
   create "hello.mod.c" using “hello.o”.
4. gcc is making "hello.mod.o" after compiling 
   "hello-mod.c" file.
5. finally "ld" is linking "hello.o"
   and "hello.mod.o" and making "hello.ko". 
   
Step 2 of above process is not very much cleared, how
it is making hello-2.o from ".hello.o.d" and
".tmp_hello.o".

What is ".tmp_hello.o”.
   
Do we have any document which describe how to make
kernel module without using KBUILD.
   
Any pointer of information is very helpful for me.
   
Thanks 
Murtuja Bharmal



      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linux 2.6 kernel module compilation without using KBUILD
  2007-11-28  6:11 Linux 2.6 kernel module compilation without using KBUILD murtuja bharmal
@ 2007-11-28 10:00 ` Adam T. Bowen
  0 siblings, 0 replies; 2+ messages in thread
From: Adam T. Bowen @ 2007-11-28 10:00 UTC (permalink / raw)
  To: linux-admin

Hi,

murtuja bharmal wrote:
> I want to compile external linux kernel module without
> using KBUILD.

[snip]

> Do we have any document which describe how to make
> kernel module without using KBUILD.
>   
> Any pointer of information is very helpful for me.

There is a free O'Reilly book on building kernel modules:

http://lwn.net/Kernel/LDD3/

And there is also The Linux Kernel Module Programming Guide:

http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html

which has a whole section on creating your own makefiles for modules
that are not part of the kernel: 2.2. Compiling Kernel Modules.

Cheers

Adam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-28 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28  6:11 Linux 2.6 kernel module compilation without using KBUILD murtuja bharmal
2007-11-28 10:00 ` Adam T. Bowen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).