linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 09/20] kbuild: arm64: use common install script
       [not found] <20210407053419.449796-1-gregkh@linuxfoundation.org>
@ 2021-04-07  5:34 ` Greg Kroah-Hartman
  2021-04-07 14:30   ` Catalin Marinas
  2021-04-09  3:08   ` Kees Cook
  2021-04-07  5:34 ` [PATCH 10/20] kbuild: arm: " Greg Kroah-Hartman
  1 sibling, 2 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-07  5:34 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek
  Cc: linux-kbuild, linux-arch, linux-kernel, Greg Kroah-Hartman,
	Catalin Marinas, Will Deacon, linux-arm-kernel

The common scripts/install.sh script will now work for arm65, no changes
needed so convert the arm64 boot Makefile to call it instead of the
arm64-only version of the file and remove the now unused file.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/boot/Makefile   |  4 +--
 arch/arm64/boot/install.sh | 60 --------------------------------------
 2 files changed, 2 insertions(+), 62 deletions(-)
 delete mode 100644 arch/arm64/boot/install.sh

diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile
index cd3414898d10..08c56332dde2 100644
--- a/arch/arm64/boot/Makefile
+++ b/arch/arm64/boot/Makefile
@@ -37,9 +37,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
 	$(call if_changed,lzo)
 
 install:
-	$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
+	$(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \
 	$(obj)/Image System.map "$(INSTALL_PATH)"
 
 zinstall:
-	$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
+	$(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \
 	$(obj)/Image.gz System.map "$(INSTALL_PATH)"
diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
deleted file mode 100644
index d91e1f022573..000000000000
--- a/arch/arm64/boot/install.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# arch/arm64/boot/install.sh
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-# Copyright (C) 1995 by Linus Torvalds
-#
-# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
-# Adapted from code in arch/i386/boot/install.sh by Russell King
-#
-# "make install" script for the AArch64 Linux port
-#
-# Arguments:
-#   $1 - kernel version
-#   $2 - kernel image file
-#   $3 - kernel map file
-#   $4 - default install path (blank if root directory)
-#
-
-verify () {
-	if [ ! -f "$1" ]; then
-		echo ""                                                   1>&2
-		echo " *** Missing file: $1"                              1>&2
-		echo ' *** You need to run "make" before "make install".' 1>&2
-		echo ""                                                   1>&2
-		exit 1
-	fi
-}
-
-# Make sure the files actually exist
-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 [ "$(basename $2)" = "Image.gz" ]; then
-# Compressed install
-  echo "Installing compressed kernel"
-  base=vmlinuz
-else
-# Normal install
-  echo "Installing normal kernel"
-  base=vmlinux
-fi
-
-if [ -f $4/$base-$1 ]; then
-  mv $4/$base-$1 $4/$base-$1.old
-fi
-cat $2 > $4/$base-$1
-
-# Install system map file
-if [ -f $4/System.map-$1 ]; then
-  mv $4/System.map-$1 $4/System.map-$1.old
-fi
-cp $3 $4/System.map-$1
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/20] kbuild: arm: use common install script
       [not found] <20210407053419.449796-1-gregkh@linuxfoundation.org>
  2021-04-07  5:34 ` [PATCH 09/20] kbuild: arm64: use common install script Greg Kroah-Hartman
@ 2021-04-07  5:34 ` Greg Kroah-Hartman
  2021-04-09  3:09   ` Kees Cook
  1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-07  5:34 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek
  Cc: linux-kbuild, linux-arch, linux-kernel, Greg Kroah-Hartman,
	Russell King, linux-arm-kernel

The common scripts/install.sh script will now work for arm, all that
is needed is to add the compressed image type to it.  So add that file
type check and the ability to call /sbin/loadmap after copying the
kernel.  With that we can remove the arm-only version of the file.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/boot/Makefile   |  6 ++--
 arch/arm/boot/install.sh | 66 ----------------------------------------
 scripts/install.sh       | 10 +++++-
 3 files changed, 12 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/boot/install.sh

diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index 0b3cd7a33a26..053187f0b714 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -104,15 +104,15 @@ initrd:
 	(echo You must specify INITRD; exit -1)
 
 install:
-	$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
+	$(CONFIG_SHELL) $(srctree)/scripts/install.sh "$(KERNELRELEASE)" \
 	$(obj)/Image System.map "$(INSTALL_PATH)"
 
 zinstall:
-	$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
+	$(CONFIG_SHELL) $(srctree)/scripts/install.sh "$(KERNELRELEASE)" \
 	$(obj)/zImage System.map "$(INSTALL_PATH)"
 
 uinstall:
-	$(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
+	$(CONFIG_SHELL) $(srctree)/scripts/install.sh "$(KERNELRELEASE)" \
 	$(obj)/uImage System.map "$(INSTALL_PATH)"
 
 subdir-	    := bootp compressed dts
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh
deleted file mode 100644
index 2a45092a40e3..000000000000
--- a/arch/arm/boot/install.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-#
-# arch/arm/boot/install.sh
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-# Copyright (C) 1995 by Linus Torvalds
-#
-# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
-# Adapted from code in arch/i386/boot/install.sh by Russell King
-#
-# "make install" script for arm architecture
-#
-# Arguments:
-#   $1 - kernel version
-#   $2 - kernel image file
-#   $3 - kernel map file
-#   $4 - default install path (blank if root directory)
-#
-
-verify () {
-	if [ ! -f "$1" ]; then
-		echo ""                                                   1>&2
-		echo " *** Missing file: $1"                              1>&2
-		echo ' *** You need to run "make" before "make install".' 1>&2
-		echo ""                                                   1>&2
-		exit 1
-	fi
-}
-
-# Make sure the files actually exist
-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 [ "$(basename $2)" = "zImage" ]; then
-# Compressed install
-  echo "Installing compressed kernel"
-  base=vmlinuz
-else
-# Normal install
-  echo "Installing normal kernel"
-  base=vmlinux
-fi
-
-if [ -f $4/$base-$1 ]; then
-  mv $4/$base-$1 $4/$base-$1.old
-fi
-cat $2 > $4/$base-$1
-
-# Install system map file
-if [ -f $4/System.map-$1 ]; then
-  mv $4/System.map-$1 $4/System.map-$1.old
-fi
-cp $3 $4/System.map-$1
-
-if [ -x /sbin/loadmap ]; then
-  /sbin/loadmap
-else
-  echo "You have to install it yourself"
-fi
diff --git a/scripts/install.sh b/scripts/install.sh
index 9c8a22d96255..73067b535ea0 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -51,7 +51,8 @@ if [ -x /sbin/"${INSTALLKERNEL}" ]; then exec /sbin/"${INSTALLKERNEL}" "$@"; fi
 
 base=$(basename "$2")
 if [ "$base" = "bzImage" ] ||
-   [ "$base" = "Image.gz" ] ; then
+   [ "$base" = "Image.gz" ] ||
+   [ "$base" = "zImage" ] ; then
 	# Compressed install
 	echo "Installing compressed kernel"
 	base=vmlinuz
@@ -78,6 +79,13 @@ sync
 
 # Some architectures like to call specific bootloader "helper" programs:
 case "${ARCH}" in
+	arm)
+		if [ -x /sbin/loadmap ]; then
+			/sbin/loadmap
+		else
+			echo "You have to install it yourself"
+		fi
+		;;
 	x86)
 		if [ -x /sbin/lilo ]; then
 			/sbin/lilo
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 09/20] kbuild: arm64: use common install script
  2021-04-07  5:34 ` [PATCH 09/20] kbuild: arm64: use common install script Greg Kroah-Hartman
@ 2021-04-07 14:30   ` Catalin Marinas
  2021-04-09  3:08   ` Kees Cook
  1 sibling, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2021-04-07 14:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-arch,
	linux-kernel, Will Deacon, linux-arm-kernel

On Wed, Apr 07, 2021 at 07:34:08AM +0200, Greg Kroah-Hartman wrote:
> The common scripts/install.sh script will now work for arm65, no changes
> needed so convert the arm64 boot Makefile to call it instead of the
> arm64-only version of the file and remove the now unused file.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Assuming that it does the same thing (it seems to from a quick look):

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 09/20] kbuild: arm64: use common install script
  2021-04-07  5:34 ` [PATCH 09/20] kbuild: arm64: use common install script Greg Kroah-Hartman
  2021-04-07 14:30   ` Catalin Marinas
