All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: tegra2: fix out-of-tree build
@ 2011-08-23 10:03 Che-Liang Chiou
  2011-08-23 17:01 ` Anton Staaf
  0 siblings, 1 reply; 4+ messages in thread
From: Che-Liang Chiou @ 2011-08-23 10:03 UTC (permalink / raw)
  To: u-boot

The out-of-tree build fails because the Makefiles in question depend on
source files of another directory but do not explicitly mkdir that
directory.

As a matter of fact, other Makefiles under board/*/ directory that refer
to source files under another directory explicitly call mkdir.

This patch adds explicit mkdir's to the Makefiles in question, and
verifies that out-of-tree build is working.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
---
 board/nvidia/harmony/Makefile  |    4 ++++
 board/nvidia/seaboard/Makefile |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/board/nvidia/harmony/Makefile b/board/nvidia/harmony/Makefile
index 9fb6b57..ebd8e02 100644
--- a/board/nvidia/harmony/Makefile
+++ b/board/nvidia/harmony/Makefile
@@ -24,6 +24,10 @@
 
 include $(TOPDIR)/config.mk
 
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
+
 LIB	= $(obj)lib$(BOARD).o
 
 COBJS	:= $(BOARD).o
diff --git a/board/nvidia/seaboard/Makefile b/board/nvidia/seaboard/Makefile
index 9fb6b57..ebd8e02 100644
--- a/board/nvidia/seaboard/Makefile
+++ b/board/nvidia/seaboard/Makefile
@@ -24,6 +24,10 @@
 
 include $(TOPDIR)/config.mk
 
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
+
 LIB	= $(obj)lib$(BOARD).o
 
 COBJS	:= $(BOARD).o
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] arm: tegra2: fix out-of-tree build
  2011-08-23 10:03 [U-Boot] [PATCH] arm: tegra2: fix out-of-tree build Che-Liang Chiou
@ 2011-08-23 17:01 ` Anton Staaf
  2011-08-24  3:03   ` Che-liang Chiou
  0 siblings, 1 reply; 4+ messages in thread
From: Anton Staaf @ 2011-08-23 17:01 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 23, 2011 at 3:03 AM, Che-Liang Chiou <clchiou@chromium.org> wrote:
> The out-of-tree build fails because the Makefiles in question depend on
> source files of another directory but do not explicitly mkdir that
> directory.
>
> As a matter of fact, other Makefiles under board/*/ directory that refer
> to source files under another directory explicitly call mkdir.
>
> This patch adds explicit mkdir's to the Makefiles in question, and
> verifies that out-of-tree build is working.
>
> Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> ---
> ?board/nvidia/harmony/Makefile ?| ? ?4 ++++
> ?board/nvidia/seaboard/Makefile | ? ?4 ++++
> ?2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/board/nvidia/harmony/Makefile b/board/nvidia/harmony/Makefile
> index 9fb6b57..ebd8e02 100644
> --- a/board/nvidia/harmony/Makefile
> +++ b/board/nvidia/harmony/Makefile
> @@ -24,6 +24,10 @@
>
> ?include $(TOPDIR)/config.mk
>
> +ifneq ($(OBJTREE),$(SRCTREE))
> +$(shell mkdir -p $(obj)../common)
> +endif
> +

We should actually fix this by making the other directory build a
library and then include the library in this Makefile.  I had a
reminder to get back to this but haven't yet.

Thanks,
    Anton

> ?LIB ? ?= $(obj)lib$(BOARD).o
>
> ?COBJS ?:= $(BOARD).o
> diff --git a/board/nvidia/seaboard/Makefile b/board/nvidia/seaboard/Makefile
> index 9fb6b57..ebd8e02 100644
> --- a/board/nvidia/seaboard/Makefile
> +++ b/board/nvidia/seaboard/Makefile
> @@ -24,6 +24,10 @@
>
> ?include $(TOPDIR)/config.mk
>
> +ifneq ($(OBJTREE),$(SRCTREE))
> +$(shell mkdir -p $(obj)../common)
> +endif
> +
> ?LIB ? ?= $(obj)lib$(BOARD).o
>
> ?COBJS ?:= $(BOARD).o
> --
> 1.7.3.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] arm: tegra2: fix out-of-tree build
  2011-08-23 17:01 ` Anton Staaf
