public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h
@ 2011-08-17 10:12 Stefano Babic
  2011-08-17 13:02 ` Matthias Weißer
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Stefano Babic @ 2011-08-17 10:12 UTC (permalink / raw)
  To: u-boot

commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
building on a different directory with the O= parameter.
The patch wil fix this issue, generating always asm-offsets.h before
the other targets.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---

Note: the patch fixes the issue, however I generate an empty asm-offsets.c
for boards that do not have one. Is there a better way to reach the goal ?

 Makefile |   19 ++++++++++++++++++-
 rules.mk |   10 ----------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index f8ae883..10b2498 100644
--- a/Makefile
+++ b/Makefile
@@ -460,7 +460,8 @@ updater:
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \
 		$(obj)include/autoconf.mk \
-		$(obj)include/generated/generic-asm-offsets.h
+		$(obj)include/generated/generic-asm-offsets.h \
+		$(obj)include/asm/arch/asm-offsets.h
 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
 			$(MAKE) -C $$dir _depend ; done
 
@@ -519,6 +520,22 @@ $(obj)lib/asm-offsets.s:	$(obj)include/autoconf.mk.dep \
 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
 		-o $@ $(src)lib/asm-offsets.c -c -S
 
+$(obj)include/asm/arch/asm-offsets.h:	$(obj)include/autoconf.mk.dep \
+	$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
+	@echo Generating $@
+	tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@
+
+$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:	$(obj)include/autoconf.mk.dep check_cpu_asm_offsets
+	@mkdir -p $(obj)$(CPUDIR)/$(SOC)
+	$(CC) -DDO_DEPS_ONLY \
+		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+		-o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S
+
+#	$(src)$(CPUDIR)/$(SOC)/asm-offsets.c
+check_cpu_asm_offsets:
+	if [ ! -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
+        touch $(src)$(CPUDIR)/$(SOC)/asm-offsets.c;fi
+
 #########################################################################
 else	# !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
diff --git a/rules.mk b/rules.mk
index 5fd12a0..c2860e5 100644
--- a/rules.mk
+++ b/rules.mk
@@ -42,14 +42,4 @@ $(HOSTOBJS): $(obj)%.o: %.c
 $(NOPEDOBJS): $(obj)%.o: %.c
 	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
 
-$(TOPDIR)/include/asm/arch/asm-offsets.h:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s
-	@echo Generating $@
-	$(TOPDIR)/tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@
-
-$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c
-	$(CC) -DDO_DEPS_ONLY \
-		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
-		-o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S
 #########################################################################
-- 
1.7.1

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

* [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h
  2011-08-17 10:12 [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h Stefano Babic
@ 2011-08-17 13:02 ` Matthias Weißer
  2011-08-17 13:15   ` Stefano Babic
  2011-08-30 13:13 ` [U-Boot] [PATCH V2] " Stefano Babic
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Matthias Weißer @ 2011-08-17 13:02 UTC (permalink / raw)
  To: u-boot

Dear Stefano

Am 17.08.2011 12:12, schrieb Stefano Babic:
> commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
> building on a different directory with the O= parameter.
> The patch wil fix this issue, generating always asm-offsets.h before
> the other targets.
>
> Signed-off-by: Stefano Babic<sbabic@denx.de>
> ---
>
> Note: the patch fixes the issue, however I generate an empty asm-offsets.c
> for boards that do not have one. Is there a better way to reach the goal ?

Wouldn't it be possible to just create an empty asm-offsets.h if there 
is no asm-offsets.c?

And maybe it is handy to add the auto-generated files (asm-offsets.s/h) 
to the list of removed files of the clean or distclean target.

Regards
Matthias

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

