]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/m32r/boot/compressed/install.sh
Linux-2.6.12-rc2
[mirror_ubuntu-artful-kernel.git] / arch / m32r / boot / compressed / install.sh
1 #!/bin/sh
2 #
3 # arch/sh/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 # Adapted from code in arch/arm/boot/install.sh by Stuart Menefy
14 # Adapted from code in arch/sh/boot/install.sh by Takeo Takahashi
15 #
16 # "make install" script for sh architecture
17 #
18 # Arguments:
19 # $1 - kernel version
20 # $2 - kernel image file
21 # $3 - kernel map file
22 # $4 - default install path (blank if root directory)
23 #
24
25 # User may have a custom install script
26
27 if [ -x /sbin/installkernel ]; then
28 exec /sbin/installkernel "$@"
29 fi
30
31 if [ "$2" = "zImage" ]; then
32 # Compressed install
33 echo "Installing compressed kernel"
34 if [ -f $4/vmlinuz-$1 ]; then
35 mv $4/vmlinuz-$1 $4/vmlinuz.old
36 fi
37
38 if [ -f $4/System.map-$1 ]; then
39 mv $4/System.map-$1 $4/System.old
40 fi
41
42 cat $2 > $4/vmlinuz-$1
43 cp $3 $4/System.map-$1
44 else
45 # Normal install
46 echo "Installing normal kernel"
47 if [ -f $4/vmlinux-$1 ]; then
48 mv $4/vmlinux-$1 $4/vmlinux.old
49 fi
50
51 if [ -f $4/System.map ]; then
52 mv $4/System.map $4/System.old
53 fi
54
55 cat $2 > $4/vmlinux-$1
56 cp $3 $4/System.map
57 fi