#!/bin/sh1#2# arch/blackfin/boot/install.sh3#4# This file is subject to the terms and conditions of the GNU General Public5# License. See the file "COPYING" in the main directory of this archive6# for more details.7#8# Copyright (C) 1995 by Linus Torvalds9#10# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin11# Adapted from code in arch/i386/boot/install.sh by Mike Frysinger12#13# "make install" script for Blackfin architecture14#15# Arguments:16# $1 - kernel version17# $2 - kernel image file18# $3 - kernel map file19# $4 - default install path (blank if root directory)20#2122verify () {23if [ ! -f "$1" ]; then24echo "" 1>&225echo " *** Missing file: $1" 1>&226echo ' *** You need to run "make" before "make install".' 1>&227echo "" 1>&228exit 129fi30}3132# Make sure the files actually exist33verify "$2"34verify "$3"3536# User may have a custom install script3738if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi39if which ${INSTALLKERNEL} >/dev/null 2>&1; then40exec ${INSTALLKERNEL} "$@"41fi4243# Default install - same as make zlilo4445back_it_up() {46local file=$147[ -f ${file} ] || return 048local stamp=$(stat -c %Y ${file} 2>/dev/null)49mv ${file} ${file}.${stamp:-old}50}5152back_it_up $4/uImage53back_it_up $4/System.map5455cat $2 > $4/uImage56cp $3 $4/System.map575859