public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2] arm: install.sh: don't use /sbin/install if cross-compiling
@ 2017-03-15 15:48 Mauro Carvalho Chehab
  2017-03-15 16:15 ` Mauro Carvalho Chehab
  2017-03-15 16:23 ` Lothar Waßmann
  0 siblings, 2 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2017-03-15 15:48 UTC (permalink / raw)
  To: linux-arm-kernel

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
+if [ "x$CROSS_COMPILE" == "x" ]; then
+  if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
+fi
 
 if [ "$(basename $2)" = "zImage" ]; then
 # Compressed install
-- 
2.9.3

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

end of thread, other threads:[~2017-03-15 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-03-15 16:23 ` Lothar Waßmann

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