xref: /openbmc/linux/arch/s390/boot/install.sh (revision b059a39cfa27c04e8e03e4ddf44f16501f36357d)
11da177e4SLinus Torvalds#!/bin/sh
20b73214fSGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds# arch/s390x/boot/install.sh
51da177e4SLinus Torvalds#
61da177e4SLinus Torvalds# Copyright (C) 1995 by Linus Torvalds
71da177e4SLinus Torvalds#
81da177e4SLinus Torvalds# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
91da177e4SLinus Torvalds#
101da177e4SLinus Torvalds# "make install" script for s390 architecture
111da177e4SLinus Torvalds#
121da177e4SLinus Torvalds# Arguments:
131da177e4SLinus Torvalds#   $1 - kernel version
141da177e4SLinus Torvalds#   $2 - kernel image file
151da177e4SLinus Torvalds#   $3 - kernel map file
161da177e4SLinus Torvalds#   $4 - default install path (blank if root directory)
171da177e4SLinus Torvalds#
181da177e4SLinus Torvalds
191da177e4SLinus Torvalds# User may have a custom install script
201da177e4SLinus Torvalds
21caa27b66SSam Ravnborgif [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
22caa27b66SSam Ravnborgif [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
231da177e4SLinus Torvalds
24*b059a39cSStefan Rasplecho "Warning: '${INSTALLKERNEL}' command not available - additional " \
25*b059a39cSStefan Raspl     "bootloader config required" >&2
26*b059a39cSStefan Rasplif [ -f $4/vmlinuz-$1 ]; then mv $4/vmlinuz-$1 $4/vmlinuz-$1.old; fi
27*b059a39cSStefan Rasplif [ -f $4/System.map-$1 ]; then mv $4/System.map-$1 $4/System.map-$1.old; fi
281da177e4SLinus Torvalds
29*b059a39cSStefan Rasplcat $2 > $4/vmlinuz-$1
30*b059a39cSStefan Rasplcp $3 $4/System.map-$1
31