[PATCH v3] arm: install.sh: don't use /sbin/install if cross-compiling

Mauro Carvalho Chehab mchehab at s-opensource.com
Wed Mar 15 09:14:38 PDT 2017


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 at s-opensource.com>
---
 arch/arm/boot/install.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh
index 2a45092a40e3..5384f0ff91ea 100644
--- a/arch/arm/boot/install.sh
+++ b/arch/arm/boot/install.sh
@@ -36,7 +36,10 @@ 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$CROSS_COMPILE" == "x" ]; then
+  if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
+fi
 
 if [ "$(basename $2)" = "zImage" ]; then
 # Compressed install
-- 
2.9.3





More information about the linux-arm-kernel mailing list