@ 2011-08-24  3:03   ` Che-liang Chiou
  2011-08-24 17:35     ` Anton Staaf
  0 siblings, 1 reply; 4+ messages in thread
From: Che-liang Chiou @ 2011-08-24  3:03 UTC (permalink / raw)
  To: u-boot

Hi Anton,

Thanks for comments. Replied below.

Regards,
Che-Liang

On Wed, Aug 24, 2011 at 1:01 AM, Anton Staaf <robotboy@google.com> wrote:
> On Tue, Aug 23, 2011 at 3:03 AM, Che-Liang Chiou <clchiou@chromium.org> wrote:
>> The out-of-tree build fails because the Makefiles in question depend on
>> source files of another directory but do not explicitly mkdir that
>> directory.
>>
>> As a matter of fact, other Makefiles under board/*/ directory that refer
>> to source files under another directory explicitly call mkdir.
>>
>> This patch adds explicit mkdir's to the Makefiles in question, and
>> verifies that out-of-tree build is working.
>>
>> Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
>> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
>> ---
>> ?board/nvidia/harmony/Makefile ?| ? ?4 ++++
>> ?board/nvidia/seaboard/Makefile | ? ?4 ++++
>> ?2 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/board/nvidia/harmony/Makefile b/board/nvidia/harmony/Makefile
>> index 9fb6b57..ebd8e02 100644
>> --- a/board/nvidia/harmony/Makefile
>> +++ b/board/nvidia/harmony/Makefile
>> @@ -24,6 +24,10 @@
>>
>> ?include $(TOPDIR)/config.mk
>>
>> +ifneq ($(OBJTREE),$(SRCTREE))
>> +$(shell mkdir -p $(obj)../common)
>> +endif
>> +
>
> We should actually fix this by making the other directory build a
> library and then include the library in this Makefile. ?I had a
> reminder to get back to this but haven't yet.
>
> Thanks,
> ? ?Anton
>

I find that Makefiles that call mkdir are those depend on a
board/*/common/ directory which is shared among board variants (with a
couple of exceptions). I guess the reason why none of boards
implemented your proposal is because it involves changes to the
top-level Makefile. The top-level Makefile cherry-picks the libraries,
and the (only?) board-dependent library is "LIBBOARD =
board/$(BOARDDIR)/lib$(BOARD).o". And I guess implementing your
proposal means we have to add a LIBBOARD_COMMON to the top-level
Makefile. I am not sure whether adding a board-common library to the
top-level Makefile is possible. If it is possible, maybe we could
start from this patch. What do you think?

>> ?LIB ? ?= $(obj)lib$(BOARD).o
>>
>> ?COBJS ?:= $(BOARD).o
>> diff --git a/board/nvidia/seaboard/Makefile b/board/nvidia/seaboard/Makefile
>> index 9fb6b57..ebd8e02 100644
>> --- a/board/nvidia/seaboard/Makefile
>> +++ b/board/nvidia/seaboard/Makefile
>> @@ -24,6 +24,10 @@
>>
>> ?include $(TOPDIR)/config.mk
>>
>> +ifneq ($(OBJTREE),$(SRCTREE))
>> +$(shell mkdir -p $(obj)../common)
>> +endif
>> +
>> ?LIB ? ?= $(obj)lib$(BOARD).o
>>
>> ?COBJS ?:= $(BOARD).o
>> --
>> 1.7.3.1
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] arm: tegra2: fix out-of-tree build
  2011-08-24  3:03   ` Che-liang Chiou
@ 2011-08-24 17:35     ` Anton Staaf
  0 siblings, 0 replies; 4+ messages in thread
