public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* make install target implementation
@ 2005-08-09 19:11 Joerg Dorchain
  0 siblings, 0 replies; only message in thread
From: Joerg Dorchain @ 2005-08-09 19:11 UTC (permalink / raw)
  To: Linux/PPC Development

[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]

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@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)"

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-09 19:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-09 19:11 make install target implementation Joerg Dorchain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox