From patchwork Sat Dec 20 00:57:20 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 15011 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id F2800DDF2C for ; Sat, 20 Dec 2008 11:57:49 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228]) by ozlabs.org (Postfix) with ESMTP id BAC25DDDCA for ; Sat, 20 Dec 2008 11:57:25 +1100 (EST) Received: by rv-out-0506.google.com with SMTP id f6so1921972rvb.9 for ; Fri, 19 Dec 2008 16:57:24 -0800 (PST) Received: by 10.140.225.19 with SMTP id x19mr1853424rvg.121.1229734643690; Fri, 19 Dec 2008 16:57:23 -0800 (PST) Received: from trillian.cg.shawcable.net (S01060016b61d1226.cg.shawcable.net [68.146.92.145]) by mx.google.com with ESMTPS id f42sm3111721rvb.8.2008.12.19.16.57.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Dec 2008 16:57:23 -0800 (PST) Received: from localhost.localdomain (trillian [127.0.0.1]) by trillian.cg.shawcable.net (Postfix) with ESMTP id 8A20CC8076; Fri, 19 Dec 2008 17:57:20 -0700 (MST) From: Grant Likely Subject: [PATCH] powerpc: Copy bootable images in the default install script Date: Fri, 19 Dec 2008 17:57:20 -0700 Message-ID: <20081220005720.23861.18505.stgit@localhost.localdomain> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Cc: LinuxPPC Mailing List , Paul Mackerras X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org From: Grant Likely This patch makes the default install script (arch/powerpc/boot/install.sh) copy the bootable image files into the install directory. Before this patch only the vmlinux image file was copied. This patch makes the default 'make install' command useful for embedded development when $(INSTALL_PATH) is set in the environment. As a side effect, this patch changes the calling convention of the install.sh script. Instead of a single 5th parameter, the script is now passed a list of all the target images stored in the $(image-y) Makefile variable. This should be backwards compatible with existing install scripts since it just adds additional arguments and does not change existing ones. CC: Kumar Gala CC: Josh Boyer CC: Paul Mackerras CC: Benjamin Herrenschmidt CC: LinuxPPC Mailing List Signed-off-by: Grant Likely Acked-by: Josh Boyer --- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/boot/install.sh | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 3d3daa6..b6187ca 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -355,7 +355,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) @rm -f $@; ln $< $@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) - sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ # anything not in $(targets) clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index b002bfd..51b2387 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh @@ -15,7 +15,7 @@ # $2 - kernel image file # $3 - kernel map file # $4 - default install path (blank if root directory) -# $5 - kernel boot file, the zImage +# $5 and more - kernel boot files; zImage*, uImage, cuImage.*, etc. # # User may have a custom install script @@ -38,3 +38,15 @@ fi cat $2 > $4/$image_name cp $3 $4/System.map + +# Copy all the bootable image files +path=$4 +shift 4 +while [ $# -ne 0 ]; do + image_name=`basename $1` + if [ -f $path/$image_name ]; then + mv $path/$image_name $path/$image_name.old + fi + cat $1 > $path/$image_name + shift +done;