* [PATCH/RFC] [POWERPC] Allow multiple images to be built when CONFIG_DEFAULT_UIMAGE set
@ 2008-01-19 3:55 Grant Likely
2008-01-25 5:51 ` Grant Likely
0 siblings, 1 reply; 2+ messages in thread
From: Grant Likely @ 2008-01-19 3:55 UTC (permalink / raw)
To: linuxppc-dev, paulus, scottwood, david
From: Grant Likely <grant.likely@secretlab.ca>
Most of the embedded board ports select CONFIG_DEFAULT_UIMAGE so that
uImage files get built by default. However, the current code casues
the arch/powerpc/boot/Makefile to be called with the 'uImage' target
and adds 'uImage' to the 'image-y' make variable. If CONFIG_DEFAULT_UIMAGE
is not set, then the boot makefile is called with target 'zImage'.
However, the zImage target already automatically causes all targets
listed in 'image-y' to be built, which includes uImage.
This patch makes the default build target alwasy call the boot makefile
using the 'zImage' target, regardless of if CONFIG_DEFAULT_UIMAGE is set.
Making this change allows multiple boot images to be built from a single
kernel compile. An example of where this is useful is with the Efika
and lite5200 boards. Both boards can use the same kernel image (vmlinux),
but they use different boot image files (zImage.chrp vs. uImage). By
making this change, the boot makefile now builds both by default so a
single defconfig can be used for testing both platforms.
This patch also eliminates the BOOTIMAGE variable because it doesn't
appear to be used anywhere. (Someone please correct me if I'm wrong)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/Makefile | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index f70df9b..6451c2f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -151,10 +151,7 @@ core-$(CONFIG_XMON) += arch/powerpc/xmon/
drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
# Default to zImage, override when needed
-defaultimage-y := zImage
-defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage
-KBUILD_IMAGE := $(defaultimage-y)
-all: $(KBUILD_IMAGE)
+all: zImage
CPPFLAGS_vmlinux.lds := -Upowerpc
@@ -180,7 +177,7 @@ define archhelp
endef
install: vdso_install
- $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
+ $(Q)$(MAKE) $(build)=$(boot) install
vdso_install:
ifeq ($(CONFIG_PPC64),y)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH/RFC] [POWERPC] Allow multiple images to be built when CONFIG_DEFAULT_UIMAGE set
2008-01-19 3:55 [PATCH/RFC] [POWERPC] Allow multiple images to be built when CONFIG_DEFAULT_UIMAGE set Grant Likely
@ 2008-01-25 5:51 ` Grant Likely
0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2008-01-25 5:51 UTC (permalink / raw)
To: linuxppc-dev, paulus, scottwood, david, Kumar Gala, Jon Loeliger
Anybody have comments/concerns on this one?
Cheers,
g.
On 1/18/08, Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Most of the embedded board ports select CONFIG_DEFAULT_UIMAGE so that
> uImage files get built by default. However, the current code casues
> the arch/powerpc/boot/Makefile to be called with the 'uImage' target
> and adds 'uImage' to the 'image-y' make variable. If CONFIG_DEFAULT_UIMAGE
> is not set, then the boot makefile is called with target 'zImage'.
>
> However, the zImage target already automatically causes all targets
> listed in 'image-y' to be built, which includes uImage.
>
> This patch makes the default build target alwasy call the boot makefile
> using the 'zImage' target, regardless of if CONFIG_DEFAULT_UIMAGE is set.
> Making this change allows multiple boot images to be built from a single
> kernel compile. An example of where this is useful is with the Efika
> and lite5200 boards. Both boards can use the same kernel image (vmlinux),
> but they use different boot image files (zImage.chrp vs. uImage). By
> making this change, the boot makefile now builds both by default so a
> single defconfig can be used for testing both platforms.
>
> This patch also eliminates the BOOTIMAGE variable because it doesn't
> appear to be used anywhere. (Someone please correct me if I'm wrong)
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/powerpc/Makefile | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index f70df9b..6451c2f 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -151,10 +151,7 @@ core-$(CONFIG_XMON) += arch/powerpc/xmon/
> drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
>
> # Default to zImage, override when needed
> -defaultimage-y := zImage
> -defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage
> -KBUILD_IMAGE := $(defaultimage-y)
> -all: $(KBUILD_IMAGE)
> +all: zImage
>
> CPPFLAGS_vmlinux.lds := -Upowerpc
>
> @@ -180,7 +177,7 @@ define archhelp
> endef
>
> install: vdso_install
> - $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
> + $(Q)$(MAKE) $(build)=$(boot) install
>
> vdso_install:
> ifeq ($(CONFIG_PPC64),y)
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-25 5:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-19 3:55 [PATCH/RFC] [POWERPC] Allow multiple images to be built when CONFIG_DEFAULT_UIMAGE set Grant Likely
2008-01-25 5:51 ` 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).