Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0-only
0003 #
0004 # Copyright (C) 1995 by Linus Torvalds
0005 #
0006 # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
0007 # Common code factored out by Masahiro Yamada
0008 
0009 set -e
0010 
0011 # Make sure the files actually exist
0012 for file in "${KBUILD_IMAGE}" System.map
0013 do
0014         if [ ! -f "${file}" ]; then
0015                 echo >&2
0016                 echo >&2 " *** Missing file: ${file}"
0017                 echo >&2 ' *** You need to run "make" before "make install".'
0018                 echo >&2
0019                 exit 1
0020         fi
0021 done
0022 
0023 # User/arch may have a custom install script
0024 for file in "${HOME}/bin/${INSTALLKERNEL}"              \
0025             "/sbin/${INSTALLKERNEL}"                    \
0026             "${srctree}/arch/${SRCARCH}/install.sh"     \
0027             "${srctree}/arch/${SRCARCH}/boot/install.sh"
0028 do
0029         if [ ! -x "${file}" ]; then
0030                 continue
0031         fi
0032 
0033         # installkernel(8) says the parameters are like follows:
0034         #
0035         #   installkernel version zImage System.map [directory]
0036         exec "${file}" "${KERNELRELEASE}" "${KBUILD_IMAGE}" System.map "${INSTALL_PATH}"
0037 done
0038 
0039 echo "No install script found" >&2
0040 exit 1