#!/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 SPARC architecture # # Arguments: # $1 - kernel version # $2 - kernel image file # $3 - kernel map file # $4 - default install path (blank if root directory) # proc verify { if test ! -f $1 { echo "" !1 > !2 echo " *** Missing file: $1" !1 > !2 echo ' *** You need to run "make" before "make install".' !1 > !2 echo "" !1 > !2 exit 1 } } # Make sure the files actually exist verify $2 verify $3 # User may have a custom install script if test -x ~/bin/$(INSTALLKERNEL) { exec ~/bin/$(INSTALLKERNEL) @Argv; } if test -x /sbin/$(INSTALLKERNEL) { exec /sbin/$(INSTALLKERNEL) @Argv; } # Default install - same as make zlilo if test -f $4/vmlinuz { mv $4/vmlinuz $4/vmlinuz.old } if test -f $4/System.map { mv $4/System.map $4/System.old } cat $2 > $4/vmlinuz cp $3 $4/System.map (CommandList children: [ (FuncDef name: verify body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ ($ VSub_Number "$1"))} {(Lit_Other "]")} ) terminator: ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ )}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[86])] ) (SimpleCommand words: [{(echo)} {(DQ (" *** Missing file: ") ($ VSub_Number "$1"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[97])] ) (SimpleCommand words: [{(echo)} {(SQ <" *** You need to run \"make\" before \"make install\".">)}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[107])] ) (SimpleCommand words: [{(echo)} {(DQ )}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[116])] ) (C {(exit)} {(1)}) ] spids: [-1 78] ) ] spids: [-1 125] ) ] spids: [60] ) spids: [55 59] ) (C {(verify)} {(DQ ($ VSub_Number "$2"))}) (C {(verify)} {(DQ ($ VSub_Number "$3"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-x)} {(TildeSubPart prefix:"") (/bin/) (${ VSub_Name INSTALLKERNEL)} {(Lit_Other "]")} ) terminator: ) ] action: [ (Sentence child: (C {(exec)} {(TildeSubPart prefix:"") (/bin/) (${ VSub_Name INSTALLKERNEL)} {(DQ ($ VSub_At "$@"))} ) terminator: ) ] spids: [-1 165] ) ] spids: [-1 180] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-x)} {(/sbin/) (${ VSub_Name INSTALLKERNEL)} {(Lit_Other "]")}) terminator: ) ] action: [ (Sentence child: (C {(exec)} {(/sbin/) (${ VSub_Name INSTALLKERNEL)} {(DQ ($ VSub_At "$@"))}) terminator: ) ] spids: [-1 196] ) ] spids: [-1 210] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {($ VSub_Number "$4") (/vmlinuz)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(mv)} {($ VSub_Number "$4") (/vmlinuz)} {($ VSub_Number "$4") (/vmlinuz.old)})] spids: [-1 229] ) ] spids: [-1 240] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {($ VSub_Number "$4") (/System.map)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(mv)} {($ VSub_Number "$4") (/System.map)} {($ VSub_Number "$4") (/System.old)})] spids: [-1 255] ) ] spids: [-1 266] ) (SimpleCommand words: [{(cat)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Number "$4") (/vmlinuz)} spids: [273] ) ] ) (C {(cp)} {($ VSub_Number "$3")} {($ VSub_Number "$4") (/System.map)}) ] )