From: Ian Campbell Subject: Re: [PATCH 4/8] arm: link a device tree blob into the xen image Date: Mon, 20 Feb 2012 17:20:12 +0000 Message-ID: <1329758412.3990.80.camel@zakaz.uk.xensource.com> References: <1329139131-27554-1-git-send-email-david.vrabel@citrix.com> <1329139131-27554-5-git-send-email-david.vrabel@citrix.com> <1329498796.3131.135.camel@zakaz.uk.xensource.com> <4F3E8CE1.7030803@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F3E8CE1.7030803@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-02-17 at 17:22 +0000, David Vrabel wrote: > On 17/02/12 17:13, Ian Campbell wrote: > > On Mon, 2012-02-13 at 13:18 +0000, David Vrabel wrote: > >> diff --git a/config/arm.mk b/config/arm.mk > >> index f64f0c1..f20fd2d 100644 > >> --- a/config/arm.mk > >> +++ b/config/arm.mk > >> @@ -16,3 +16,9 @@ LDFLAGS_DIRECT_Linux = _linux > >> LDFLAGS_DIRECT += -marmelf$(LDFLAGS_DIRECT_$(XEN_OS))_eabi > >> > >> CONFIG_LOAD_ADDRESS ?= 0x80000000 > >> + > >> +# XXX: When running on the model there is no bootloader to provide a > >> +# device tree. It must be linked into Xen. > >> +ifndef CONFIG_DTB_FILE > >> +$(error CONFIG_DTB_FILE must be set to the absolute filename of a > >> DTB) > >> +endif > > > > This turns out to be a little aggressive -- it also triggers when you > > are building the tools. Not a big deal, but a bit annoying, is there > > some way we can avoid this? Put it in xen/arch/arm/Foo perhaps? > > Does this do the right thing? It seems to, thanks. It still fails the Xen case reasonably early which was the only problem I could foresee. > > 8<--------- > arm: move check for CONFIG_DTB_FILE to xen/arch/arm/Makefile > > CONFIG_DTB_FILE only needs to be set when building Xen itself. > > Signed-off-by: David Vrabel Acked-by: Ian Campbell and queued for commit. > --- > config/arm.mk | 6 ------ > xen/arch/arm/Makefile | 4 ++++ > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/config/arm.mk b/config/arm.mk > index f20fd2d..f64f0c1 100644 > --- a/config/arm.mk > +++ b/config/arm.mk > @@ -16,9 +16,3 @@ LDFLAGS_DIRECT_Linux = _linux > LDFLAGS_DIRECT += -marmelf$(LDFLAGS_DIRECT_$(XEN_OS))_eabi > > CONFIG_LOAD_ADDRESS ?= 0x80000000 > - > -# XXX: When running on the model there is no bootloader to provide a > -# device tree. It must be linked into Xen. > -ifndef CONFIG_DTB_FILE > -$(error CONFIG_DTB_FILE must be set to the absolute filename of a DTB) > -endif > diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile > index 168716e..da9134b 100644 > --- a/xen/arch/arm/Makefile > +++ b/xen/arch/arm/Makefile > @@ -26,6 +26,10 @@ obj-y += vtimer.o > ifdef CONFIG_DTB_FILE > obj-y += dtb.o > AFLAGS += -DCONFIG_DTB_FILE=\"$(CONFIG_DTB_FILE)\" > +else > +# XXX: When running on the model there is no bootloader to provide a > +# device tree. It must be linked into Xen. > +$(error CONFIG_DTB_FILE must be set to the absolute filename of a DTB) > endif > > ALL_OBJS := head.o $(ALL_OBJS)