From 79c28bff0c95e05b6294bfab425b639762bade6a Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 3 Sep 2003 06:31:11 +1000 Subject: [PATCH] ppc64: make install fixes from Dave Hansen --- arch/ppc64/Makefile | 4 +++- arch/ppc64/boot/Makefile | 4 ++-- arch/ppc64/boot/install.sh | 41 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 arch/ppc64/boot/install.sh diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index d0cc92ecb6577..cada0f341188f 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile @@ -39,8 +39,10 @@ $(boottarget-y): vmlinux rm -f .config arch/ppc64/defconfig cp -f arch/ppc64/configs/$(@:config=defconfig) arch/ppc64/defconfig +bootimage-$(CONFIG_PPC_PSERIES) := zImage +bootimage-$(CONFIG_PPC_ISERIES) := vmlinux.sm +BOOTIMAGE := $(bootimage-y) install: vmlinux - echo doing ppc64 make install $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ archclean: diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile index 0aac4a9421690..bb1ce6953df27 100644 --- a/arch/ppc64/boot/Makefile +++ b/arch/ppc64/boot/Makefile @@ -122,7 +122,7 @@ $(obj)/imagesize.c: vmlinux awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \ >> $(obj)/imagesize.c -install: $(CONFIGURE) $(BOOTIMAGE) - sh -x $(src)/install.sh "$(KERNELRELEASE)" "$(obj)/zImage" "$(TOPDIR)/System.map" "$(INSTALL_PATH)" +install: $(CONFIGURE) $(obj)/$(BOOTIMAGE) + sh -x $(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(TOPDIR)/System.map" "$(INSTALL_PATH)" clean-files := $(patsubst $(obj)/%,%, $(obj-boot)) diff --git a/arch/ppc64/boot/install.sh b/arch/ppc64/boot/install.sh new file mode 100644 index 0000000000000..edc4f50b68970 --- /dev/null +++ b/arch/ppc64/boot/install.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# arch/ppc64/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 +# +# Blatantly stolen from in arch/i386/boot/install.sh by Dave Hansen +# +# "make install" script for ppc64 architecture +# +# Arguments: +# $1 - kernel version +# $2 - kernel image file +# $3 - kernel map file +# $4 - default install path (blank if root directory) +# + +# User may have a custom install script + +if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi +if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi + +# Default install + +# this should work for both the pSeries zImage and the iSeries vmlinux.sm +image_name=`basename $2` + +if [ -f $4/$image_name ]; then + mv $4/$image_name $4/$image_name.old +fi + +if [ -f $4/System.map ]; then + mv $4/System.map $4/System.old +fi + +cat $2 > $4/$image_name +cp $3 $4/System.map -- 2.53.0