make install target implementation

Joerg Dorchain joerg at dorchain.net
Wed Aug 10 05:11:22 EST 2005


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

Signed-off-by: Joerg Dorchain <joerg at dorchain.net>
--- arch/ppc/boot/install.sh.orig	2005-08-09 20:54:21.000000000 +0200
+++ arch/ppc/boot/install.sh	2005-08-09 21:07:26.000000000 +0200
@@ -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
--- arch/ppc/Makefile.orig	2005-08-09 20:44:33.000000000 +0200
+++ arch/ppc/Makefile	2005-08-09 21:08:20.000000000 +0200
@@ -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)"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20050809/eb7281cb/attachment.pgp>


More information about the Linuxppc-dev mailing list