@ 2021-04-09  3:08   ` Kees Cook
  2021-04-09  6:37     ` Greg Kroah-Hartman
  1 sibling, 1 reply; 6+ messages in thread
From: Kees Cook @ 2021-04-09  3:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-arch,
	linux-kernel, Catalin Marinas, Will Deacon, linux-arm-kernel

On Wed, Apr 07, 2021 at 07:34:08AM +0200, Greg Kroah-Hartman wrote:
> The common scripts/install.sh script will now work for arm65, no changes

nit: arm64

> needed so convert the arm64 boot Makefile to call it instead of the
> arm64-only version of the file and remove the now unused file.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

With that fixed:

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 10/20] kbuild: arm: use common install script
  2021-04-07  5:34 ` [PATCH 10/20] kbuild: arm: " Greg Kroah-Hartman
@ 2021-04-09  3:09   ` Kees Cook
  0 siblings, 0 replies; 6+ messages in thread
From: Kees Cook @ 2021-04-09  3:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-arch,
	linux-kernel, Russell King, linux-arm-kernel

On Wed, Apr 07, 2021 at 07:34:09AM +0200, Greg Kroah-Hartman wrote:
> The common scripts/install.sh script will now work for arm, all that
> is needed is to add the compressed image type to it.  So add that file
> type check and the ability to call /sbin/loadmap after copying the
> kernel.  With that we can remove the arm-only version of the file.
> 
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 09/20] kbuild: arm64: use common install script
  2021-04-09  3:08   ` Kees Cook
@ 2021-04-09  6:37     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-09  6:37 UTC (permalink / raw)
  To: Kees Cook
  Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-arch,
	linux-kernel, Catalin Marinas, Will Deacon, linux-arm-kernel

On Thu, Apr 08, 2021 at 08:08:18PM -0700, Kees Cook wrote:
> On Wed, Apr 07, 2021 at 07:34:08AM +0200, Greg Kroah-Hartman wrote:
> > The common scripts/install.sh script will now work for arm65, no changes
> 
> nit: arm64

Hah!

Thanks for the reviews, I'll be doing a new series soon based on
Masahiro's reviews.

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-04-09  6:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210407053419.449796-1-gregkh@linuxfoundation.org>
2021-04-07  5:34 ` [PATCH 09/20] kbuild: arm64: use common install script Greg Kroah-Hartman
2021-04-07 14:30   ` Catalin Marinas
2021-04-09  3:08   ` Kees Cook
2021-04-09  6:37     ` Greg Kroah-Hartman
2021-04-07  5:34 ` [PATCH 10/20] kbuild: arm: " Greg Kroah-Hartman
2021-04-09  3:09   ` Kees Cook

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