1#!/bin/sh 2# 3# arch/arm/boot/install.sh 4# 5# This file is subject to the terms and conditions of the GNU General Public 6# License. See the file "COPYING" in the main directory of this archive 7# for more details. 8# 9# Copyright (C) 1995 by Linus Torvalds 10# 11# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin 12# Adapted from code in arch/i386/boot/install.sh by Russell King 13# 14# "make install" script for arm architecture 15# 16# Arguments: 17# $1 - kernel version 18# $2 - kernel image file 19# $3 - kernel map file 20# $4 - default install path (blank if root directory) 21# 22 23# User may have a custom install script 24 25if [ -x /sbin/installkernel ]; then 26 exec /sbin/installkernel "$@" 27fi 28 29if [ "$2" = "zImage" ]; then 30# Compressed install 31 echo "Installing compressed kernel" 32 if [ -f $4/vmlinuz-$1 ]; then 33 mv $4/vmlinuz-$1 $4/vmlinuz.old 34 fi 35 36 if [ -f $4/System.map-$1 ]; then 37 mv $4/System.map-$1 $4/System.old 38 fi 39 40 cat $2 > $4/vmlinuz-$1 41 cp $3 $4/System.map-$1 42else 43# Normal install 44 echo "Installing normal kernel" 45 if [ -f $4/vmlinux-$1 ]; then 46 mv $4/vmlinux-$1 $4/vmlinux.old 47 fi 48 49 if [ -f $4/System.map ]; then 50 mv $4/System.map $4/System.old 51 fi 52 53 cat $2 > $4/vmlinux-$1 54 cp $3 $4/System.map 55fi 56 57if [ -x /sbin/loadmap ]; then 58 /sbin/loadmap --rdev /dev/ima 59else 60 echo "You have to install it yourself" 61fi 62