Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[deliverable/linux.git] / arch / powerpc / boot / install.sh
CommitLineData
1da177e4
LT
1#!/bin/sh
2#
1da177e4
LT
3# 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)
29f1aff2 18# $5 and more - kernel boot files; zImage*, uImage, cuImage.*, etc.
1da177e4
LT
19#
20
529273c1
GL
21# Bail with error code if anything goes wrong
22set -e
23
1da177e4
LT
24# User may have a custom install script
25
caa27b66
SR
26if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
27if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
1da177e4
LT
28
29# Default install
30
31# this should work for both the pSeries zImage and the iSeries vmlinux.sm
18c5332b 32image_name=`basename $2`
1da177e4
LT
33
34if [ -f $4/$image_name ]; then
35 mv $4/$image_name $4/$image_name.old
36fi
37
38if [ -f $4/System.map ]; then
39 mv $4/System.map $4/System.old
40fi
41
42cat $2 > $4/$image_name
43cp $3 $4/System.map
29f1aff2
GL
44
45# Copy all the bootable image files
46path=$4
47shift 4
48while [ $# -ne 0 ]; do
49 image_name=`basename $1`
50 if [ -f $path/$image_name ]; then
51 mv $path/$image_name $path/$image_name.old
52 fi
53 cat $1 > $path/$image_name
54 shift
55done;
This page took 0.977323 seconds and 5 git commands to generate.