diff mbox

[U-Boot,v2] build: imx: Fix 'u-boot.imx' build without full OBJTREE reference

Message ID 1360593231-29661-1-git-send-email-otavio@ossystems.com.br
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Otavio Salvador Feb. 11, 2013, 2:33 p.m. UTC
When calling 'make u-boot.imx' the build were failing as it were
expecting the full path for the file; this regression has been
included by commit 71a988a (imximage.cfg: run files through C
preprocessor).

The direct references for u-boot.imx were replaced by $(obj) as
config.mk handles the proper setting of it making it set to $(OBJTREE)
when required.

The build has been test using:

 - ./MAKEALL -s mx5 -s mx6
 - make u-boot.imx
 - make O=/tmp/build

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2:
- Improve commit log
- Fix out of tree build

 Makefile                         | 4 ++--
 arch/arm/cpu/arm926ejs/config.mk | 2 +-
 arch/arm/cpu/armv7/config.mk     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Marek Vasut Feb. 11, 2013, 4:55 p.m. UTC | #1
Dear Otavio Salvador,

> When calling 'make u-boot.imx' the build were failing as it were
> expecting the full path for the file; this regression has been
> included by commit 71a988a (imximage.cfg: run files through C
> preprocessor).
> 
> The direct references for u-boot.imx were replaced by $(obj) as
> config.mk handles the proper setting of it making it set to $(OBJTREE)
> when required.
> 
> The build has been test using:
> 
>  - ./MAKEALL -s mx5 -s mx6
>  - make u-boot.imx
>  - make O=/tmp/build

BUILD_DIR=/tmp/xyz MAKEALL please.

Best regards,
Marek Vasut
Benoît Thébaudeau Feb. 12, 2013, 2:01 p.m. UTC | #2
Dear Otavio, Marek,

On Monday, February 11, 2013 5:55:17 PM, Marek Vasut wrote:
> Dear Otavio Salvador,
> 
> > When calling 'make u-boot.imx' the build were failing as it were
> > expecting the full path for the file; this regression has been
> > included by commit 71a988a (imximage.cfg: run files through C
> > preprocessor).
> > 
> > The direct references for u-boot.imx were replaced by $(obj) as
> > config.mk handles the proper setting of it making it set to $(OBJTREE)
> > when required.
> > 
> > The build has been test using:
> > 
> >  - ./MAKEALL -s mx5 -s mx6
> >  - make u-boot.imx
> >  - make O=/tmp/build
> 
> BUILD_DIR=/tmp/xyz MAKEALL please.

Once you're confident with this patch, do you mind if I integrate it as is in my
MXC NAND + SPL series in order to avoid merge conflicts (unless it is applied
before)?

Best regards,
Benoît
Otavio Salvador Feb. 12, 2013, 5:09 p.m. UTC | #3
On Tue, Feb 12, 2013 at 12:01 PM, Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:
> Dear Otavio, Marek,
>
> On Monday, February 11, 2013 5:55:17 PM, Marek Vasut wrote:
>> Dear Otavio Salvador,
>>
>> > When calling 'make u-boot.imx' the build were failing as it were
>> > expecting the full path for the file; this regression has been
>> > included by commit 71a988a (imximage.cfg: run files through C
>> > preprocessor).
>> >
>> > The direct references for u-boot.imx were replaced by $(obj) as
>> > config.mk handles the proper setting of it making it set to $(OBJTREE)
>> > when required.
>> >
>> > The build has been test using:
>> >
>> >  - ./MAKEALL -s mx5 -s mx6
>> >  - make u-boot.imx
>> >  - make O=/tmp/build
>>
>> BUILD_DIR=/tmp/xyz MAKEALL please.
>
> Once you're confident with this patch, do you mind if I integrate it as is in my
> MXC NAND + SPL series in order to avoid merge conflicts (unless it is applied
> before)?

Alright; It did the test Marek has requested and it works fine. I
think this should go to imx/master as it fixes a regression.
Stefano Babic Feb. 12, 2013, 5:53 p.m. UTC | #4
On 12/02/2013 18:55, Benoît Thébaudeau wrote:
> Hi Otavio,
> 

Hi Benoît,


