LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@it.uu.se>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: Harald Dunkel <harri@afaics.de>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kenrel.org
Subject: Re: [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?)
Date: Mon, 24 Jan 2011 12:43:14 +0100	[thread overview]
Message-ID: <19773.26066.137666.718852@pilspetsen.it.uu.se> (raw)
In-Reply-To: <20110124102159.GD5510@cr0.nay.redhat.com>

=?utf-8?Q?Am=C3=A9rico?= Wang writes:
 > On Fri, Jan 21, 2011 at 11:08:10PM +0100, Harald Dunkel wrote:
 > >-----BEGIN PGP SIGNED MESSAGE-----
 > >Hash: SHA1
 > >
 > >On 01/21/11 13:49, WANG Cong wrote:
 > >> On Thu, 20 Jan 2011 22:47:56 +0100, Mikael Pettersson wrote:
 > >>>
 > >>> First, at least on x86, the kernel will look for the 'installkernel'
 > >>> executable first in your own ~/bin/, so if you have that then it will
 > >>> override /sbin/installkernel.
 > >>>
 > >> 
 > >> That still doesn't look like a good solution.
 > >> 
 > >
 > >Same for me.
 > >
 > >Obviously running /sbin/installkernel is not reasonable for
 > >UID != 0 (or if $FAKEROOTKEY is set), so I would suggest to
 > >skip /sbin/installkernel and the default Lilo setup in
 > >install.sh for this case.
 > >
 > 
 > Will the patch below work for you?
 > 
 > With this patch, you should be able to specify your own installkernel
 > by "make INSTALLKERNEL=/your/installkernel install".
 > 
 > 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..c41f2b8 100644
 > --- a/arch/x86/boot/install.sh
 > +++ b/arch/x86/boot/install.sh
 > @@ -33,8 +33,7 @@ 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 "${INSTALLKERNEL}" ]; then exec "${INSTALLKERNEL}" "$@"; fi

NAK -- this breaks existing setups which rely on /root/bin/installkernel
being picked up automatically.

Can you handle 'make INSTALLKERNEL=...' without breaking that please?

  reply	other threads:[~2011-01-24 11:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 19:16 how to avoid that install.sh goes mad, if I am not root? Harald Dunkel
2011-01-20 21:47 ` Mikael Pettersson
2011-01-21 12:49   ` WANG Cong
2011-01-21 22:08     ` Harald Dunkel
2011-01-24 10:21       ` [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?) Américo Wang
2011-01-24 11:43         ` Mikael Pettersson [this message]
2011-01-25  5:48           ` Américo Wang
2011-01-26 10:02             ` Mikael Pettersson
2011-01-28  7:58               ` WANG Cong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19773.26066.137666.718852@pilspetsen.it.uu.se \
    --to=mikpe@it.uu.se \
    --cc=harri@afaics.de \
    --cc=linux-kbuild@vger.kenrel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    --subject='Re: [Patch] make installkernel configurable from command line (was Re: how to avoid that install.sh goes mad, if I am not root?)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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