powerpc: Copy bootable images in the default install script
authorGrant Likely <grant.likely@secretlab.ca>
Fri, 19 Dec 2008 14:57:20 +0000 (14:57 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 8 Jan 2009 05:25:09 +0000 (16:25 +1100)
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.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/boot/Makefile
arch/powerpc/boot/install.sh

index ab6dda37243870f782572c1a5d2502413d0ea528..e84df338ea298762cb3f75c8393aef3dc14a3167 100644 (file)
@@ -356,7 +356,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.* \
index b002bfd56786bd4d174e38f62a9d8cd59bd5f2c0..51b2387bdba0e82dfd8b75de48b56a18cd4fd2ef 100644 (file)
@@ -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;
This page took 0.025908 seconds and 5 git commands to generate.