public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Tony Breeds <tony@bakeyournoodle•com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: "Frank E. Svendsbøe" <frank.svendsboe@gmail•com>,
	"Wolfgang Denk" <wd@denx•de>,
	robert.karl.berger@gmail•com, linuxppc-dev@ozlabs•org
Subject: Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2
Date: Mon, 2 Apr 2012 16:28:29 +1000	[thread overview]
Message-ID: <20120402062826.GC2129@thor.bakeyournoodle.com> (raw)
In-Reply-To: <1333332115.30734.27.camel@pasglop>

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

On Mon, Apr 02, 2012 at 12:01:55PM +1000, Benjamin Herrenschmidt wrote:

> Ok, I've asked Tony to have a look at splitting the build decision
> in arch/powerpc/boot along the same lines as the CPU families... ie only
> wrappers for platforms potentially supported by the built kernel. That
> should fix it.

Please try this patch.  Only lightly tested here.  I haven't "split up"
src-wlib yet as I wanted to verify I'm on the right track.

From e0b1ac84bfd539482bc88b943724e577e6b8dfb3 Mon Sep 17 00:00:00 2001
From: Tony Breeds <tony@bakeyournoodle•com>
Date: Mon, 2 Apr 2012 16:20:35 +1000
Subject: [PATCH] powerpc/boot: Only build board support files when required.

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 |   56 +++++++++++++++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index e8461cb..a3c4ae0 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -69,19 +69,49 @@ src-wlib := string.S crt0.S crtsavres.S stdio.c main.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
+src-plat := of.c
+ifeq ($(CONFIG_40x),y)
+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-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-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-plat  += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c
+endif
+ifeq ($(CONFIG_PPC_82xx),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-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-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 --]

  reply	other threads:[~2012-04-02  6:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 12:10 kilauea compilation breaks with v3.3 kernel and ELDK 4.2 Robert Berger
2012-03-21 13:29 ` Josh Boyer
2012-03-21 16:25   ` Wolfgang Denk
2012-03-24 23:53     ` Benjamin Herrenschmidt
2012-03-26 13:36       ` Josh Boyer
2012-03-30 22:53         ` Frank Svendsbøe
2012-03-31  0:03           ` Benjamin Herrenschmidt
2012-04-01 22:14             ` Frank E. Svendsbøe
2012-04-02  2:01               ` Benjamin Herrenschmidt
2012-04-02  6:28                 ` Tony Breeds [this message]
2012-04-02  8:37                   ` Frank E. Svendsbøe
2012-05-06 14:37                   ` Robert Berger
2012-05-17 14:37                     ` Frank Svendsbøe
2012-04-02 12:10             ` Josh Boyer
2012-04-02 21:08               ` Benjamin Herrenschmidt
2012-04-02 21:26                 ` Josh Boyer
2012-04-04 19:21               ` Wolfgang Denk
2012-04-05  0:02                 ` Stephen Rothwell
2012-04-05 17:44                   ` Wolfgang Denk
2012-03-21 22:14 ` Tony Breeds
2012-03-21 22:34   ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120402062826.GC2129@thor.bakeyournoodle.com \
    --to=tony@bakeyournoodle$(echo .)com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=frank.svendsboe@gmail$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=robert.karl.berger@gmail$(echo .)com \
    --cc=wd@denx$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox