mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] make make install install modules too
@ 2004-09-17 17:00 Matthew Wilcox
  2004-09-17 17:38 ` Gene Heskett
  2004-09-27  7:22 ` Sam Ravnborg
  0 siblings, 2 replies; 9+ messages in thread
From: Matthew Wilcox @ 2004-09-17 17:00 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel


I keep forgetting to run 'make modules_install' after make install.  Since
make now compiles modules too and there's no separate make modules step,
it seems to make sense that make install should also install modules.

Index: linux-2.6/arch/i386/Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- linux-2.6/arch/i386/Makefile	13 Sep 2004 15:22:09 -0000	1.11
+++ linux-2.6/arch/i386/Makefile	17 Sep 2004 16:57:03 -0000
@@ -117,7 +117,7 @@ AFLAGS += $(mflags-y)
 boot := arch/i386/boot
 
 .PHONY: zImage bzImage compressed zlilo bzlilo \
-	zdisk bzdisk fdimage fdimage144 fdimage288 install
+	zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install
 
 all: bzImage
 
@@ -136,8 +136,10 @@ zlilo bzlilo: vmlinux
 zdisk bzdisk: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zdisk
 
-install fdimage fdimage144 fdimage288: vmlinux
+kernel_install fdimage fdimage144 fdimage288: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
+
+install: kernel_install modules_install
 
 prepare: include/asm-$(ARCH)/asm_offsets.h
 CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
Index: linux-2.6/arch/i386/boot/Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/arch/i386/boot/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- linux-2.6/arch/i386/boot/Makefile	13 Sep 2004 15:22:09 -0000	1.5
+++ linux-2.6/arch/i386/boot/Makefile	17 Sep 2004 16:57:03 -0000
@@ -100,5 +100,5 @@ zlilo: $(BOOTIMAGE)
 	cp System.map $(INSTALL_PATH)/
 	if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
 
-install: $(BOOTIMAGE)
+kernel_install: $(BOOTIMAGE)
 	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

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

* Re: [PATCH] make make install install modules too
  2004-09-17 17:00 [PATCH] make make install install modules too Matthew Wilcox
@ 2004-09-17 17:38 ` Gene Heskett
  2004-09-26  1:33   ` Matthew Wilcox
  2004-09-27  7:22 ` Sam Ravnborg
  1 sibling, 1 reply; 9+ messages in thread
From: Gene Heskett @ 2004-09-17 17:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthew Wilcox, Linus Torvalds, Andrew Morton

On Friday 17 September 2004 13:00, Matthew Wilcox wrote:
>I keep forgetting to run 'make modules_install' after make install. 
> Since make now compiles modules too and there's no separate make
> modules step, it seems to make sense that make install should also
> install modules.

This is not a good patch IMO.  Many of us do things with scripts to 
drive the compile process, either in the name of repeatability or 
consistency.   These scripts may step out of the src tree and go make 
something else (lm_sensors comes to mind when it wasn't part of the 
kernel) whose output goes into the /lib/modules/version/ directory so 
that by the time the make modules_install runs, everything is already 
in place for the automatic depmod the modules_install does.  We 
*could* work around it by re-adding the depmod lines to our scripts, 
but it seems that might be called a kludge too.

>Index: linux-2.6/arch/i386/Makefile
>===================================================================
>RCS file: /var/cvs/linux-2.6/arch/i386/Makefile,v
>retrieving revision 1.11
>diff -u -p -r1.11 Makefile
>--- linux-2.6/arch/i386/Makefile 13 Sep 2004 15:22:09 -0000 1.11
>+++ linux-2.6/arch/i386/Makefile 17 Sep 2004 16:57:03 -0000
>@@ -117,7 +117,7 @@ AFLAGS += $(mflags-y)
> boot := arch/i386/boot
>
> .PHONY: zImage bzImage compressed zlilo bzlilo \
>- zdisk bzdisk fdimage fdimage144 fdimage288 install
>+ zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install
>
> all: bzImage
>
>@@ -136,8 +136,10 @@ zlilo bzlilo: vmlinux
> zdisk bzdisk: vmlinux
> 	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zdisk
>
>-install fdimage fdimage144 fdimage288: vmlinux
>+kernel_install fdimage fdimage144 fdimage288: vmlinux
> 	$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
>+
>+install: kernel_install modules_install
>
> prepare: include/asm-$(ARCH)/asm_offsets.h
> CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
>Index: linux-2.6/arch/i386/boot/Makefile
>===================================================================
>RCS file: /var/cvs/linux-2.6/arch/i386/boot/Makefile,v
>retrieving revision 1.5
>diff -u -p -r1.5 Makefile
>--- linux-2.6/arch/i386/boot/Makefile	13 Sep 2004 15:22:09 -0000	1.5
>+++ linux-2.6/arch/i386/boot/Makefile	17 Sep 2004 16:57:03 -0000
>@@ -100,5 +100,5 @@ zlilo: $(BOOTIMAGE)
> 	cp System.map $(INSTALL_PATH)/
> 	if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
>
>-install: $(BOOTIMAGE)
>+kernel_install: $(BOOTIMAGE)
> 	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map
> "$(INSTALL_PATH)"

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.26% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

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

* Re: [PATCH] make make install install modules too
  2004-09-17 17:38 ` Gene Heskett
