All of lore.kernel.org
 help / color / mirror / Atom feed
* out-of-tree configuration
@ 2014-06-18 13:03 John Bougs
  2014-06-18 13:46 ` Anders Darander
  0 siblings, 1 reply; 6+ messages in thread
From: John Bougs @ 2014-06-18 13:03 UTC (permalink / raw)
  To: kernelnewbies

I am working with a kernel module that has a few kconfig options associated
with it. The makefile for the module as it is does not support out-of-tree
builds. I am trying to change the the makefile to do out-of-tree builds.
Most of this is pretty straight forward, however I can't seem to find any
recomendations on to do local configurations for just the out of tree build.

right now I use the code below, but I don't realy think it is a good
solution because of the possible confilict between the local .config file
and the kernel .config file. Any suggestions on how I should handle this? 



ifneq ($(KERNELRELEASE),)
# kbuild part of makefile

# Optionally, include config file to allow out of tree kernel modules build
-include $(src)/.config

# Core module
obj-$(CONFIG_XXX)             += xxx.o
xxx-y                         += xxx-core.o xxx-sysfs.o 

# drivers
obj-$(CONFIG_XXX_1)    += xxx1.o
obj-$(CONFIG_XXX_2)    += xxx2.o


else
# normal makefile
KDIR ?= /lib/modules/`uname -r`/build

default: .config
	$(MAKE) -C $(KDIR) M=$$PWD modules

.config:
	@echo need local .config
	exit 1

modules_install: 
	$(MAKE) -C $(KDIR) M=$$PWD modules_install
	

clean:
	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions \
	       modules.order Module.symvers

endif

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

* out-of-tree configuration
  2014-06-18 13:03 out-of-tree configuration John Bougs
@ 2014-06-18 13:46 ` Anders Darander
  2014-06-18 14:02   ` john bougs
  0 siblings, 1 reply; 6+ messages in thread
From: Anders Darander @ 2014-06-18 13:46 UTC (permalink / raw)
  To: kernelnewbies

On 18 June 2014 15:03, John Bougs <bogusemail98230@yahoo.com> wrote:
> I am working with a kernel module that has a few kconfig options associated
> with it. The makefile for the module as it is does not support out-of-tree
> builds. I am trying to change the the makefile to do out-of-tree builds.

First, why do you want to build the module out-of-tree?

For 3rd party modules I can understand that need, OTOH, in that case your
question wouldn't have existed.

Cheers,
Anders

-- 
Anders Darander
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."

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

* out-of-tree configuration
  2014-06-18 13:46 ` Anders Darander
@ 2014-06-18 14:02   ` john bougs
  2014-06-18 14:14     ` Valdis.Kletnieks at vt.edu
  2014-06-18 14:30     ` Anders Darander
  0 siblings, 2 replies; 6+ messages in thread
From: john bougs @ 2014-06-18 14:02 UTC (permalink / raw)
  To: kernelnewbies





On Wednesday, June 18, 2014 6:47 AM, Anders Darander <anders.darander@gmail.com> wrote:
 


On 18 June 2014 15:03, John Bougs <bogusemail98230@yahoo.com> wrote:
> I am working with a kernel module that has a few kconfig options associated
> with it. The makefile for the module as it is does not support out-of-tree
> builds. I am trying to change the the makefile to do out-of-tree builds.

First, why do you want to build the module out-of-tree?

For 3rd party modules I can understand that need, OTOH, in that case your
question wouldn't have existed.


I am working with a third party module that I am building out of tree.? I trying this across multiple platforms.? I am placing the module code in our VCS... out of tree seems to be a cleaner, simpler, les complicated? solution to me.

Without? trying to sound confrontational, why not build it out of tree?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140618/e810b8cd/attachment.html 

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

* out-of-tree configuration
  2014-06-18 14:02   ` john bougs
@ 2014-06-18 14:14     ` Valdis.Kletnieks at vt.edu
  2014-06-18 14:30     ` Anders Darander
  1 sibling, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-06-18 14:14 UTC (permalink / raw)
  To: kernelnewbies

On Wed, 18 Jun 2014 07:02:09 -0700, john bougs said:
> Without? trying to sound confrontational, why not build it out of tree?

