linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] kbuild: make it possible to specify the module output dir
@ 2015-02-09 10:58 Kiran Raparthy
  2015-02-16  4:36 ` Kiran Kumar
  2015-02-18 15:05 ` Michal Marek
  0 siblings, 2 replies; 3+ messages in thread
From: Kiran Raparthy @ 2015-02-09 10:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rom Lemarchand, Michal Marek, linux-kbuild, Andrew Morton,
	Android Kernel Team, Kiran Raparthy

From: Rom Lemarchand <romlem@android.com>

kbuild: make it possible to specify the module output dir

Make modinst_dir user-defined on the command line.

This allows to do things like:
make MODLIB=output/ modinst_dir=. modules_install

to ensure all the .ko are in the output/ directory.

Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Rom Lemarchand <romlem@android.com>
[Kiran: Added context to commit message]
Signed-off-by: Kiran Raparthy <kumarsharma.r@gmail.com>
---
This is one of the number of patches from the Android AOSP common.git tree,
which is used on Android devices. I wanted to submit it for review
to see if it should go upstream.

 scripts/Makefile.modinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index e48a4e9..9b7b280 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -29,7 +29,7 @@ quiet_cmd_modules_install = INSTALL $@
 INSTALL_MOD_DIR ?= extra
 ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))
 
-modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))
+modinst_dir ?= $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))
 
 $(modules):
 	$(call cmd,modules_install,$(MODLIB)/$(modinst_dir))
-- 
1.8.2.1


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

* Re: [RFC] kbuild: make it possible to specify the module output dir
  2015-02-09 10:58 [RFC] kbuild: make it possible to specify the module output dir Kiran Raparthy
@ 2015-02-16  4:36 ` Kiran Kumar
  2015-02-18 15:05 ` Michal Marek
  1 sibling, 0 replies; 3+ messages in thread
From: Kiran Kumar @ 2015-02-16  4:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rom Lemarchand, Michal Marek, linux-kbuild, Andrew Morton,
	Android Kernel Team, Kiran Raparthy

On Mon, Feb 9, 2015 at 4:28 PM, Kiran Raparthy <kumarsharma.r@gmail.com> wrote:
> From: Rom Lemarchand <romlem@android.com>
>
> kbuild: make it possible to specify the module output dir
>
> Make modinst_dir user-defined on the command line.
>
> This allows to do things like:
> make MODLIB=output/ modinst_dir=. modules_install
>
> to ensure all the .ko are in the output/ directory.
>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: linux-kbuild@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Android Kernel Team <kernel-team@android.com>
> Signed-off-by: Rom Lemarchand <romlem@android.com>
> [Kiran: Added context to commit message]
> Signed-off-by: Kiran Raparthy <kumarsharma.r@gmail.com>
> ---
> This is one of the number of patches from the Android AOSP common.git tree,
> which is used on Android devices. I wanted to submit it for review
> to see if it should go upstream.
Just a gentle reminder.
Regards,
Kiran
>
>  scripts/Makefile.modinst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
> index e48a4e9..9b7b280 100644
> --- a/scripts/Makefile.modinst
> +++ b/scripts/Makefile.modinst
> @@ -29,7 +29,7 @@ quiet_cmd_modules_install = INSTALL $@
>  INSTALL_MOD_DIR ?= extra
>  ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))
>
> -modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))
> +modinst_dir ?= $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))
>
>  $(modules):
>         $(call cmd,modules_install,$(MODLIB)/$(modinst_dir))
> --
> 1.8.2.1
>

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

* Re: [RFC] kbuild: make it possible to specify the module output dir
  2015-02-09 10:58 [RFC] kbuild: make it possible to specify the module output dir Kiran Raparthy
  2015-02-16  4:36 ` Kiran Kumar
@ 2015-02-18 15:05 ` Michal Marek
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Marek @ 2015-02-18 15:05 UTC (permalink / raw)
  To: Kiran Raparthy, linux-kernel
  Cc: Rom Lemarchand, linux-kbuild, Andrew Morton, Android Kernel Team

On 2015-02-09 11:58, Kiran Raparthy wrote:
> From: Rom Lemarchand <romlem@android.com>
> 
> kbuild: make it possible to specify the module output dir
> 
> Make modinst_dir user-defined on the command line.
> 
> This allows to do things like:
> make MODLIB=output/ modinst_dir=. modules_install
> 
> to ensure all the .ko are in the output/ directory.

Please explain the use case and why it is needed. There are two
user-changeable variables used by modules_install:

INSTALL_MOD_PATH - prepended to /lib/modules/..., to allow installation
                   to a staging directory by non-root
INSTALL_MOD_DIR  - for out-of-tree modules; specifies the subdirectory
                   of /lib/modules/.../ to put the modules under
                   (default: "extra").

The hierarchy used in the source tree is reflected under
/lib/modules/.../extra, but that should not be an issue.

Michal

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

end of thread, other threads:[~2015-02-18 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 10:58 [RFC] kbuild: make it possible to specify the module output dir Kiran Raparthy
2015-02-16  4:36 ` Kiran Kumar
2015-02-18 15:05 ` Michal Marek

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).