>> Alright; It did the test Marek has requested and it works fine. I
>> think this should go to imx/master as it fixes a regression.
> 
> OK. I include it into my series so that patches apply fine whether Stefano
> applies it alone first or from my series.

I merged it - you do not need to bother about it.

Best regards,
Stefano
Benoît Thébaudeau Feb. 12, 2013, 5:55 p.m. UTC | #5
Hi Otavio,

On Tuesday, February 12, 2013 6:09:43 PM, Otavio Salvador wrote:
> On Tue, Feb 12, 2013 at 12:01 PM, Benoît Thébaudeau
> <benoit.thebaudeau@advansee.com> wrote:
> > Dear Otavio, Marek,
> >
> > On Monday, February 11, 2013 5:55:17 PM, Marek Vasut wrote:
> >> Dear Otavio Salvador,
> >>
> >> > When calling 'make u-boot.imx' the build were failing as it were
> >> > expecting the full path for the file; this regression has been
> >> > included by commit 71a988a (imximage.cfg: run files through C
> >> > preprocessor).
> >> >
> >> > The direct references for u-boot.imx were replaced by $(obj) as
> >> > config.mk handles the proper setting of it making it set to $(OBJTREE)
> >> > when required.
> >> >
> >> > The build has been test using:
> >> >
> >> >  - ./MAKEALL -s mx5 -s mx6
> >> >  - make u-boot.imx
> >> >  - make O=/tmp/build
> >>
> >> BUILD_DIR=/tmp/xyz MAKEALL please.
> >
> > Once you're confident with this patch, do you mind if I integrate it as is
> > in my
> > MXC NAND + SPL series in order to avoid merge conflicts (unless it is
> > applied
> > before)?
> 
> Alright; It did the test Marek has requested and it works fine. I
> think this should go to imx/master as it fixes a regression.

OK. I include it into my series so that patches apply fine whether Stefano
applies it alone first or from my series.

Best regards,
Benoît
Benoît Thébaudeau Feb. 12, 2013, 6:28 p.m. UTC | #6
Hi Stefano,

On Tuesday, February 12, 2013 6:53:39 PM, Stefano Babic wrote:
> On 12/02/2013 18:55, Benoît Thébaudeau wrote:
> > Hi Otavio,
> > 
> 
> Hi Benoît,
> 
> 
> >> Alright; It did the test Marek has requested and it works fine. I
> >> think this should go to imx/master as it fixes a regression.
> > 
> > OK. I include it into my series so that patches apply fine whether Stefano
> > applies it alone first or from my series.
> 
> I merged it - you do not need to bother about it.

Great, thanks.

Best regards,
Benoît
diff mbox

Patch

diff --git a/Makefile b/Makefile
index f4a9b33..a8c7b7b 100644
--- a/Makefile
+++ b/Makefile
@@ -467,8 +467,8 @@  $(obj)u-boot.img:	$(obj)u-boot.bin
 			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
 		-d $< $@
 
-$(OBJTREE)/u-boot.imx : $(obj)u-boot.bin $(SUBDIR_TOOLS) depend
-		$(MAKE) -C $(SRCTREE)/arch/arm/imx-common $@
+$(obj)u-boot.imx: $(obj)u-boot.bin depend
+		$(MAKE) -C $(SRCTREE)/arch/arm/imx-common $(OBJTREE)/u-boot.imx
 
 $(obj)u-boot.kwb:       $(obj)u-boot.bin
 		$(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \
diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk
index 47f24f5..6a3a1bb 100644
--- a/arch/arm/cpu/arm926ejs/config.mk
+++ b/arch/arm/cpu/arm926ejs/config.mk
@@ -34,6 +34,6 @@  PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT)
 
 ifneq ($(CONFIG_IMX_CONFIG),)
 
-ALL-y	+= $(OBJTREE)/u-boot.imx
+ALL-y	+= $(obj)u-boot.imx
 
 endif
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index 350e946..9c3e2f3 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -40,5 +40,5 @@  PF_NO_UNALIGNED := $(call cc-option, -mno-unaligned-access,)
 PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
 
 ifneq ($(CONFIG_IMX_CONFIG),)
-ALL-y	+= $(OBJTREE)/u-boot.imx
+ALL-y	+= $(obj)u-boot.imx
 endif