kbuild: make it possible to specify the module output dir
RFC 1/1 kbuild: make it possible to specify the module output dir
From: Rom Lemarchand <[email protected]>
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.
---
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(-)
scripts/Makefile.modinst +1 -1
@@ -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))
Signature · 1 line
1.8.2.1
Quoted 19 lines · Kiran Raparthy
From: Rom Lemarchand <[email protected]>
kbuild: make it possible to specify the module output dir
Make
modinst_diruser-defined on the command line.This allows to do things like:
make MODLIB=output/ modinst_dir=.modules_installto ensure all the .ko are in the output/ directory.
Cc Michal Marek <[email protected]>Cc Andrew Morton <[email protected]>Cc Android Kernel Team <[email protected]>Signed-off-by Rom Lemarchand <[email protected]>[Kiran: Added context to commit message]Signed-off-by Kiran Raparthy <[email protected]>
Quoted 4 lines
---
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
Quoted 20 lines
scripts/Makefile.modinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/Makefile.modinst +1
-2@@ -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
Quoted 10 lines · Kiran Raparthy
From: Rom Lemarchand <[email protected]>
kbuild: make it possible to specify the module output dir
Make
modinst_diruser-defined on the command line.This allows to do things like:
make MODLIB=output/ modinst_dir=.modules_installto 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-rootINSTALL_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