I frequently (but not frequently enough) compile kernels on one machine
that are to be used on another machine. If It needs modules, I will need a
way to collect all modules that need to be transfered into a directory.
Usurally I'll want INSTALL_MOD_PATH=somedir make modules_install, but I
keep forgetting the name of the variable. I suppose I'm not the only one.
Therefore I suggest a modules_collect target, which will collect all
modules into a single directory ready for being tared and transfered:
--- a/Makefile 2005-11-15 01:41:32.000000000 +0100
+++ b/Makefile 2005-11-23 19:22:33.000000000 +0100
@@ -1065,6 +1065,7 @@ help:
@echo '* vmlinux - Build the bare kernel'
@echo '* modules - Build all modules'
@echo ' modules_install - Install all modules'
+ @echo ' modules_collect - Install all modules into ./modules.d'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'
@@ -1316,4 +1317,10 @@ clean := -f $(if $(KBUILD_SRC),$(srctree
endif # skip-makefile
+.PHONY: modules_collect
+modules_collect:
+ rm -rf modules.d
+ mkdir modules.d
+ INSTALL_MOD_PATH=modules.d make modules_install
+
FORCE:
--
Top 100 things you don't want the sysadmin to say:
98. What the hell!?
On Wed, Nov 23, 2005 at 07:29:37PM +0100, Bodo Eggert wrote:
> I frequently (but not frequently enough) compile kernels on one machine
> that are to be used on another machine. If It needs modules, I will need a
> way to collect all modules that need to be transfered into a directory.
> Usurally I'll want INSTALL_MOD_PATH=somedir make modules_install, but I
> keep forgetting the name of the variable. I suppose I'm not the only one.
>
> Therefore I suggest a modules_collect target, which will collect all
> modules into a single directory ready for being tared and transfered:
If you keep forgetting the variable name why not put the variable name
in the help instead of adding a new target?
Sam
On Wed, 23 Nov 2005, Sam Ravnborg wrote:
> On Wed, Nov 23, 2005 at 07:29:37PM +0100, Bodo Eggert wrote:
> > I frequently (but not frequently enough) compile kernels on one machine
> > that are to be used on another machine. If It needs modules, I will need a
> > way to collect all modules that need to be transfered into a directory.
> > Usurally I'll want INSTALL_MOD_PATH=somedir make modules_install, but I
> > keep forgetting the name of the variable. I suppose I'm not the only one.
> >
> > Therefore I suggest a modules_collect target, which will collect all
> > modules into a single directory ready for being tared and transfered:
>
> If you keep forgetting the variable name why not put the variable name
> in the help instead of adding a new target?
Because I'm lazy. I think you may be right:
Signed-Off-By: Bodo Eggert <[email protected]>
--- Makefile.orig 2005-11-23 20:07:17.000000000 +0100
+++ Makefile 2005-11-23 20:08:09.000000000 +0100
@@ -1065,5 +1065,5 @@ help:
@echo '* vmlinux - Build the bare kernel'
@echo '* modules - Build all modules'
- @echo ' modules_install - Install all modules'
+ @echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
--
Top 100 things you don't want the sysadmin to say:
79. What's this "any" key I'm supposed to press?