Why not have it build in-tree? That way you can throw it at Greg KH
and get it in (at least) drivers/staging, at which point you no longer
have to do ongoing maintenance to keep in sync with new kernel APIs - if
anybody changes an API that  you're using, it's their job to update
your use of it. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140618/3fd34c29/attachment.bin 

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

* out-of-tree configuration
  2014-06-18 14:02   ` john bougs
  2014-06-18 14:14     ` Valdis.Kletnieks at vt.edu
@ 2014-06-18 14:30     ` Anders Darander
  2014-06-18 15:13       ` john bougs
  1 sibling, 1 reply; 6+ messages in thread
From: Anders Darander @ 2014-06-18 14:30 UTC (permalink / raw)
  To: kernelnewbies

On 18 Jun 2014 16:02, "john bougs" <bogusemail98230@yahoo.com> wrote:
>
>
>
>
> On Wednesday, June 18, 2014 6:47 AM, Anders Darander <
anders.darander@gmail.com> wrote:
>
>
> On 18 June 2014 15:03, John Bougs <bogusemail98230@yahoo.com> wrote:
> > I am working with a kernel module that has a few kconfig options
associated
> > with it. The makefile for the module as it is does not support
out-of-tree
> > builds. I am trying to change the the makefile to do out-of-tree builds.
>
> First, why do you want to build the module out-of-tree?
>
> For 3rd party modules I can understand that need, OTOH, in that case your
> question wouldn't have existed.
>
>
> I am working with a third party module that I am building out of tree.  I
trying this across multiple platforms.  I am placing the module code in our
VCS... out of tree seems to be a cleaner, simpler, les complicated
solution to me.

Well, from your first email, I got the impression that you tried to move an
in-tree module out of the kernel tree.

What 3rd party module is it that you're building, that is delivered to you
in a state to only allow in-tree builds? That's a pretty uncommon
situation.

Are the config options you need to be set something that only this module
knows about, or are they something the rest of the kernel knows about?

> Without  trying to sound confrontational, why not build it out of tree?

Well, there's nothing wrong to build a true 3rd party module out-of-tree.
It might very well be your only choice due to a number of factors.

Though, if you can get it upstreamed, you'll win in the long term.

Cheers,
Anders
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140618/e9185bc0/attachment.html 

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

* out-of-tree configuration
  2014-06-18 14:30     ` Anders Darander
@ 2014-06-18 15:13       ` john bougs
  0 siblings, 0 replies; 6+ messages in thread
From: john bougs @ 2014-06-18 15:13 UTC (permalink / raw)
  To: kernelnewbies






On Wednesday, June 18, 2014 7:31 AM, Anders Darander <anders.darander@gmail.com> wrote:
 


?
Well, from your first email, I got the impression that you tried to move an in-tree module out of the kernel tree. 
What 3rd party module is it that you're building, that is delivered to you in a state to only allow in-tree builds? That's a pretty uncommon situation. 
Are the config options you need to be set something that only this module knows about, or are they something the rest of the kernel knows about? 
> Without? trying to sound confrontational, why not build it out of tree?
Well, there's nothing wrong to build a true 3rd party module out-of-tree. It might very well be your only choice due to a number of factors. 
Though, if you can get it upstreamed, you'll win in the long term. 
Cheers, 

Anders 


I'm playing with a module off of github -? fbtft.?? All the config is local to the module.? 

Thanks









?
Well, from your first email, I got the impression that you tried to move an in-tree module out of the kernel tree. 
What 3rd party module is it that you're building, that is delivered to you in a state to only allow in-tree builds? That's a pretty uncommon situation. 
Are the config options you need to be set something that only this module knows about, or are they something the rest of the kernel knows about? 
> Without? trying to sound confrontational, why not build it out of tree?
Well, there's nothing wrong to build a true 3rd party module out-of-tree. It might very well be your only choice due to a number of factors. 
Though, if you can get it upstreamed, you'll win in the long term. 
Cheers, 

Anders 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140618/558b04ca/attachment-0001.html 

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

end of thread, other threads:[~2014-06-18 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 13:03 out-of-tree configuration John Bougs
2014-06-18 13:46 ` Anders Darander
2014-06-18 14:02   ` john bougs
2014-06-18 14:14     ` Valdis.Kletnieks at vt.edu
2014-06-18 14:30     ` Anders Darander
2014-06-18 15:13       ` john bougs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.