2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright (C) 1995 by Linus Torvalds
6 # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
7 # Common code factored out by Masahiro Yamada
11 # Make sure the files actually exist
12 for file in "${KBUILD_IMAGE}" System.map
14 if [ ! -f "${file}" ]; then
16 echo >&2 " *** Missing file: ${file}"
17 echo >&2 ' *** You need to run "make" before "make install".'
23 # User/arch may have a custom install script
24 for file in "${HOME}/bin/${INSTALLKERNEL}" \
25 "/sbin/${INSTALLKERNEL}" \
26 "${srctree}/arch/${SRCARCH}/install.sh" \
27 "${srctree}/arch/${SRCARCH}/boot/install.sh"
29 if [ ! -x "${file}" ]; then
33 # installkernel(8) says the parameters are like follows:
35 # installkernel version zImage System.map [directory]
36 exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map "${INSTALL_PATH}"
39 echo "No install script found" >&2