Re: [KBUILD] Re: Adding vendor drivers...

2000-10-07 Thread Peter Samuelson


[Philipp Rumpf <[EMAIL PROTECTED]>]
> The idea isn't bad, but I'm not sure magic comments are really the
> way to go.  special macros should work just as well, shouldn't they ?

To be defined where?  Do we assume everyone will #include
 or something?  Or #include ?  It
seems a little absurd, since the whole file would be something like

  #define MAKEFILE_LINE(foo...)
  #define CONFIG_LINE(foo...)
  #define CONFIG_HELP_LINE(foo...)

(Of course you'd probably use something other than CONFIG_LINE because
that would needlessly confuse mkdep.c and checkconfig.pl.)

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Adding vendor drivers...

2000-10-07 Thread Philipp Rumpf

On Fri, Oct 06, 2000 at 11:39:53PM +0200, Pavel Machek wrote:
> Well, having .in and .mak files with single lines in them seems ugly
> to me. What about make dep scanning for
> 
> /* Makefile:  obj-$(CONFIG_MY_DRIVER) += mydriver.o */
> /* Config.in: bool CONFIG_MY_DRIVER */
> 
> in .c files?

The idea isn't bad, but I'm not sure magic comments are really the way to
go.  special macros should work just as well, shouldn't they ?

Also you're missing a very important item here: Documentation for the
config option.

Philipp Rumpf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [KBUILD] Re: Adding vendor drivers...

2000-10-07 Thread Jeff Garzik

Pavel Machek wrote:
> 
> Hi!
> 
> > So, when a vendor has to add a new driver, especially with the new-style
> > makefiles, you have a one-line patch to a makefile, a one-line patch to
> > a Config.in, and a patch which adds the driver to the tree.
> >
> > It would make adding new drivers to vendor kernel packages a whole lot
> > easier and more modular if you could add a driver simply by doing:
> >
> >   cp driver.c driver.config.in driver.mak linux/extras
> >
> > ...and then the makefile and config system automatically slurps this
> > data.  extras/Makefile could look something like:
> >
> >   ...new style init..
> >   include *.mak
> >   ...new style obj-x handling...
> >   include Rules.make
> >
> > Something similar would have to be worked out for Config.in.
> >
> > Of course, for anything complex, patching is still an option.
> >
> > Comments?  Suggested implementation?  :)
> 
> Well, having .in and .mak files with single lines in them seems ugly
> to me. What about make dep scanning for
> 
> /* Makefile:obj-$(CONFIG_MY_DRIVER) += mydriver.o */
> /* Config.in:   bool CONFIG_MY_DRIVER */
> 
> in .c files?

Don Becker has a similar solution in his newer net drivers.  For
single-c-file drivers it is wholly sufficient.  For anything remotely
complex, like a multi-file driver in its own directory, makefile
fragments of some sort are necessary..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: Adding vendor drivers...

2000-10-07 Thread Paul Fulghum


>Well, having .in and .mak files with single lines in them seems ugly
>to me. What about make dep scanning for
>
>/* Makefile:   obj-$(CONFIG_MY_DRIVER) += mydriver.o */
>/* Config.in:  bool CONFIG_MY_DRIVER */
>
>in .c files?
>   Pavel

I love this idea. Everything in one neat, drop-in package.

1. As person working for a hardware vendor, this would make
things much easier for me and my customers.

2. I think it would also make it easier to move things
around when restructuring the source directories is necessary.

3. And it might reduce the instances of a driver accidentally
being removed when a Makefile is reworked (which just happened
to a driver of ours in the 2.4.0-test kernels).

This may not be appropriate for all add-ons, but for simple drivers
like ours this would be great.

Maybe even add another tag to add the config help text.

This has my vote of support.

Paul Fulghum
[EMAIL PROTECTED]
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Adding vendor drivers...

2000-10-07 Thread Sven Koch

On Fri, 6 Oct 2000, Pavel Machek wrote:

> Well, having .in and .mak files with single lines in them seems ugly
> to me. What about make dep scanning for
> 
> /* Makefile:  obj-$(CONFIG_MY_DRIVER) += mydriver.o */
> /* Config.in: bool CONFIG_MY_DRIVER */
> 
> in .c files?

