From: mchehab@s-opensource.com (Mauro Carvalho Chehab)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: install.sh: don't use /sbin/install if cross-compiling
Date: Wed, 15 Mar 2017 13:15:11 -0300 [thread overview]
Message-ID: <20170315131511.5344d3a9@vento.lan> (raw)
In-Reply-To: <6675ef47aaa7a186f066c506a564e71c54559776.1489592885.git.mchehab@s-opensource.com>
Em Wed, 15 Mar 2017 12:48:59 -0300
Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> It doesn't make sense to run the local machine's install
> script if the Kernel was built using a cross-compiler, as it
> will try to create symlinks at the rootfs of the local machine:
>
> ln: failed to create symbolic link '/boot/System.map': Permission denied
> ln: failed to create symbolic link '/boot/vmlinuz': Permission denied
> ln: failed to create symbolic link '/boot/System.map': Permission denied
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>
> v2: keep calling a ~/bin/${INSTALLKERNEL} script, as it can be used to cope with
> cross builds.
>
> arch/arm/boot/install.sh | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh
> index 2a45092a40e3..831e63ac8b0f 100644
> --- a/arch/arm/boot/install.sh
> +++ b/arch/arm/boot/install.sh
> @@ -35,8 +35,11 @@ verify "$2"
> 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/ "$@"; fi
Please ignore this one. There's clearly a problem here.
> +if [ "x$CROSS_COMPILE" == "x" ]; then
> + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
> +fi
>
> if [ "$(basename $2)" = "zImage" ]; then
> # Compressed install
Thanks,
Mauro
next prev parent reply other threads:[~2017-03-15 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 15:48 [PATCH v2] arm: install.sh: don't use /sbin/install if cross-compiling Mauro Carvalho Chehab
2017-03-15 16:15 ` Mauro Carvalho Chehab [this message]
2017-03-15 16:23 ` Lothar Waßmann
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=20170315131511.5344d3a9@vento.lan \
--to=mchehab@s-opensource.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox