summaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-05-03 05:47:16 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2022-05-11 15:45:53 +0300
commitf774f5bb87d132b48bc4a99598c45f35121ac054 (patch)
tree0a2dc74e70400523f9815d72a68d5264cbf2253a /arch/parisc
parentf18379a30271c0289c2d0e1074e1ed633bfd708c (diff)
downloadlinux-f774f5bb87d132b48bc4a99598c45f35121ac054.tar.xz
kbuild: factor out the common installation code into scripts/install.sh
Many architectures have similar install.sh scripts. The first half is really generic; it verifies that the kernel image and System.map exist, then executes ~/bin/${INSTALLKERNEL} or /sbin/${INSTALLKERNEL} if available. The second half is kind of arch-specific; it copies the kernel image and System.map to the destination, but the code is slightly different. Factor out the generic part into scripts/install.sh. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/Makefile11
-rwxr-xr-x[-rw-r--r--]arch/parisc/install.sh28
2 files changed, 5 insertions, 34 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 7583fc39ab2d..aca1710fd658 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -184,12 +184,11 @@ vdso_install:
$(Q)$(MAKE) $(build)=arch/parisc/kernel/vdso $@
$(if $(CONFIG_COMPAT_VDSO), \
$(Q)$(MAKE) $(build)=arch/parisc/kernel/vdso32 $@)
-install:
- $(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \
- $(KERNELRELEASE) vmlinux System.map "$(INSTALL_PATH)"
-zinstall:
- $(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \
- $(KERNELRELEASE) vmlinuz System.map "$(INSTALL_PATH)"
+
+install: KBUILD_IMAGE := vmlinux
+zinstall: KBUILD_IMAGE := vmlinuz
+install zinstall:
+ $(call cmd,install)
CLEAN_FILES += lifimage
MRPROPER_FILES += palo.conf
diff --git a/arch/parisc/install.sh b/arch/parisc/install.sh
index 70d3cffb0251..933d031c249a 100644..100755
--- a/arch/parisc/install.sh
+++ b/arch/parisc/install.sh
@@ -1,7 +1,5 @@
#!/bin/sh
#
-# arch/parisc/install.sh, derived from arch/i386/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.
@@ -17,32 +15,6 @@
# $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 [ -n "${INSTALLKERNEL}" ]; then
- if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
- if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
- if [ -x /usr/sbin/${INSTALLKERNEL} ]; then exec /usr/sbin/${INSTALLKERNEL} "$@"; fi
-fi
-
-# Default install
if [ "$(basename $2)" = "vmlinuz" ]; then
# Compressed install