linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: linuxppc-dev <Linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/13] powerpc: Add Makefile rules to wrap dts file in zImage
Date: Fri, 11 May 2007 09:29:45 +1000	[thread overview]
Message-ID: <20070510232945.GB27188@localhost.localdomain> (raw)
In-Reply-To: <20070510200445.GB19756@mag.az.mvista.com>

On Thu, May 10, 2007 at 01:04:45PM -0700, Mark A. Greer wrote:
> 
> Add 'zImage.dts' and 'zImage.dts_initrd' build rules that automatically
> compile and wrap a dts file from arch/powerpc/boot/dts into the zImage file.
> The resulting zImage will be arch/powerpc/boot/zImage.dts.<platform> and
> arch/powerpc/boot/zImage.dts_initrd.<platform>, respectively.
> 
> Having separate rules allows the user to choose whether to include a device
> tree--and which device tree--at build time.  This is useful when one Makefile
> target builds a zImage that runs on several platforms except for differing
> device trees.  By just setting CONFIG_DEVICE_TREE and running "make zImage.dts"
> the exact zImage you want is built without Makefile bloat or manually running
> the wrapper script.
> 
> The dts file is expected to be arch/powerpc/boot/dts/$(CONFIG_DEVICE_TREE)
> 
> Signed-off-by: Mark A. Greer <mgreer@mvista.com>
> ---
>  arch/powerpc/Makefile      |    2 +-
>  arch/powerpc/boot/Makefile |   24 +++++++++++++++++++++++-
>  2 files changed, 24 insertions(+), 2 deletions(-)
> 
> Index: powerpc/arch/powerpc/boot/Makefile
> ===================================================================
> --- powerpc.orig/arch/powerpc/boot/Makefile
> +++ powerpc/arch/powerpc/boot/Makefile
> @@ -154,9 +154,27 @@ targets	+= $(image-y) $(initrd-y)
>  
>  $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
>  
> +dts-  := $(patsubst zImage%, zImage.dts%, $(image-n) $(image-))
> +dts-y := $(patsubst zImage%, zImage.dts%, $(image-y))
> +dts-y := $(filter-out $(image-y), $(dts-y))
> +targets	+= $(image-y) $(dts-y)
> +
> +dts_initrd-  := $(patsubst zImage%, zImage.dts_initrd%, $(image-n) $(image-))
> +dts_initrd-y := $(patsubst zImage%, zImage.dts_initrd%, $(image-y))
> +dts_initrd-y := $(filter-out $(image-y), $(dts_initrd-y))
> +targets	+= $(image-y) $(dts_initrd-y)
> +
> +$(addprefix $(obj)/, $(dts_initrd-y)): $(obj)/ramdisk.image.gz
> +
>  # Don't put the ramdisk on the pattern rule; when its missing make will try
>  # the pattern rule with less dependencies that also matches (even with the
>  # hard dependency listed).
> +$(obj)/zImage.dts_initrd.%: vmlinux $(wrapperbits)
> +	$(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
> +
> +$(obj)/zImage.dts.%: vmlinux $(wrapperbits)
> +	$(call if_changed,wrap,$*,$(dts))
> +
>  $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
>  	$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
>  
> @@ -195,13 +213,17 @@ $(obj)/zImage:		$(addprefix $(obj)/, $(i
>  	@rm -f $@; ln $< $@
>  $(obj)/zImage.initrd:	$(addprefix $(obj)/, $(initrd-y))
>  	@rm -f $@; ln $< $@
> +$(obj)/zImage.dts:	$(addprefix $(obj)/, $(dts-y))
> +	@rm -f $@; ln $< $@
> +$(obj)/zImage.dts_initrd:	$(addprefix $(obj)/, $(dts_initrd-y))
> +	@rm -f $@; ln $< $@

I don't think there a lot of point to this part of the patch.  Just
have image-y directly specify the appropriate zImage.dts.% form (or
forms).

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2007-05-10 23:29 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 20:02 [PATCH 0/13] powerpc: Add support for Marvell/mv64x60 and prpmc2800 Mark A. Greer
2007-05-10 20:04 ` [PATCH 1/13] powerpc: Add Makefile rules to wrap dts file in zImage Mark A. Greer
2007-05-10 23:29   ` David Gibson [this message]
2007-05-11 15:59     ` Mark A. Greer
2007-05-10 20:05 ` [PATCH 2/13] powerpc: Add bootwrapper support for Marvell/mv64x60 hostbridge Mark A. Greer
2007-05-10 20:05 ` [PATCH 3/13] powerpc: Add bootwrapper support for Marvell MPSC Mark A. Greer
2007-05-10 20:06 ` [PATCH 4/13] powerpc: Add bootwrapper support for Marvell/mv64x60 I2C Mark A. Greer
2007-05-10 20:06 ` [PATCH 5/13] powerpc: Add interrupt support for Marvell mv64x60 chips Mark A. Greer
2007-05-10 20:07 ` [PATCH 6/13] powerpc: Create Marvell mv64x60 MPSC (serial) platform_data Mark A. Greer
2007-05-10 20:07 ` [PATCH 7/13] powerpc: Create Marvell mv64x60 ethernet platform_data Mark A. Greer
2007-05-10 20:07 ` [PATCH 8/13] powerpc: Create Marvell mv64x60 I2C platform_data Mark A. Greer
2007-05-10 20:08 ` [PATCH 9/13] powerpc: Add Marvell mv64x60 PCI bridge support Mark A. Greer
2007-05-10 20:08 ` [PATCH 10/13] powerpc: check cache coherency of kernel vs firmware Mark A. Greer
2007-05-10 20:08 ` [PATCH 11/13] powerpc: Add DTS file for the Motorola PrPMC2800 platform Mark A. Greer
2007-05-10 21:44   ` Kumar Gala
2007-05-10 23:37   ` David Gibson
2007-05-12 11:59     ` Segher Boessenkool
2007-05-13  0:00       ` Jerry Van Baren
2007-05-13  0:21         ` Segher Boessenkool
2007-05-13 12:50           ` Jerry Van Baren
2007-05-13 14:45             ` Segher Boessenkool
2007-05-13  1:10       ` David Gibson
2007-05-10 20:09 ` [PATCH 12/13] powerpc: Add bootwrapper support for " Mark A. Greer
2007-05-10 20:09 ` [PATCH 13/13] powerpc: Add arch/powerpc support for the Motorola PrPMC2800 Mark A. Greer
2007-05-10 21:57 ` arch/powerpc/sysdev: dumping ground or only for shared drivers? Olof Johansson
2007-05-10 22:06   ` Kumar Gala
2007-05-11  1:00     ` Josh Boyer
2007-05-15  9:53     ` Christian Krafft
2007-05-10 22:40   ` David Gibson
2007-05-10 23:00   ` Mark A. Greer
2007-05-11  0:26   ` Paul Mackerras
2007-05-11 17:05     ` Linas Vepstas
2007-05-15 21:06       ` Kumar Gala
2007-05-15 22:06         ` Mark A. Greer
2007-05-15 22:19           ` Grant Likely
2007-05-15 22:25             ` Olof Johansson
2007-05-15 22:30               ` Kumar Gala
2007-05-15 23:56               ` Mark A. Greer
2007-05-16  0:32           ` Mark A. Greer
  -- strict thread matches above, loose matches on Subject: below --
2007-05-12  0:46 [PATCH 0/13] powerpc: Add support for Marvell/mv64x60 and prpmc2800 Mark A. Greer
2007-05-12  0:53 ` [PATCH 1/13] powerpc: Add Makefile rules to wrap dts file in zImage Mark A. Greer
2007-05-14  0:33   ` David Gibson
2007-05-14  3:46     ` Mark A. Greer
2007-05-14  3:49       ` David Gibson
2007-05-21 18:10     ` Mark A. Greer
2007-05-22  0:23       ` David Gibson
2007-05-24 21:28         ` Mark A. Greer
2007-05-25  1:32           ` David Gibson
2007-05-25  1:33             ` David Gibson
2007-05-25 20:50               ` Mark A. Greer
2007-05-28  4:43                 ` David Gibson

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=20070510232945.GB27188@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=mgreer@mvista.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).