Isn't "make dep" normaly only done after configuring the kernel?
(and scanning every .c-file seems really slow to me)

c'ya
sven

-- 

The Internet treats censorship as a routing problem, and routes around it.
(John Gilmore on http://www.cygnus.com/~gnu/)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Adding vendor drivers...

2000-10-07 Thread Pavel Machek

Hi!

> So, when a vendor has to add a new driver, especially with the new-style
> makefiles, you have a one-line patch to a makefile, a one-line patch to
> a Config.in, and a patch which adds the driver to the tree.
> 
> It would make adding new drivers to vendor kernel packages a whole lot
> easier and more modular if you could add a driver simply by doing:
> 
>   cp driver.c driver.config.in driver.mak linux/extras
> 
> ...and then the makefile and config system automatically slurps this
> data.  extras/Makefile could look something like:
> 
>   ...new style init..
>   include *.mak
>   ...new style obj-x handling...
>   include Rules.make
> 
> Something similar would have to be worked out for Config.in.
> 
> Of course, for anything complex, patching is still an option.
> 
> Comments?  Suggested implementation?  :)

Well, having .in and .mak files with single lines in them seems ugly
to me. What about make dep scanning for

/* Makefile:obj-$(CONFIG_MY_DRIVER) += mydriver.o */
/* Config.in:   bool CONFIG_MY_DRIVER */

in .c files?
Pavel
-- 
I'm [EMAIL PROTECTED] "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Adding vendor drivers...

2000-10-03 Thread Jeff Garzik

So, when a vendor has to add a new driver, especially with the new-style
makefiles, you have a one-line patch to a makefile, a one-line patch to
a Config.in, and a patch which adds the driver to the tree.

It would make adding new drivers to vendor kernel packages a whole lot
easier and more modular if you could add a driver simply by doing:

cp driver.c driver.config.in driver.mak linux/extras

...and then the makefile and config system automatically slurps this
data.  extras/Makefile could look something like:

...new style init..
include *.mak
...new style obj-x handling...
include Rules.make

Something similar would have to be worked out for Config.in.

Of course, for anything complex, patching is still an option.

Comments?  Suggested implementation?  :)

I think this feature would be valuable for many vendors.  In addition to
making it easier to add new drivers, it makes the separation between
kernel changes and vendor additions more apparently and obvious.

Regards,

Jeff





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [KBUILD] Adding vendor drivers...

2000-10-03 Thread Jeff Garzik

On Wed, 4 Oct 2000, Keith Owens wrote:
> On Tue, 3 Oct 2000 07:11:01 -0500 (CDT), 
> Jeff Garzik <[EMAIL PROTECTED]> wrote:
> >So, when a vendor has to add a new driver, especially with the new-style
> >makefiles, you have a one-line patch to a makefile, a one-line patch to
> >a Config.in, and a patch which adds the driver to the tree.
> 
> Jeff, before making any more suggestions about the kernel build system,
> please see ftp://ftp.kernel.org/pub/linux/kernel/projects/kbuild/,
> makefile-wishlist-2.5-x.bz2.  Your idea plus many others are already on
> the wishlist for the 2.5 kernel build redesign.

This is a vendor feature, MDK needs this for 2.2.x and 2.4.x kernels.

It will exist before 2.5.x one way or another.

Jeff




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [KBUILD] Adding vendor drivers...

2000-10-03 Thread Keith Owens

On Tue, 3 Oct 2000 07:11:01 -0500 (CDT), 
Jeff Garzik <[EMAIL PROTECTED]> wrote:
>So, when a vendor has to add a new driver, especially with the new-style
>makefiles, you have a one-line patch to a makefile, a one-line patch to
>a Config.in, and a patch which adds the driver to the tree.

Jeff, before making any more suggestions about the kernel build system,
please see ftp://ftp.kernel.org/pub/linux/kernel/projects/kbuild/,
makefile-wishlist-2.5-x.bz2.  Your idea plus many others are already on
the wishlist for the 2.5 kernel build redesign.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/