[PATCH] powerpc/boot: Only build board support files when required.

Stephen Rothwell sfr at canb.auug.org.au
Tue Apr 3 11:41:50 EST 2012


Hi Tony,

On Tue, 3 Apr 2012 10:55:59 +1000 Tony Breeds <tony at bakeyournoodle.com> wrote:
>
>  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

It is more ususal in the kernel makefiles to do something like:

src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c treeboot-walnut.c \

...

and then use $(src-wlib-y) and $(src-plat-y)

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20120403/b32c750f/attachment.sig>


More information about the Linuxppc-dev mailing list