@ 2004-09-26  1:33   ` Matthew Wilcox
  2004-09-26  2:13     ` Gene Heskett
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Wilcox @ 2004-09-26  1:33 UTC (permalink / raw)
  To: Gene Heskett; +Cc: linux-kernel, Matthew Wilcox, Linus Torvalds, Andrew Morton

On Fri, Sep 17, 2004 at 01:38:51PM -0400, Gene Heskett wrote:
> This is not a good patch IMO.  Many of us do things with scripts to 
> drive the compile process, either in the name of repeatability or 
> consistency.   These scripts may step out of the src tree and go make 
> something else (lm_sensors comes to mind when it wasn't part of the 
> kernel) whose output goes into the /lib/modules/version/ directory so 
> that by the time the make modules_install runs, everything is already 
> in place for the automatic depmod the modules_install does.  We 
> *could* work around it by re-adding the depmod lines to our scripts, 
> but it seems that might be called a kludge too.

Documentation/kbuild/modules.txt answers how to do this "right".  In any
case, there's nothing to stop you changing your scripts from
"make install && do_my_special_thing && make modules_install"
to
"make kernel_install && do_my_special_thing && make modules_install"

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

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

* Re: [PATCH] make make install install modules too
  2004-09-26  1:33   ` Matthew Wilcox
@ 2004-09-26  2:13     ` Gene Heskett
  0 siblings, 0 replies; 9+ messages in thread
From: Gene Heskett @ 2004-09-26  2:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Matthew Wilcox, Matthew Wilcox, Linus Torvalds, Andrew Morton

On Saturday 25 September 2004 21:33, Matthew Wilcox wrote:
>On Fri, Sep 17, 2004 at 01:38:51PM -0400, Gene Heskett wrote:
>> This is not a good patch IMO.  Many of us do things with scripts
>> to drive the compile process, either in the name of repeatability
>> or consistency.   These scripts may step out of the src tree and
>> go make something else (lm_sensors comes to mind when it wasn't
>> part of the kernel) whose output goes into the
>> /lib/modules/version/ directory so that by the time the make
>> modules_install runs, everything is already in place for the
>> automatic depmod the modules_install does.  We *could* work around
>> it by re-adding the depmod lines to our scripts, but it seems that
>> might be called a kludge too.
>
>Documentation/kbuild/modules.txt answers how to do this "right".  In
> any case, there's nothing to stop you changing your scripts from
> "make install && do_my_special_thing && make modules_install" to
>"make kernel_install && do_my_special_thing && make modules_install"

Entirely true.  But in the interest of doing it consistently AND my 
way, I have never used the make kernel install feature, doing my own 
copying, renameing etc.  And my own grub.conf editing too.

