2005-04-17 06:20:36 +08:00
|
|
|
#!/bin/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
|
|
|
|
#
|
|
|
|
# "make install" script for i386 architecture
|
|
|
|
#
|
|
|
|
# Arguments:
|
|
|
|
# $1 - kernel version
|
|
|
|
# $2 - kernel image file
|
|
|
|
# $3 - kernel map file
|
|
|
|
# $4 - default install path (blank if root directory)
|
|
|
|
|
2024-07-14 16:57:50 +08:00
|
|
|
set -e
|
|
|
|
|
2020-10-03 03:32:39 +08:00
|
|
|
if [ "$(basename $2)" = "vmlinuz" ]; then
|
2013-10-19 03:18:46 +08:00
|
|
|
# Compressed install
|
|
|
|
echo "Installing compressed kernel"
|
|
|
|
base=vmlinuz
|
|
|
|
else
|
|
|
|
# Normal install
|
|
|
|
echo "Installing normal kernel"
|
|
|
|
base=vmlinux
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $4/$base-$1 ]; then
|
|
|
|
mv $4/$base-$1 $4/$base-$1.old
|
2005-04-17 06:20:36 +08:00
|
|
|
fi
|
2013-10-19 03:18:46 +08:00
|
|
|
cat $2 > $4/$base-$1
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2013-10-19 03:18:46 +08:00
|
|
|
# Install system map file
|
|
|
|
if [ -f $4/System.map-$1 ]; then
|
|
|
|
mv $4/System.map-$1 $4/System.map-$1.old
|
2005-04-17 06:20:36 +08:00
|
|
|
fi
|
2013-10-19 03:18:46 +08:00
|
|
|
cp $3 $4/System.map-$1
|
2005-04-17 06:20:36 +08:00
|
|
|
|