Help Require for makeing 2.6 kernel makefile
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 47 lines · --- Sam Ravnborg
Quoted 3 lines · murtuja bharmal
Hello Sam,
Can we write a kernel makefile using KBUILD to
make
Quoted 1 line
kernel module, for which source file are in
different
Quoted 4 lines
directory.
For example.
In Directory “test1/” I have a two fileHello1.cand
Quoted 2 lines
Hello2.c
First I want to make Hello1.o and Hello2.o andafter
Quoted 4 lines
linking it will be Hello3.o.
For Hello3.o output directory will be “test2/”In Directory “test4/” I have a file
Hello4.c,after
Quoted 6 lines
compiling, it will be Hell4.o.
For Hello4.o Output directory will be “test2/”. Now after linking Hell1.o and Hello4.o. I want to make Hello.ko in directory “test5/”.Can we have separate makefile for “test1” and
“test4”
Quoted 1 line
directory.
You cannot achieve exactly what you want - sorry.
test1/Makefile would look like this:
obj-m := Hello3.o
Hello3-y := Hello1.o Hello2.otest4/Makefile would look like this:
obj-m := Hello4.oYou could create a
Makefilein the directory
above test1/ and test4/ that looks like this:obj-m := test1/ test4/
So you could build both modules in one go.
And then you could use makemodules_installto
install them.
Quoted 8 lines
Hope this helps.
PS. Please post such questions to
[email protected].
We are a community so use it.Sam
Hi,
Actually problem is I have 2000 source file for
single kernel module with 2.4 kbuild architecture. All this source file are in different directory sturcture.
I can not split this in to multiple modules. And In 2.4 makefile it is not tightly binded with kbuild.
It is like complining some file and linking it, putting it in some directory and so on and finally making module from all linked files.
It has near about 100 makefiles for 2.4 architecture.
Now I m not able to findout the way how I will achive this with 2.6 kbuild system because in all directory there is one makefile, which is making intermidiate object file, say form 10 source file, then again at last we are linking all this intermidate object file and making a single module.
Murtuja
Meet people who discuss and share your passions. Go to http://in.promos.yahoo.com/groups
Quoted 4 lines
Actually problem is I have 2000 source file for
single kernel module with 2.4 kbuild architecture. All this source file are in different directory sturcture.
A big module I must say...
Take a look at fs/xfs/
they have source scattered over a few directories. But you will require a single kbuild file listing all the .o file that is generated.
But with the dense syntax used by kbuild that should not be a problem.
If you continue to struggle upload the code somwhere and let us take a look.
Sam
Hi Murtuja.
Did you manage to get your huge module to build with
a 2.6 kernel - or at least did you get your kbuild stuff done correct?
Sam