* [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h
  2011-08-17 13:02 ` Matthias Weißer
@ 2011-08-17 13:15   ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2011-08-17 13:15 UTC (permalink / raw)
  To: u-boot

On 08/17/2011 03:02 PM, Matthias Wei?er wrote:
> Dear Stefano
> 
> Am 17.08.2011 12:12, schrieb Stefano Babic:
>> commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
>> building on a different directory with the O= parameter.
>> The patch wil fix this issue, generating always asm-offsets.h before
>> the other targets.
>>
>> Signed-off-by: Stefano Babic<sbabic@denx.de>
>> ---
>>
>> Note: the patch fixes the issue, however I generate an empty
>> asm-offsets.c
>> for boards that do not have one. Is there a better way to reach the
>> goal ?
> 
> Wouldn't it be possible to just create an empty asm-offsets.h if there
> is no asm-offsets.c?

Yes, this is surely possible - but I do not know another clean way to do
this as adding an if..then..fi script inside the rule, as I did now
creating an empty asm-offsets.c.

Really I wanted to fix this issue changing the dependencies, but I have
not found a solution. Now it works (as for generic-asm-offsets.h)
because asm-offsets.h is always generated as first target.

> And maybe it is handy to add the auto-generated files (asm-offsets.s/h)
> to the list of removed files of the clean or distclean target.

Agree, they must be added as well.

Regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] [PATCH V2] Makefile : fix generation of cpu related asm-offsets.h
  2011-08-17 10:12 [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h Stefano Babic
  2011-08-17 13:02 ` Matthias Weißer
@ 2011-08-30 13:13 ` Stefano Babic
  2011-08-30 17:49 ` [U-Boot] [PATCH V3] " Stefano Babic
  2011-09-05 14:32 ` [U-Boot] [PATCH V4] " Stefano Babic
  3 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2011-08-30 13:13 UTC (permalink / raw)
  To: u-boot

commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
building on a different directory with the O= parameter.
The patch wil fix this issue, generating always asm-offsets.h before
the other targets.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---

Changes since V1:

- use an empty asm-offsets.s instead of asm-offsets.c (M. Weisser)
- add asm-offsets.{h,s} to the make clean target (M. Weisser)

 Makefile |   20 +++++++++++++++++++-
 rules.mk |   10 ----------
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index a641f8f..c68aaee 100644
--- a/Makefile
+++ b/Makefile
@@ -464,7 +464,8 @@ updater:
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \
 		$(obj)include/autoconf.mk \
-		$(obj)include/generated/generic-asm-offsets.h
+		$(obj)include/generated/generic-asm-offsets.h \
+		$(obj)include/asm/arch/asm-offsets.h
 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
 			$(MAKE) -C $$dir _depend ; done
 
@@ -527,6 +528,21 @@ $(obj)lib/asm-offsets.s:	$(obj)include/autoconf.mk.dep \
 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
 		-o $@ $(src)lib/asm-offsets.c -c -S
 
+$(obj)include/asm/arch/asm-offsets.h:	$(obj)include/autoconf.mk.dep \
+	$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
+	@echo Generating $@
+	tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@
+
+$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:	$(obj)include/autoconf.mk.dep
+	@mkdir -p $(obj)$(CPUDIR)/$(SOC)
+	if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
+		$(CC) -DDO_DEPS_ONLY \
+		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+			-o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \
+	else \
+		touch $(src)$(CPUDIR)/$(SOC)/asm-offsets.s; \
+	fi
+
 #########################################################################
 else	# !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
@@ -927,6 +943,8 @@ clean:
 	       $(obj)arch/blackfin/cpu/init.{lds,elf}
 	@rm -f $(obj)include/bmp_logo.h
 	@rm -f $(obj)lib/asm-offsets.s
+	@rm -f $(obj)include/asm/arch/asm-offsets.h
+	@rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
 	@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
 	@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
diff --git a/rules.mk b/rules.mk
index a6bae62..d79fcd3 100644
--- a/rules.mk
+++ b/rules.mk
@@ -42,14 +42,4 @@ $(HOSTOBJS): $(obj)%.o: %.c
 $(NOPEDOBJS): $(obj)%.o: %.c
 	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
 
-$(TOPDIR)/include/asm/arch/asm-offsets.h:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s
-	@echo Generating $@
-	$(TOPDIR)/tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@
-
-$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c
-	$(CC) -DDO_DEPS_ONLY \
-		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
-		-o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S
 #########################################################################
-- 
1.7.1

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

* [U-Boot] [PATCH V3] Makefile : fix generation of cpu related asm-offsets.h
  2011-08-17 10:12 [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h Stefano Babic
  2011-08-17 13:02 ` Matthias Weißer
  2011-08-30 13:13 ` [U-Boot] [PATCH V2] " Stefano Babic
@ 2011-08-30 17:49 ` Stefano Babic
  2011-09-05 13:44   ` Wolfgang Denk
  2011-09-05 14:32 ` [U-Boot] [PATCH V4] " Stefano Babic
  3 siblings, 1 reply; 10+ messages in thread
From: Stefano Babic @ 2011-08-30 17:49 UTC (permalink / raw)
  To: u-boot

commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
building on a different directory with the O= parameter.
The patch wil fix this issue, generating always asm-offsets.h before
the other targets.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Matthias Weisser <weisserm@arcor.de>
CC: Wolfgang Denk <wd@denx.de>
---

Note: V2 breaks *all* not ARM boards
Put the generated asm-offsets.h into include/generated,
because this directory is common to all architectures.

 Makefile                                |   20 +++++++++++++++++++-
 arch/arm/cpu/arm1136/mx35/Makefile      |    2 --
 arch/arm/cpu/arm926ejs/mb86r0x/Makefile |    2 --
 arch/arm/cpu/arm926ejs/mx25/Makefile    |    2 --
 arch/arm/cpu/arm926ejs/mx27/Makefile    |    2 --
 arch/arm/cpu/armv7/mx5/Makefile         |    2 --
 arch/arm/cpu/armv7/mx5/lowlevel_init.S  |    2 +-
 arch/arm/include/asm/arch-mx25/macro.h  |    2 +-
 board/freescale/mx35pdk/lowlevel_init.S |    2 +-
 board/logicpd/imx27lite/lowlevel_init.S |    2 +-
 board/syteco/jadecpu/lowlevel_init.S    |    2 +-
 board/syteco/zmx25/lowlevel_init.S      |    2 +-
 rules.mk                                |   10 ----------
 13 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/Makefile b/Makefile
index 6abc319..493a668 100644
--- a/Makefile
+++ b/Makefile
@@ -464,7 +464,8 @@ updater:
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \
 		$(obj)include/autoconf.mk \
-		$(obj)include/generated/generic-asm-offsets.h
+		$(obj)include/generated/generic-asm-offsets.h \
+		$(obj)include/generated/asm-offsets.h
 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
 			$(MAKE) -C $$dir _depend ; done
 
@@ -527,6 +528,21 @@ $(obj)lib/asm-offsets.s:	$(obj)include/autoconf.mk.dep \
 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
 		-o $@ $(src)lib/asm-offsets.c -c -S
 
+$(obj)include/generated/asm-offsets.h:	$(obj)include/autoconf.mk.dep \
+	$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
+	@echo Generating $@
+	tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@
+
+$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:	$(obj)include/autoconf.mk.dep
+	@mkdir -p $(obj)$(CPUDIR)/$(SOC)
+	if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
+		$(CC) -DDO_DEPS_ONLY \
+		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+			-o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \
+	else \
+		touch $(src)$(CPUDIR)/$(SOC)/asm-offsets.s; \
+	fi
+
 #########################################################################
 else	# !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
@@ -916,6 +932,8 @@ clean:
 	       $(obj)arch/blackfin/cpu/init.{lds,elf}
 	@rm -f $(obj)include/bmp_logo.h
 	@rm -f $(obj)lib/asm-offsets.s
+	@rm -f $(obj)include/generated/asm-offsets.h
+	@rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
 	@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
 	@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
diff --git a/arch/arm/cpu/arm1136/mx35/Makefile b/arch/arm/cpu/arm1136/mx35/Makefile
index 284cdc5..469397c 100644
--- a/arch/arm/cpu/arm1136/mx35/Makefile
+++ b/arch/arm/cpu/arm1136/mx35/Makefile
@@ -39,8 +39,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 
 #########################################################################
 
diff --git a/arch/arm/cpu/arm926ejs/mb86r0x/Makefile b/arch/arm/cpu/arm926ejs/mb86r0x/Makefile
index 974d0be..bab048b 100644
--- a/arch/arm/cpu/arm926ejs/mb86r0x/Makefile
+++ b/arch/arm/cpu/arm926ejs/mb86r0x/Makefile
@@ -37,8 +37,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/arm926ejs/mx25/Makefile b/arch/arm/cpu/arm926ejs/mx25/Makefile
index 9219c06..3c2a65e 100644
--- a/arch/arm/cpu/arm926ejs/mx25/Makefile
+++ b/arch/arm/cpu/arm926ejs/mx25/Makefile
@@ -34,8 +34,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/arm926ejs/mx27/Makefile b/arch/arm/cpu/arm926ejs/mx27/Makefile
index 7ac1a21..0e112b3 100644
--- a/arch/arm/cpu/arm926ejs/mx27/Makefile
+++ b/arch/arm/cpu/arm926ejs/mx27/Makefile
@@ -34,8 +34,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/armv7/mx5/Makefile b/arch/arm/cpu/armv7/mx5/Makefile
index 6e13cc3..e8be9c9 100644
--- a/arch/arm/cpu/armv7/mx5/Makefile
+++ b/arch/arm/cpu/armv7/mx5/Makefile
@@ -45,6 +45,4 @@ include $(SRCTREE)/rules.mk
 
 sinclude $(obj).depend
 
-lowlevel_init.o : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
index 6c66b42..7e37221 100644
--- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
@@ -21,7 +21,7 @@
 
 #include <config.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 /*
  * L2CC Cache setup/invalidation/disable
diff --git a/arch/arm/include/asm/arch-mx25/macro.h b/arch/arm/include/asm/arch-mx25/macro.h
index 276c71c..3b694da 100644
--- a/arch/arm/include/asm/arch-mx25/macro.h
+++ b/arch/arm/include/asm/arch-mx25/macro.h
@@ -31,7 +31,7 @@
 #ifdef __ASSEMBLY__
 
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 .macro init_aips
 	write32	IMX_AIPS1_BASE + AIPS_MPR_0_7, 0x77777777
diff --git a/board/freescale/mx35pdk/lowlevel_init.S b/board/freescale/mx35pdk/lowlevel_init.S
index 9fd04cb..698c4cf 100644
--- a/board/freescale/mx35pdk/lowlevel_init.S
+++ b/board/freescale/mx35pdk/lowlevel_init.S
@@ -21,7 +21,7 @@
 
 #include <config.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 #include "mx35pdk.h"
 
 /*
diff --git a/board/logicpd/imx27lite/lowlevel_init.S b/board/logicpd/imx27lite/lowlevel_init.S
index e2cdecb..873634f 100644
--- a/board/logicpd/imx27lite/lowlevel_init.S
+++ b/board/logicpd/imx27lite/lowlevel_init.S
@@ -26,7 +26,7 @@
 #include <version.h>
 #include <asm/macro.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 SOC_ESDCTL_BASE_W:	.word	IMX_ESD_BASE
 SOC_SI_ID_REG_W:	.word	IMX_SYSTEM_CTL_BASE
diff --git a/board/syteco/jadecpu/lowlevel_init.S b/board/syteco/jadecpu/lowlevel_init.S
index 5ad4dce..b01f087 100644
--- a/board/syteco/jadecpu/lowlevel_init.S
+++ b/board/syteco/jadecpu/lowlevel_init.S
@@ -30,7 +30,7 @@
 #include <version.h>
 #include <asm/macro.h>
 #include <asm/arch/mb86r0x.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 /* Set up the platform, once the cpu has been initialized */
 .globl lowlevel_init
diff --git a/board/syteco/zmx25/lowlevel_init.S b/board/syteco/zmx25/lowlevel_init.S
index 8e63de0..1002674 100644
--- a/board/syteco/zmx25/lowlevel_init.S
+++ b/board/syteco/zmx25/lowlevel_init.S
@@ -27,7 +27,7 @@
 #include <asm/macro.h>
 #include <asm/arch/macro.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 /*
  * clocks
diff --git a/rules.mk b/rules.mk
index a6bae62..d79fcd3 100644
--- a/rules.mk
+++ b/rules.mk
@@ -42,14 +42,4 @@ $(HOSTOBJS): $(obj)%.o: %.c
 $(NOPEDOBJS): $(obj)%.o: %.c
 	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
 
-$(TOPDIR)/include/asm/arch/asm-offsets.h:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s
-	@echo Generating $@
-	$(TOPDIR)/tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@
-
-$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c
-	$(CC) -DDO_DEPS_ONLY \
-		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
-		-o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S
 #########################################################################
-- 
1.7.1

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

* [U-Boot] [PATCH V3] Makefile : fix generation of cpu related asm-offsets.h
  2011-08-30 17:49 ` [U-Boot] [PATCH V3] " Stefano Babic
@ 2011-09-05 13:44   ` Wolfgang Denk
  2011-09-05 13:52     ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2011-09-05 13:44 UTC (permalink / raw)
  To: u-boot

Dear Stefano Babic,

In message <1314726584-17203-1-git-send-email-sbabic@denx.de> you wrote:
> commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
> building on a different directory with the O= parameter.
> The patch wil fix this issue, generating always asm-offsets.h before
> the other targets.
> 
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Matthias Weisser <weisserm@arcor.de>
> CC: Wolfgang Denk <wd@denx.de>
> ---
> 
> Note: V2 breaks *all* not ARM boards
> Put the generated asm-offsets.h into include/generated,
> because this directory is common to all architectures.

This one is not that much better:

Configuring for apollon board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm1136/omap24xx/asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
make: *** Waiting for unfinished jobs....
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for da850evm board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm926ejs/davinci/asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for dvlhost board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/ixp//asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for efikamx - Board: efikamx, Options: IMX_CONFIG=board/efikamx/imximage.cfg
   text    data     bss     dec     hex filename
 184792    4104  206516  395412   60894 /work/wd/tmp-arm/u-boot
Configuring for harmony board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/armv7/tegra2/asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
make: *** Waiting for unfinished jobs....
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for imx27lite board...
   text    data     bss     dec     hex filename
 242780    7812  236232  486824   76da8 /work/wd/tmp-arm/u-boot
Configuring for imx31_phycore board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm1136/mx31/asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
make: *** Waiting for unfinished jobs....
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for imx31_phycore_eet board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm1136/mx31/asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for ixdp425 board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/ixp//asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for ixdpg425 board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/ixp//asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
Configuring for jadecpu board...
sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm926ejs/mb86r0x/asm-offsets.s: No such file or directory
make: *** [/work/wd/tmp-arm/include/generated/asm-offsets.h] Error 1
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file
...

etc. etc.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
        O, throw away the worser part of it,
        And live the purer with the other half.

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

* [U-Boot] [PATCH V3] Makefile : fix generation of cpu related asm-offsets.h
  2011-09-05 13:44   ` Wolfgang Denk
@ 2011-09-05 13:52     ` Wolfgang Denk
  2011-09-05 14:28       ` Stefano Babic
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2011-09-05 13:52 UTC (permalink / raw)
  To: u-boot

Dear Stefano,

In message <20110905134419.D820F158D104@gemini.denx.de> I wrote:
> 
> This one is not that much better:

Maybe it helps debugging - here is an observation:

> sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm1136/omap24xx/asm-offsets.s: No such file or directory
> sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm926ejs/davinci/asm-offsets.s: No such file or directory
> sed: can't read /work/wd/tmp-arm/arch/arm/cpu/ixp//asm-offsets.s: No such file or directory

Mind the inconsistency - see the double slash after "ixp".

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The combination of a number of things to make existence worthwhile."
"Yes, the philosophy of 'none,' meaning 'all.'"
	-- Spock and Lincoln, "The Savage Curtain", stardate 5906.4

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

* [U-Boot] [PATCH V3] Makefile : fix generation of cpu related asm-offsets.h
  2011-09-05 13:52     ` Wolfgang Denk
@ 2011-09-05 14:28       ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2011-09-05 14:28 UTC (permalink / raw)
  To: u-boot

On 09/05/2011 03:52 PM, Wolfgang Denk wrote:
> Dear Stefano,
>

Hi Wolfgang,

> In message <20110905134419.D820F158D104@gemini.denx.de> I wrote:
>>
>> This one is not that much better:
> 
> Maybe it helps debugging - here is an observation:
> 
>> sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm1136/omap24xx/asm-offsets.s: No such file or directory
>> sed: can't read /work/wd/tmp-arm/arch/arm/cpu/arm926ejs/davinci/asm-offsets.s: No such file or directory
>> sed: can't read /work/wd/tmp-arm/arch/arm/cpu/ixp//asm-offsets.s: No such file or directory
> 
> Mind the inconsistency - see the double slash after "ixp".

An evident error is :

+       else \
+               touch $(src)$(CPUDIR)/$(SOC)/asm-offsets.s; \
+       fi

Then an asm-offsets.s not in the out-of-tree directory is generated. I
send V4 of the patch.

Changing that I can compile clean the da850evm board, and mostly of
other boards you report broken. However, I cannot compile the harmony,
but is seem to me this is an unrelated issue:

I did it with:
	make O=~/Projects/imx/tmp  harmony

and I get this error:
common/board.o ../common/board.c -c
Assembler messages:
Fatal error: can't create
/home/stefano/Projects/imx/tmp/board/nvidia/harmony/../common/board.o:
No such file or directory

This looks related that the Makefile in the board directory refers
always to the common code in ../common, that is not found using the
out-of-tree.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] [PATCH V4] Makefile : fix generation of cpu related asm-offsets.h
  2011-08-17 10:12 [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h Stefano Babic
                   ` (2 preceding siblings ...)
  2011-08-30 17:49 ` [U-Boot] [PATCH V3] " Stefano Babic
@ 2011-09-05 14:32 ` Stefano Babic
  2011-09-07 19:42   ` Wolfgang Denk
  3 siblings, 1 reply; 10+ messages in thread
From: Stefano Babic @ 2011-09-05 14:32 UTC (permalink / raw)
  To: u-boot

commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
building on a different directory with the O= parameter.
The patch wil fix this issue, generating always asm-offsets.h before
the other targets.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Matthias Weisser <weisserm@arcor.de>
CC: Wolfgang Denk <wd@denx.de>
---

Note: V2 breaks *all* not ARM boards
Put the generated asm-offsets.h into include/generated,
because this directory is common to all architectures.

Changes since V3: the empty asm-offsets.s was generated under src,
and not in the directory indicated by $(obj), required for out-of-tree buildeing.

 Makefile                                |   20 +++++++++++++++++++-
 arch/arm/cpu/arm1136/mx35/Makefile      |    2 --
 arch/arm/cpu/arm926ejs/mb86r0x/Makefile |    2 --
 arch/arm/cpu/arm926ejs/mx25/Makefile    |    2 --
 arch/arm/cpu/arm926ejs/mx27/Makefile    |    2 --
 arch/arm/cpu/armv7/mx5/Makefile         |    2 --
 arch/arm/cpu/armv7/mx5/lowlevel_init.S  |    2 +-
 arch/arm/include/asm/arch-mx25/macro.h  |    2 +-
 board/freescale/mx35pdk/lowlevel_init.S |    2 +-
 board/logicpd/imx27lite/lowlevel_init.S |    2 +-
 board/syteco/jadecpu/lowlevel_init.S    |    2 +-
 board/syteco/zmx25/lowlevel_init.S      |    2 +-
 rules.mk                                |   10 ----------
 13 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/Makefile b/Makefile
index 6abc319..cfa8071 100644
--- a/Makefile
+++ b/Makefile
@@ -464,7 +464,8 @@ updater:
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \
 		$(obj)include/autoconf.mk \
-		$(obj)include/generated/generic-asm-offsets.h
+		$(obj)include/generated/generic-asm-offsets.h \
+		$(obj)include/generated/asm-offsets.h
 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
 			$(MAKE) -C $$dir _depend ; done
 
@@ -527,6 +528,21 @@ $(obj)lib/asm-offsets.s:	$(obj)include/autoconf.mk.dep \
 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
 		-o $@ $(src)lib/asm-offsets.c -c -S
 
+$(obj)include/generated/asm-offsets.h:	$(obj)include/autoconf.mk.dep \
+	$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
+	@echo Generating $@
+	tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@
+
+$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:	$(obj)include/autoconf.mk.dep
+	@mkdir -p $(obj)$(CPUDIR)/$(SOC)
+	if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
+		$(CC) -DDO_DEPS_ONLY \
+		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+			-o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \
+	else \
+		touch $@; \
+	fi
+
 #########################################################################
 else	# !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
@@ -916,6 +932,8 @@ clean:
 	       $(obj)arch/blackfin/cpu/init.{lds,elf}
 	@rm -f $(obj)include/bmp_logo.h
 	@rm -f $(obj)lib/asm-offsets.s
+	@rm -f $(obj)include/generated/asm-offsets.h
+	@rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
 	@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
 	@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
diff --git a/arch/arm/cpu/arm1136/mx35/Makefile b/arch/arm/cpu/arm1136/mx35/Makefile
index 284cdc5..469397c 100644
--- a/arch/arm/cpu/arm1136/mx35/Makefile
+++ b/arch/arm/cpu/arm1136/mx35/Makefile
@@ -39,8 +39,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 
 #########################################################################
 
diff --git a/arch/arm/cpu/arm926ejs/mb86r0x/Makefile b/arch/arm/cpu/arm926ejs/mb86r0x/Makefile
index 974d0be..bab048b 100644
--- a/arch/arm/cpu/arm926ejs/mb86r0x/Makefile
+++ b/arch/arm/cpu/arm926ejs/mb86r0x/Makefile
@@ -37,8 +37,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/arm926ejs/mx25/Makefile b/arch/arm/cpu/arm926ejs/mx25/Makefile
index 9219c06..3c2a65e 100644
--- a/arch/arm/cpu/arm926ejs/mx25/Makefile
+++ b/arch/arm/cpu/arm926ejs/mx25/Makefile
@@ -34,8 +34,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/arm926ejs/mx27/Makefile b/arch/arm/cpu/arm926ejs/mx27/Makefile
index 7ac1a21..0e112b3 100644
--- a/arch/arm/cpu/arm926ejs/mx27/Makefile
+++ b/arch/arm/cpu/arm926ejs/mx27/Makefile
@@ -34,8 +34,6 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
-$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/armv7/mx5/Makefile b/arch/arm/cpu/armv7/mx5/Makefile
index 6e13cc3..e8be9c9 100644
--- a/arch/arm/cpu/armv7/mx5/Makefile
+++ b/arch/arm/cpu/armv7/mx5/Makefile
@@ -45,6 +45,4 @@ include $(SRCTREE)/rules.mk
 
 sinclude $(obj).depend
 
-lowlevel_init.o : $(TOPDIR)/include/asm/arch/asm-offsets.h
-
 #########################################################################
diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
index 6c66b42..7e37221 100644
--- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
@@ -21,7 +21,7 @@
 
 #include <config.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 /*
  * L2CC Cache setup/invalidation/disable
diff --git a/arch/arm/include/asm/arch-mx25/macro.h b/arch/arm/include/asm/arch-mx25/macro.h
index 276c71c..3b694da 100644
--- a/arch/arm/include/asm/arch-mx25/macro.h
+++ b/arch/arm/include/asm/arch-mx25/macro.h
@@ -31,7 +31,7 @@
 #ifdef __ASSEMBLY__
 
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 .macro init_aips
 	write32	IMX_AIPS1_BASE + AIPS_MPR_0_7, 0x77777777
diff --git a/board/freescale/mx35pdk/lowlevel_init.S b/board/freescale/mx35pdk/lowlevel_init.S
index 9fd04cb..698c4cf 100644
--- a/board/freescale/mx35pdk/lowlevel_init.S
+++ b/board/freescale/mx35pdk/lowlevel_init.S
@@ -21,7 +21,7 @@
 
 #include <config.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 #include "mx35pdk.h"
 
 /*
diff --git a/board/logicpd/imx27lite/lowlevel_init.S b/board/logicpd/imx27lite/lowlevel_init.S
index e2cdecb..873634f 100644
--- a/board/logicpd/imx27lite/lowlevel_init.S
+++ b/board/logicpd/imx27lite/lowlevel_init.S
@@ -26,7 +26,7 @@
 #include <version.h>
 #include <asm/macro.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 SOC_ESDCTL_BASE_W:	.word	IMX_ESD_BASE
 SOC_SI_ID_REG_W:	.word	IMX_SYSTEM_CTL_BASE
diff --git a/board/syteco/jadecpu/lowlevel_init.S b/board/syteco/jadecpu/lowlevel_init.S
index 5ad4dce..b01f087 100644
--- a/board/syteco/jadecpu/lowlevel_init.S
+++ b/board/syteco/jadecpu/lowlevel_init.S
@@ -30,7 +30,7 @@
 #include <version.h>
 #include <asm/macro.h>
 #include <asm/arch/mb86r0x.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 /* Set up the platform, once the cpu has been initialized */
 .globl lowlevel_init
diff --git a/board/syteco/zmx25/lowlevel_init.S b/board/syteco/zmx25/lowlevel_init.S
index 8e63de0..1002674 100644
--- a/board/syteco/zmx25/lowlevel_init.S
+++ b/board/syteco/zmx25/lowlevel_init.S
@@ -27,7 +27,7 @@
 #include <asm/macro.h>
 #include <asm/arch/macro.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/asm-offsets.h>
+#include <generated/asm-offsets.h>
 
 /*
  * clocks
diff --git a/rules.mk b/rules.mk
index a6bae62..d79fcd3 100644
--- a/rules.mk
+++ b/rules.mk
@@ -42,14 +42,4 @@ $(HOSTOBJS): $(obj)%.o: %.c
 $(NOPEDOBJS): $(obj)%.o: %.c
 	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
 
-$(TOPDIR)/include/asm/arch/asm-offsets.h:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s
-	@echo Generating $@
-	$(TOPDIR)/tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@
-
-$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s:	$(TOPDIR)/include/autoconf.mk.dep \
-	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c
-	$(CC) -DDO_DEPS_ONLY \
-		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
-		-o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S
 #########################################################################
-- 
1.7.1

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

* [U-Boot] [PATCH V4] Makefile : fix generation of cpu related asm-offsets.h
  2011-09-05 14:32 ` [U-Boot] [PATCH V4] " Stefano Babic
@ 2011-09-07 19:42   ` Wolfgang Denk
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2011-09-07 19:42 UTC (permalink / raw)
  To: u-boot

Dear Stefano Babic,

In message <1315233148-15287-1-git-send-email-sbabic@denx.de> you wrote:
> commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks
> building on a different directory with the O= parameter.
> The patch wil fix this issue, generating always asm-offsets.h before
> the other targets.
> 
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Matthias Weisser <weisserm@arcor.de>
> CC: Wolfgang Denk <wd@denx.de>
> ---
> 
> Note: V2 breaks *all* not ARM boards
> Put the generated asm-offsets.h into include/generated,
> because this directory is common to all architectures.
> 
> Changes since V3: the empty asm-offsets.s was generated under src,
> and not in the directory indicated by $(obj), required for out-of-tree buildeing.
> 
>  Makefile                                |   20 +++++++++++++++++++-
>  arch/arm/cpu/arm1136/mx35/Makefile      |    2 --
>  arch/arm/cpu/arm926ejs/mb86r0x/Makefile |    2 --
>  arch/arm/cpu/arm926ejs/mx25/Makefile    |    2 --
>  arch/arm/cpu/arm926ejs/mx27/Makefile    |    2 --
>  arch/arm/cpu/armv7/mx5/Makefile         |    2 --
>  arch/arm/cpu/armv7/mx5/lowlevel_init.S  |    2 +-
>  arch/arm/include/asm/arch-mx25/macro.h  |    2 +-
>  board/freescale/mx35pdk/lowlevel_init.S |    2 +-
>  board/logicpd/imx27lite/lowlevel_init.S |    2 +-
>  board/syteco/jadecpu/lowlevel_init.S    |    2 +-
>  board/syteco/zmx25/lowlevel_init.S      |    2 +-
>  rules.mk                                |   10 ----------
>  13 files changed, 25 insertions(+), 27 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.              - Henry Spencer, University of Toronto Unix hack

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

end of thread, other threads:[~2011-09-07 19:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17 10:12 [U-Boot] [PATCH] Makefile : fix generation of cpu related asm-offsets.h Stefano Babic
2011-08-17 13:02 ` Matthias Weißer
2011-08-17 13:15   ` Stefano Babic
2011-08-30 13:13 ` [U-Boot] [PATCH V2] " Stefano Babic
2011-08-30 17:49 ` [U-Boot] [PATCH V3] " Stefano Babic
2011-09-05 13:44   ` Wolfgang Denk
2011-09-05 13:52     ` Wolfgang Denk
2011-09-05 14:28       ` Stefano Babic
2011-09-05 14:32 ` [U-Boot] [PATCH V4] " Stefano Babic
2011-09-07 19:42   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox