18c2ecf20Sopenharmony_ci#!/bin/sh 28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 38c2ecf20Sopenharmony_ci# 48c2ecf20Sopenharmony_ci# arch/s390x/boot/install.sh 58c2ecf20Sopenharmony_ci# 68c2ecf20Sopenharmony_ci# Copyright (C) 1995 by Linus Torvalds 78c2ecf20Sopenharmony_ci# 88c2ecf20Sopenharmony_ci# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin 98c2ecf20Sopenharmony_ci# 108c2ecf20Sopenharmony_ci# "make install" script for s390 architecture 118c2ecf20Sopenharmony_ci# 128c2ecf20Sopenharmony_ci# Arguments: 138c2ecf20Sopenharmony_ci# $1 - kernel version 148c2ecf20Sopenharmony_ci# $2 - kernel image file 158c2ecf20Sopenharmony_ci# $3 - kernel map file 168c2ecf20Sopenharmony_ci# $4 - default install path (blank if root directory) 178c2ecf20Sopenharmony_ci# 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci# User may have a custom install script 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciif [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 228c2ecf20Sopenharmony_ciif [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciecho "Warning: '${INSTALLKERNEL}' command not available - additional " \ 258c2ecf20Sopenharmony_ci "bootloader config required" >&2 268c2ecf20Sopenharmony_ciif [ -f $4/vmlinuz-$1 ]; then mv $4/vmlinuz-$1 $4/vmlinuz-$1.old; fi 278c2ecf20Sopenharmony_ciif [ -f $4/System.map-$1 ]; then mv $4/System.map-$1 $4/System.map-$1.old; fi 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_cicat $2 > $4/vmlinuz-$1 308c2ecf20Sopenharmony_cicp $3 $4/System.map-$1 31