Skip to contentSkip to conversation

arm: install.sh: don't use /sbin/install if cross-compiling

PATCH Superseded Mauro Carvalho Chehab 2 participants 3 messages Mar 15, 2017 Arm (32-bit)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm: install.sh: don't use /sbin/install if cross-compiling

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

---

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(-)
arch/arm/boot/install.sh +5 -2
index 2a45092a40e3..831e63ac8b0f 100644
@@ -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
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/1 arm: install.sh: don't use /sbin/install if cross-compiling

Em Wed, 15 Mar 2017 12:48:59 -0300
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 22 lines

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

---

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(-)
arch/arm/boot/install.sh +0 -0
index 2a45092a40e3..831e63ac8b0f 100644

arch/arm/boot/install.sh verify "$2" · line 39

Quoted 7 lines
arch/arm/boot/install.sh +2 -2
@@ -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.

arch/arm/boot/install.sh verify "$2" · line 45

Quoted 6 lines
arch/arm/boot/install.sh +3 -0
+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

#2 lore raw

PATCH v2 1/1 arm: install.sh: don't use /sbin/install if cross-compiling

In reply to Mauro Carvalho Chehab

Hi,

Quoted 22 lines · On Wed, 15 Mar 2017 12:48:59 -0300 Mauro Carvalho Chehab wrote:

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

---

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(-)
arch/arm/boot/install.sh +0 -0
index 2a45092a40e3..831e63ac8b0f 100644

arch/arm/boot/install.sh verify "$2" · line 39

Quoted 7 lines
arch/arm/boot/install.sh +2 -2
@@ -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
                                            ^^^^^^^^^^^

exec the ~/bin directory?

Lothar Wa?mann