Skip to contentSkip to conversation

make install target implementation

PATCH Joerg Dorchain 1 participant 1 message Aug 9, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I noticed that the install target is mentioned in the help, but not implemented. I tried an implementation that can be used by distributions and does not break yaboot for me ;-) Patch enclosed, comments welcome.

Bye,

Joerg

ppc/boot/install.sh renamed from ppc/boot/install.sh.orig +41 -0
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# arch/ppc/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
+#
+# Adapted from code in arch/i386/boot/install.sh by Joerg Dorchain
+#
+# "make install" script for ppc 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 - same as make zlilo
+
+if [ -f $4/vmlinux ]; then
+	mv $4/vmlinux $4/vmlinux.old
+fi
+
+if [ -f $4/System.map ]; then
+	mv $4/System.map $4/System.old
+fi
+
+cat $2 > $4/vmlinux
+cp $3 $4/System.map
+
+# No lilo here
+#if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
ppc/Makefile renamed from ppc/Makefile.orig +3 -1
@@ -94,7 +94,7 @@
   @echo '  install         - Install kernel using'
   @echo '                    (your) ~/bin/installkernel or'
   @echo '                    (distribution) /sbin/installkernel or'
-  @echo '                    install to $$(INSTALL_PATH) and run lilo'
+  @echo '                    install to $$(INSTALL_PATH)'
   @echo '  *_defconfig     - Select default config from arch/$(ARCH)/ppc/configs'
 endef
 
@@ -137,3 +137,5 @@
 		arch/$(ARCH)/kernel/asm-offsets.s \
 		$(TOUT)
 
+install: vmlinux
+	sh $(srctree)/$(boot)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"