#!/bin/sh
#
# arch/arm/boot/install.sh
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1995 by Linus Torvalds
#
# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
# Adapted from code in arch/i386/boot/install.sh by Russell King
#
# "make install" script for arm architecture
#
# Arguments:
#   $1 - kernel version
#   $2 - kernel image file
#   $3 - kernel map file
#   $4 - default install path (blank if root directory)
#

[ -f $4/config ] && mv $4/config $4/config.old
cp .config $4/config
[ -f $4/kernel7.img ] && mv $4/kernel7.img $4/kernel7.old
scripts/mkknlimg $2 $4/kernel7.img
[ -f $4/System.map ] && mv $4/System.map $4/System.old
cp $3 $4/System.map

if [ -x /sbin/loadmap ] ; then
  /sbin/loadmap
else
  sync
fi
