[kbuild-devel] Stattically includeing a device driver

2002-02-18 Thread mithun_d

Hello All,

I want to know where all i have to make entries in the source code of 
linux so that while building the Linux kernel i can include my device 
driver in the kernel.

1. Where I have to write Makefile so that make utility can know to 
execute this Makefile. This Makefile is required for to create 
node.   /dev/mydev

2. Where i have to put my device driver source code.

3. Where i have to make entry so that make Xconfig can have this 
entry so that while configuring kernel it should appear.

More over Still where and what entier i have to make in the source file 
to statically include my device driver in the kernel.

Thanks in advance.

Bye,
Tks/Mithun.
_



___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: Stattically includeing a device driver

2002-02-18 Thread Peter Samuelson


[[EMAIL PROTECTED]]
 I want to know where all i have to make entries in the source code of
 linux so that while building the Linux kernel i can include my device
 driver in the kernel.

There are files in many of the directories of the kernel called
'Config.in'.  Find an appropriate one and add an entry for your driver.
Consult the file Documentation/kbuild/config-language.txt for the
formal definition of this file format, which is based on but NOT
equivalent to shell syntax.

 1. Where I have to write Makefile so that make utility can know to 
 execute this Makefile. This Makefile is required for to create 
 node.   /dev/mydev

Normally you do not create device files when building the kernel --
because the kernel may be (and in fact often is) built on a machine
other than the target where it will run.

Your best bet is to include the necessary 'mknod' command in your
documentation - the help entry, or a README that the help entry refers
to.  You really cannot rely on any sort of post-install script running,
except the module installation stuff in the main Makefile (but that's
no place to put mknod commands either).

 2. Where i have to put my device driver source code.

Find a subdirectory under the kernel source - probably something under
'drivers'.  If you only have one or two files that compile into your
driver, just drop it into a directory with similar stuff.  If it's
several files, you may wish to create your own subdirectory, which is a
bit more complicated because you have to write your own makefile
instead of just adding a line or two to an existing one.

 3. Where i have to make entry so that make Xconfig can have this 
 entry so that while configuring kernel it should appear.

See comment above about 'Config.in' files.  Also note that if you want
to provide a help text for the option, the file to do that is
'Config.help', which should be in the same directory as the Config.in
you are editing.

If you have trouble hacking the appropriate Config.in, Config.help and
Makefile files, please post a link to your current driver and we can
help you.  (Since you are talking about linking the driver statically
into the kernel, I know you are releasing it under the GPL anyway, as
per license requirements.)

 More over Still where and what entier i have to make in the source
 file to statically include my device driver in the kernel.

Depends on what type of driver.  If it's a network driver, you have to
add an entry to drivers/net/Space.c.  For a SCSI card driver, you do
something funky with including the scsi_module.c template.  For most
other drivers, you can just add the declaration

  module_init(your_init_function);

and that will be called automatically during boot.  You will need
linux/init.h.

*  *  *

A little grepping could have told you pretty much all of the above.
The source is your friend.  HTH,

Peter

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] Your opinion on CML2 and kbuild-2.5

2002-02-18 Thread Thomas Capricelli


 Personal I would like to see kbuild-2.5 included ASAP. Among other stuff
 I like the compressed output during compilation.

So do I. I like the clean design of kbuild-2.5 and i'm more than fine with 
the overall speed. 
I vote for inclusion in 2.5. As small as my vote can be considered...

Thomas

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: Disgusted with kbuild developers

2002-02-18 Thread Daniel Phillips

 . A Microsoft engineer wrote scripts/Configure.  For three years, I have
   lived in fear that Microsoft would notice this fact and use it to attack
   Linux through public relations channels or legal means.  They haven't yet,
   so I have been wrong so far.

Teehee.  I don't think you have anything to worry about, Microsoft would be
incredibly embarassed to admit they're contributing to 'problem number 1'.

-- 
Daniel

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: Disgusted with kbuild developers

2002-02-18 Thread Giacomo Catenazzi



Daniel Phillips wrote:

. A Microsoft engineer wrote scripts/Configure.  For three years, I have
  lived in fear that Microsoft would notice this fact and use it to attack
  Linux through public relations channels or legal means.  They haven't yet,
  so I have been wrong so far.

 
 Teehee.  I don't think you have anything to worry about, Microsoft would be
 incredibly embarassed to admit they're contributing to 'problem number 1'.


I agree, but we know some strange 'behaviour' of MS.
They have a lot of lawers, they can make us a lot of trouble.
(You will notice that there are no copyright statment on that file,
only the name of authors).

Remember the RMS (a flame with the word 'ESR' MUST have also the 'RMS' :-))
way to include 'free' patches: sign and send to FSF a piece of paper,
that the patches CAN be included.
I think nobody in Linux have done that, thus we can expect some
more troubles and microsoft is a large troubles-maker

giacomo


___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: Disgusted with kbuild developers

2002-02-18 Thread Alexander Viro



On Tue, 19 Feb 2002, Giacomo Catenazzi wrote:

 I agree, but we know some strange 'behaviour' of MS.
 They have a lot of lawers, they can make us a lot of trouble.
 (You will notice that there are no copyright statment on that file,
 only the name of authors).
 
 Remember the RMS (a flame with the word 'ESR' MUST have also the 'RMS' :-))
 way to include 'free' patches: sign and send to FSF a piece of paper,
 that the patches CAN be included.
 I think nobody in Linux have done that, thus we can expect some
 more troubles and microsoft is a large troubles-maker

... and script in question is fscking trivial to reimplement if and when it
happens.  End of story.


___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel