public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?)
       [not found]           ` <20110125054800.GC13618@cr0.nay.redhat.com>
@ 2011-01-26 10:02             ` Mikael Pettersson
  2011-01-28  7:58               ` WANG Cong
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2011-01-26 10:02 UTC (permalink / raw)
  To: Américo Wang
  Cc: Mikael Pettersson, Harald Dunkel, linux-kernel, linux-kbuild

[cc: linux-kbuild's address corrected]

=?utf-8?Q?Am=C3=A9rico?= Wang writes:
 > On Mon, Jan 24, 2011 at 12:43:14PM +0100, Mikael Pettersson wrote:
 > >NAK -- this breaks existing setups which rely on /root/bin/installkernel
 > >being picked up automatically.
 > >
 > >Can you handle 'make INSTALLKERNEL=...' without breaking that please?
 > 
 > Yes, here we go.
 > 
 > --------->
 > 
 > Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
 > 
 > ---
 > diff --git a/Makefile b/Makefile
 > index 1f47495..44abded 100644
 > --- a/Makefile
 > +++ b/Makefile
 > @@ -327,7 +327,7 @@ OBJCOPY		= $(CROSS_COMPILE)objcopy
 >  OBJDUMP		= $(CROSS_COMPILE)objdump
 >  AWK		= awk
 >  GENKSYMS	= scripts/genksyms/genksyms
 > -INSTALLKERNEL  := installkernel
 > +INSTALLKERNEL  ?= /sbin/installkernel
 >  DEPMOD		= /sbin/depmod
 >  KALLSYMS	= scripts/kallsyms
 >  PERL		= perl
 > diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh
 > index d13ec1c..c8c9a92 100644
 > --- a/arch/x86/boot/install.sh
 > +++ b/arch/x86/boot/install.sh
 > @@ -33,8 +33,8 @@ verify "$3"
 >  
 >  # User may have a custom install script
 >  
 > -if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
 > -if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 > +if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
 > +if [ -x "${INSTALLKERNEL}" ]; then exec "${INSTALLKERNEL}" "$@"; fi
 >  
 >  # Default install - same as make zlilo

Tested.  This works as far as not overriding root's ~/bin/installkernel
if it exists, but it fails to give precedence to an explicit command-line
INSTALLKERNEL=... over the built-in fallbacks.  I don't see an easy way
to fix that without first consolidating all archs' INSTALLKERNEL handling
into the top-level Makefile.

Not using make install and just invoking your own install script directly
works, so I'm not sure this is worth the trouble (unless you can unify all
archs' INSTALLKERNEL handling as a side-effect / cleanup).

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

* Re: [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?)
  2011-01-26 10:02             ` [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?) Mikael Pettersson
@ 2011-01-28  7:58               ` WANG Cong
  0 siblings, 0 replies; 2+ messages in thread
From: WANG Cong @ 2011-01-28  7:58 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel

On Wed, 26 Jan 2011 11:02:11 +0100, Mikael Pettersson wrote:
> 
> Tested.  This works as far as not overriding root's ~/bin/installkernel
> if it exists, but it fails to give precedence to an explicit
> command-line INSTALLKERNEL=... over the built-in fallbacks.  I don't see
> an easy way to fix that without first consolidating all archs'
> INSTALLKERNEL handling into the top-level Makefile.


Yes, exactly, I can expect this.

> 
> Not using make install and just invoking your own install script
> directly works, so I'm not sure this is worth the trouble (unless you
> can unify all archs' INSTALLKERNEL handling as a side-effect / cleanup).

Agreed, I will have a try.

Thanks!


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

end of thread, other threads:[~2011-01-28  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4D388A08.1010004@afaics.de>
     [not found] ` <19768.44428.482148.361069@pilspetsen.it.uu.se>
     [not found]   ` <ihbvd1$jbj$3@dough.gmane.org>
     [not found]     ` <4D3A03CA.2060507@afaics.de>
     [not found]       ` <20110124102159.GD5510@cr0.nay.redhat.com>
     [not found]         ` <19773.26066.137666.718852@pilspetsen.it.uu.se>
     [not found]           ` <20110125054800.GC13618@cr0.nay.redhat.com>
2011-01-26 10:02             ` [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?) Mikael Pettersson
2011-01-28  7:58               ` WANG Cong

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