* [PATCH] powerpc: Copy bootable images in the default install script
@ 2008-12-20 0:57 Grant Likely
2009-01-03 13:50 ` Grant Likely
2009-01-05 15:00 ` Josh Boyer
0 siblings, 2 replies; 6+ messages in thread
From: Grant Likely @ 2008-12-20 0:57 UTC (permalink / raw)
Cc: LinuxPPC Mailing List, Paul Mackerras
From: Grant Likely <grant.likely@secretlab.ca>
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 <galak@kernel.crashing.org>
CC: Josh Boyer <jwboyer@linux.vnet.ibm.com>
CC: Paul Mackerras <paulus@samba.org>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: LinuxPPC Mailing List <linuxppc-dev@ozlabs.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
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;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Copy bootable images in the default install script
2008-12-20 0:57 [PATCH] powerpc: Copy bootable images in the default install script Grant Likely
@ 2009-01-03 13:50 ` Grant Likely
2009-01-05 15:00 ` Josh Boyer
1 sibling, 0 replies; 6+ messages in thread
From: Grant Likely @ 2009-01-03 13:50 UTC (permalink / raw)
To: Grant Likely; +Cc: LinuxPPC Mailing List, Paul Mackerras
Ben, Kumar & Josh; any comments on this?
Thanks,
g.
On Fri, Dec 19, 2008 at 5:57 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> 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 <galak@kernel.crashing.org>
> CC: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> CC: Paul Mackerras <paulus@samba.org>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: LinuxPPC Mailing List <linuxppc-dev@ozlabs.org>
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> 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;
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Copy bootable images in the default install script
2008-12-20 0:57 [PATCH] powerpc: Copy bootable images in the default install script Grant Likely
2009-01-03 13:50 ` Grant Likely
@ 2009-01-05 15:00 ` Josh Boyer
2009-01-05 15:28 ` Grant Likely
1 sibling, 1 reply; 6+ messages in thread
From: Josh Boyer @ 2009-01-05 15:00 UTC (permalink / raw)
To: Grant Likely; +Cc: Paul Mackerras, LinuxPPC Mailing List
On Fri, Dec 19, 2008 at 05:57:20PM -0700, Grant Likely wrote:
>From: Grant Likely <grant.likely@secretlab.ca>
>
>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.
What do you do for cases where there isn't a single file? E.g. a
canyonlands board will need both the uImage and caynonlands.dtb files
to be "installed". U-Boot needs to be provided with both of them.
josh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Copy bootable images in the default install script
2009-01-05 15:00 ` Josh Boyer
@ 2009-01-05 15:28 ` Grant Likely
2009-01-06 16:12 ` Josh Boyer
0 siblings, 1 reply; 6+ messages in thread
From: Grant Likely @ 2009-01-05 15:28 UTC (permalink / raw)
To: Josh Boyer; +Cc: Paul Mackerras, LinuxPPC Mailing List
On Mon, Jan 5, 2009 at 8:00 AM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
>
> On Fri, Dec 19, 2008 at 05:57:20PM -0700, Grant Likely wrote:
> >From: Grant Likely <grant.likely@secretlab.ca>
> >
> >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.
>
> What do you do for cases where there isn't a single file? E.g. a
> canyonlands board will need both the uImage and caynonlands.dtb files
> to be "installed". U-Boot needs to be provided with both of them.
That is exactly what this patch does. It copies all of the image
files in $(image-y).
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Copy bootable images in the default install script
2009-01-05 15:28 ` Grant Likely
@ 2009-01-06 16:12 ` Josh Boyer
2009-01-05 16:17 ` Grant Likely
0 siblings, 1 reply; 6+ messages in thread
From: Josh Boyer @ 2009-01-06 16:12 UTC (permalink / raw)
To: Grant Likely; +Cc: LinuxPPC Mailing List, Paul Mackerras
On Mon, Jan 05, 2009 at 08:28:56AM -0700, Grant Likely wrote:
>On Mon, Jan 5, 2009 at 8:00 AM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
>>
>> On Fri, Dec 19, 2008 at 05:57:20PM -0700, Grant Likely wrote:
>> >From: Grant Likely <grant.likely@secretlab.ca>
>> >
>> >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.
>>
>> What do you do for cases where there isn't a single file? E.g. a
>> canyonlands board will need both the uImage and caynonlands.dtb files
>> to be "installed". U-Boot needs to be provided with both of them.
>
>That is exactly what this patch does. It copies all of the image
>files in $(image-y).
Well, it would if the .dtb files were includes in image-y, but they
aren't. Anyway, that doesn't seem to be a bug or short-coming of the
patch itself, so this looks good to me.
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
josh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Copy bootable images in the default install script
2009-01-06 16:12 ` Josh Boyer
@ 2009-01-05 16:17 ` Grant Likely
0 siblings, 0 replies; 6+ messages in thread
From: Grant Likely @ 2009-01-05 16:17 UTC (permalink / raw)
To: Josh Boyer; +Cc: LinuxPPC Mailing List, Paul Mackerras
On Tue, Jan 6, 2009 at 9:12 AM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Mon, Jan 05, 2009 at 08:28:56AM -0700, Grant Likely wrote:
>>On Mon, Jan 5, 2009 at 8:00 AM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
>>>
>>> On Fri, Dec 19, 2008 at 05:57:20PM -0700, Grant Likely wrote:
>>> >From: Grant Likely <grant.likely@secretlab.ca>
>>> >
>>> >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.
>>>
>>> What do you do for cases where there isn't a single file? E.g. a
>>> canyonlands board will need both the uImage and caynonlands.dtb files
>>> to be "installed". U-Boot needs to be provided with both of them.
>>
>>That is exactly what this patch does. It copies all of the image
>>files in $(image-y).
>
> Well, it would if the .dtb files were includes in image-y, but they
> aren't. Anyway, that doesn't seem to be a bug or short-coming of the
> patch itself, so this looks good to me.
But there is nothing preventing the .dtb files being added to image-y.
If you add them, they will be built and copied. :-)
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-05 16:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 0:57 [PATCH] powerpc: Copy bootable images in the default install script Grant Likely
2009-01-03 13:50 ` Grant Likely
2009-01-05 15:00 ` Josh Boyer
2009-01-05 15:28 ` Grant Likely
2009-01-06 16:12 ` Josh Boyer
2009-01-05 16:17 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).