linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/boot: Only build board support files when required.
@ 2012-04-03  0:55 Tony Breeds
  2012-04-03  1:00 ` David Gibson
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tony Breeds @ 2012-04-03  0:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, LinuxPPC-dev, Josh Boyer
  Cc: Frank Svendsbøe, Wolfgang Denk, robert.karl.berger

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

Currently we build all board files regardless of the final zImage
target.  This is sub-optimal (in terms on compilation) and leads to
problems in one platform needlessly causing failures for other
platforms.

Use the Kconfig variables to selectively construct this board files to
build.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
 arch/powerpc/boot/Makefile |   69 +++++++++++++++++++++++++++++++++-----------
 1 files changed, 52 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index e8461cb..3d4d9ea 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -65,23 +65,58 @@ $(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \
 src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
 		$(libfdt) libfdt-wrapper.c \
 		ns16550.c serial.c simple_alloc.c div64.S util.S \
-		gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
-		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
-		cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \
-		fsl-soc.c mpc8xx.c pq2.c ugecon.c
-src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \
-		cuboot-ebony.c cuboot-hotfoot.c epapr.c treeboot-ebony.c \
-		prpmc2800.c \
-		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
-		cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \
-		cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \
-		fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \
-		cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
-		cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
-		virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
-		cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \
-		gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \
-		treeboot-currituck.c
+		gunzip_util.c elf_util.c $(zlib) devtree.c stdlib.c \
+		oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
+		uartlite.c mpc52xx-psc.c
+src-plat := of.c
+ifeq ($(CONFIG_40x),y)
+src-wlib  += 4xx.c planetcore.c
+src-plat += fixed-head.S ep405.c cuboot-hotfoot.c treeboot-walnut.c \
+		cuboot-acadia.c cuboot-kilauea.c \
+		simpleboot.c virtex405-head.S virtex.c
+endif
+ifeq ($(CONFIG_44x),y)
+src-wlib  += 4xx.c ebony.c bamboo.c
+src-plat  += treeboot-ebony cuboot-ebony treeboot-bamboo cuboot-bamboo \
+		cuboot-sam440ep.c cuboot-sequoia.c cuboot-rainier.c \
+		cuboot-taishan.c cuboot-katmai.c cuboot-warp.c \
+		cuboot-yosemite.c treeboot-iss4xx.c treeboot-currituck.c \
+		simpleboot.c fixed-head.S virtex.c
+endif
+ifeq ($(CONFIG_8xx),y)
+src-wlib  += mpc8xx.c planetcore.c
+src-plat  += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c
+endif
+ifeq ($(CONFIG_PPC_MPC52xx),y)
+src-plat  += cuboot-52xx.c
+endif
+ifeq ($(CONFIG_PPC_82xx),y)
+src-wlib  += pq2.c fsl-soc.c
+src-plat  += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c
+endif
+ifeq ($(CONFIG_PPC_83xx),y)
+src-plat  += cuboot-83xx.c fixed-head.S redboot-83xx.c
+endif
+ifeq ($(CONFIG_FSL_SOC_BOOKE),y)
+src-plat  += cuboot-85xx.c cuboot-85xx-cpm2.c
+endif
+ifeq ($(CONFIG_EMBEDDED6xx),y)
+src-wlib  += mv64x60.c mv64x60_i2c.c ugecon.c
+src-plat  += cuboot-pq2.c cuboot-mpc7448hpc2.c cuboot-c2k.c \
+		gamecube-head.S gamecube.c wii-head.S wii.c holly.c \
+		prpmc2800.c
+endif
+ifeq ($(CONFIG_AMIGAONE),y)
+src-plat  += cuboot-amigaone.c
+endif
+ifeq ($(CONFIG_PPC_PS3),y)
+src-plat  += ps3-head.S ps3-hvcall.S ps3.c
+endif
+ifeq ($(CONFIG_EPAPR_BOOT),y)
+src-plat  += epapr.c
+endif
+src-wlib := $(sort $(src-wlib))
+src-plat := $(sort $(src-plat))
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
-- 
1.7.7.6



Yours Tony

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-04-05  3:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03  0:55 [PATCH] powerpc/boot: Only build board support files when required Tony Breeds
2012-04-03  1:00 ` David Gibson
2012-04-03  1:26   ` Benjamin Herrenschmidt
2012-04-03  1:31   ` Tony Breeds
2012-04-03  1:41 ` Stephen Rothwell
2012-04-03  1:55   ` Tony Breeds
2012-04-03  1:57     ` Stephen Rothwell
2012-04-04  1:00 ` [PATCH v2] " Tony Breeds
2012-04-05  3:44 ` [PATCH] " Geoff Levand

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).