In my case (and I'm an old (70ish) fart getting stuck in my ways) I 
simply haven't needed to fix what isn't broken until such time as it 
actually does break.   It isn't broken, yet..  :-)

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.26% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

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

* Re: [PATCH] make make install install modules too
  2004-09-17 17:00 [PATCH] make make install install modules too Matthew Wilcox
  2004-09-17 17:38 ` Gene Heskett
@ 2004-09-27  7:22 ` Sam Ravnborg
  2004-09-27 11:37   ` Matthew Wilcox
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2004-09-27  7:22 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

On Fri, Sep 17, 2004 at 06:00:51PM +0100, Matthew Wilcox wrote:
> 
> I keep forgetting to run 'make modules_install' after make install.  Since
> make now compiles modules too and there's no separate make modules step,
> it seems to make sense that make install should also install modules.

No, we do not want to change such basic behaviour.
So many poeple are used to current scheme with:
make modules_install && make install

that it would't be worth breaking their ways of working.

	Sam

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

* Re: [PATCH] make make install install modules too
  2004-09-27  7:22 ` Sam Ravnborg
@ 2004-09-27 11:37   ` Matthew Wilcox
  2004-09-27 12:27     ` Jesper Juhl
  2004-09-27 18:10     ` Sam Ravnborg
  0 siblings, 2 replies; 9+ messages in thread
From: Matthew Wilcox @ 2004-09-27 11:37 UTC (permalink / raw)
  To: Matthew Wilcox, Linus Torvalds, Andrew Morton, linux-kernel

On Mon, Sep 27, 2004 at 09:22:46AM +0200, Sam Ravnborg wrote:
> On Fri, Sep 17, 2004 at 06:00:51PM +0100, Matthew Wilcox wrote:
> > 
> > I keep forgetting to run 'make modules_install' after make install.  Since
> > make now compiles modules too and there's no separate make modules step,
> > it seems to make sense that make install should also install modules.
> 
> No, we do not want to change such basic behaviour.
> So many poeple are used to current scheme with:
> make modules_install && make install
> 
> that it would't be worth breaking their ways of working.

Ehm, this wouldn't _break_ them.  They'd just end up installing modules
twice.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

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

* Re: [PATCH] make make install install modules too
  2004-09-27 11:37   ` Matthew Wilcox
@ 2004-09-27 12:27     ` Jesper Juhl
  2004-09-27 16:34       ` Cal Peake
  2004-09-27 18:10     ` Sam Ravnborg
  1 sibling, 1 reply; 9+ messages in thread
From: Jesper Juhl @ 2004-09-27 12:27 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Matthew Wilcox, Linus Torvalds, Andrew Morton, linux-kernel

On Mon, 27 Sep 2004, Matthew Wilcox wrote:

> Date: Mon, 27 Sep 2004 12:37:27 +0100
> From: Matthew Wilcox <matthew@wil.cx>
> To: Matthew Wilcox <willy@debian.org>, Linus Torvalds <torvalds@osdl.org>,
>     Andrew Morton <akpm@zip.com.au>, linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] make make install install modules too
> 
> On Mon, Sep 27, 2004 at 09:22:46AM +0200, Sam Ravnborg wrote:
> > On Fri, Sep 17, 2004 at 06:00:51PM +0100, Matthew Wilcox wrote:
> > > 
> > > I keep forgetting to run 'make modules_install' after make install.  Since
> > > make now compiles modules too and there's no separate make modules step,
> > > it seems to make sense that make install should also install modules.
> > 
> > No, we do not want to change such basic behaviour.
> > So many poeple are used to current scheme with:
> > make modules_install && make install
> > 
> > that it would't be worth breaking their ways of working.
> 
> Ehm, this wouldn't _break_ them.  They'd just end up installing modules
> twice.
> 

And how about people who, for some reason, don't want the modules 
installed?
Sure, you can just copy the files you want by hand, which is what I do 
personally, but I find it nice that installing the kernel image and 
modules are two sepperate steps. If a user wants both done automagically, 
then that user could just create a 2 line shell script.

Or how about leaving "make install" and "make modules_install" as is and 
add a new target, say, "make install_all" or similar?


--
Jesper Juhl <juhl-lkml@dif.dk>

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

* Re: [PATCH] make make install install modules too
  2004-09-27 12:27     ` Jesper Juhl
@ 2004-09-27 16:34       ` Cal Peake
  0 siblings, 0 replies; 9+ messages in thread
From: Cal Peake @ 2004-09-27 16:34 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: Matthew Wilcox, Matthew Wilcox, Linus Torvalds, Andrew Morton,
	linux-kernel

On Mon, 27 Sep 2004, Jesper Juhl wrote:

> > > On Fri, Sep 17, 2004 at 06:00:51PM +0100, Matthew Wilcox wrote:
> > > > 
> > > > I keep forgetting to run 'make modules_install' after make install.  Since
> > > > make now compiles modules too and there's no separate make modules step,
> > > > it seems to make sense that make install should also install modules.
> > > 
> 
> And how about people who, for some reason, don't want the modules 
> installed?
> Sure, you can just copy the files you want by hand, which is what I do 
> personally, but I find it nice that installing the kernel image and 
> modules are two sepperate steps. If a user wants both done automagically, 
> then that user could just create a 2 line shell script.

indeed, this should do what you want

$ cat ~/bin/installkernel

#!/bin/sh

cp .config /boot/config-$1
cp $3 /boot/System.map-$1
cp $2 /boot/vmlinuz-$1
make modules_install

-- Cal


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

* Re: [PATCH] make make install install modules too
  2004-09-27 11:37   ` Matthew Wilcox
  2004-09-27 12:27     ` Jesper Juhl
@ 2004-09-27 18:10     ` Sam Ravnborg
  1 sibling, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2004-09-27 18:10 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Matthew Wilcox, Linus Torvalds, Andrew Morton, linux-kernel

>> No, we do not want to change such basic behaviour.
>> So many poeple are used to current scheme with:
>> make modules_install && make install
>>
>> that it would't be worth breaking their ways of working.
>
> Ehm, this wouldn't _break_ them.  They'd just end up installing modules
> twice.
Broken in the sense that it does more than expected.

   Sam



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

end of thread, other threads:[~2004-09-27 18:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-17 17:00 [PATCH] make make install install modules too Matthew Wilcox
2004-09-17 17:38 ` Gene Heskett
2004-09-26  1:33   ` Matthew Wilcox
2004-09-26  2:13     ` Gene Heskett
2004-09-27  7:22 ` Sam Ravnborg
2004-09-27 11:37   ` Matthew Wilcox
2004-09-27 12:27     ` Jesper Juhl
2004-09-27 16:34       ` Cal Peake
2004-09-27 18:10     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®