1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0-only 3 # 4 # Copyright (C) 1995 by Linus Torvalds 5 # 6 # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin 7 # Common code factored out by Masahiro Yamada 8 9 set -e 10 11 # Make sure the files actually exist 12 for file in "${KBUILD_IMAGE}" System.map 13 do 14 if [ ! -f "${file}" ]; then 15 echo >&2 16 echo >&2 " *** Missing file: ${file}" 17 echo >&2 ' *** You need to run "make" before "make install".' 18 echo >&2 19 exit 1 20 fi 21 done 22 23 if [ -n "${INSTALL_PATH}" ] && ! [ -e "${INSTALL_PATH}" ]; then 24 mkdir -p "${INSTALL_PATH}" 25 fi 26 27 # User/arch may have a custom install script 28 for file in "${HOME}/bin/${INSTALLKERNEL}" \ 29 "/sbin/${INSTALLKERNEL}" \ 30 "${srctree}/arch/${SRCARCH}/install.sh" \ 31 "${srctree}/arch/${SRCARCH}/boot/install.sh" 32 do 33 if [ ! -x "${file}" ]; then 34 continue 35 fi 36 37 # installkernel(8) says the parameters are like follows: 38 # 39 # installkernel version zImage System.map [directory] 40 exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map "${INSTALL_PATH}" 41 done 42 43 echo "No install script found" >&2 44 exit 1
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.