blob: b002bfd56786bd4d174e38f62a9d8cd59bd5f2c0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
2#
Linus Torvalds1da177e2005-04-16 15:20:36 -07003# This file is subject to the terms and conditions of the GNU General Public
4# License. See the file "COPYING" in the main directory of this archive
5# for more details.
6#
7# Copyright (C) 1995 by Linus Torvalds
8#
9# Blatantly stolen from in arch/i386/boot/install.sh by Dave Hansen
10#
11# "make install" script for ppc64 architecture
12#
13# Arguments:
14# $1 - kernel version
15# $2 - kernel image file
16# $3 - kernel map file
17# $4 - default install path (blank if root directory)
18# $5 - kernel boot file, the zImage
19#
20
21# User may have a custom install script
22
Ian Campbell0f8e2d62005-06-23 00:08:10 -070023if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
24if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
26# Default install
27
28# this should work for both the pSeries zImage and the iSeries vmlinux.sm
Olaf Hering18c53322005-10-28 17:46:56 -070029image_name=`basename $2`
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
31if [ -f $4/$image_name ]; then
32 mv $4/$image_name $4/$image_name.old
33fi
34
35if [ -f $4/System.map ]; then
36 mv $4/System.map $4/System.old
37fi
38
39cat $2 > $4/$image_name
40cp $3 $4/System.map