From: Anton Staaf @ 2011-08-24 17:35 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 23, 2011 at 8:03 PM, Che-liang Chiou <clchiou@chromium.org> wrote:
> Hi Anton,
>
> Thanks for comments. Replied below.
>
> Regards,
> Che-Liang
>
> On Wed, Aug 24, 2011 at 1:01 AM, Anton Staaf <robotboy@google.com> wrote:
>> On Tue, Aug 23, 2011 at 3:03 AM, Che-Liang Chiou <clchiou@chromium.org> wrote:
>>> The out-of-tree build fails because the Makefiles in question depend on
>>> source files of another directory but do not explicitly mkdir that
>>> directory.
>>>
>>> As a matter of fact, other Makefiles under board/*/ directory that refer
>>> to source files under another directory explicitly call mkdir.
>>>
>>> This patch adds explicit mkdir's to the Makefiles in question, and
>>> verifies that out-of-tree build is working.
>>>
>>> Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
>>> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
>>> ---
>>> ?board/nvidia/harmony/Makefile ?| ? ?4 ++++
>>> ?board/nvidia/seaboard/Makefile | ? ?4 ++++
>>> ?2 files changed, 8 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/board/nvidia/harmony/Makefile b/board/nvidia/harmony/Makefile
>>> index 9fb6b57..ebd8e02 100644
>>> --- a/board/nvidia/harmony/Makefile
>>> +++ b/board/nvidia/harmony/Makefile
>>> @@ -24,6 +24,10 @@
>>>
>>> ?include $(TOPDIR)/config.mk
>>>
>>> +ifneq ($(OBJTREE),$(SRCTREE))
>>> +$(shell mkdir -p $(obj)../common)
>>> +endif
>>> +
>>
>> We should actually fix this by making the other directory build a
>> library and then include the library in this Makefile. ?I had a
>> reminder to get back to this but haven't yet.
>>
>> Thanks,
>> ? ?Anton
>>
>
> I find that Makefiles that call mkdir are those depend on a
> board/*/common/ directory which is shared among board variants (with a
> couple of exceptions). I guess the reason why none of boards
> implemented your proposal is because it involves changes to the
> top-level Makefile. The top-level Makefile cherry-picks the libraries,
> and the (only?) board-dependent library is "LIBBOARD =
> board/$(BOARDDIR)/lib$(BOARD).o". And I guess implementing your
> proposal means we have to add a LIBBOARD_COMMON to the top-level
> Makefile. I am not sure whether adding a board-common library to the
> top-level Makefile is possible. If it is possible, maybe we could
> start from this patch. What do you think?

I'm not sure what the accepted path is to add new libraries.  Albert
had indicated in a previous thread for this patch that it should be
done using the library approach.  I haven't had time to look into the
actual implementation of that approach however.

-Anton

>>> ?LIB ? ?= $(obj)lib$(BOARD).o
>>>
>>> ?COBJS ?:= $(BOARD).o
>>> diff --git a/board/nvidia/seaboard/Makefile b/board/nvidia/seaboard/Makefile
>>> index 9fb6b57..ebd8e02 100644
>>> --- a/board/nvidia/seaboard/Makefile
>>> +++ b/board/nvidia/seaboard/Makefile
>>> @@ -24,6 +24,10 @@
>>>
>>> ?include $(TOPDIR)/config.mk
>>>
>>> +ifneq ($(OBJTREE),$(SRCTREE))
>>> +$(shell mkdir -p $(obj)../common)
>>> +endif
>>> +
>>> ?LIB ? ?= $(obj)lib$(BOARD).o
>>>
>>> ?COBJS ?:= $(BOARD).o
>>> --
>>> 1.7.3.1
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>
>>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-24 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 10:03 [U-Boot] [PATCH] arm: tegra2: fix out-of-tree build Che-Liang Chiou
2011-08-23 17:01 ` Anton Staaf
2011-08-24  3:03   ` Che-liang Chiou
2011-08-24 17:35     ` Anton Staaf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.