All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] example: introduce EXAMPLE_LOAD_ADDR
@ 2009-03-04  9:11 Jean-Christophe PLAGNIOL-VILLARD
  2009-03-08 22:37 ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-04  9:11 UTC (permalink / raw)
  To: u-boot

that could be overwrite in followaing order
ARCH
CPU
SOC
BOARD

via the corresponding config.mk

the value could be exported to the environment to reduce the user mistake
when they try to use example's standalone application

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arm_config.mk                    |    2 +
 avr32_config.mk                  |    2 +
 blackfin_config.mk               |    2 +
 board/omap2420h4/config.mk       |    2 +
 cpu/arm_cortexa8/omap3/config.mk |    2 +
 examples/Makefile                |   47 +++++---------------------------------
 i386_config.mk                   |    2 +
 m68k_config.mk                   |    2 +
 microblaze_config.mk             |    2 +
 mips_config.mk                   |    2 +
 nios2_config.mk                  |    2 +
 nios_config.mk                   |    2 +
 ppc_config.mk                    |    2 +
 sh_config.mk                     |    2 +
 sparc_config.mk                  |    2 +
 15 files changed, 34 insertions(+), 41 deletions(-)

diff --git a/arm_config.mk b/arm_config.mk
index 73d9625..41d810c 100644
--- a/arm_config.mk
+++ b/arm_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
+
+EXAMPLE_LOAD_ADDR = 0xc100000
diff --git a/avr32_config.mk b/avr32_config.mk
index 441caa4..63c4789 100644
--- a/avr32_config.mk
+++ b/avr32_config.mk
@@ -23,3 +23,5 @@
 
 PLATFORM_RELFLAGS	+= -ffixed-r5 -fPIC -mno-init-got -mrelax
 PLATFORM_LDFLAGS	+= --relax
+
+EXAMPLE_LOAD_ADDR = 0x00000000
diff --git a/blackfin_config.mk b/blackfin_config.mk
index f3fcd7a..2e71e86 100644
--- a/blackfin_config.mk
+++ b/blackfin_config.mk
@@ -44,3 +44,5 @@ endif
 ifneq (,$(findstring s,$(MAKEFLAGS)))
 LDR_FLAGS += --quiet
 endif
+
+EXAMPLE_LOAD_ADDR = 0x1000
diff --git a/board/omap2420h4/config.mk b/board/omap2420h4/config.mk
index 3edcde0..bbe6d5c 100644
--- a/board/omap2420h4/config.mk
+++ b/board/omap2420h4/config.mk
@@ -26,3 +26,5 @@ TEXT_BASE = 0x80e80000
 #TEXT_BASE = 0x0
 #TEXT_BASE = 0x08000000
 #TEXT_BASE = 0x04000000
+
+EXAMPLE_LOAD_ADDR = 0x80300000
diff --git a/cpu/arm_cortexa8/omap3/config.mk b/cpu/arm_cortexa8/omap3/config.mk
index fbb753e..f96ff26 100644
--- a/cpu/arm_cortexa8/omap3/config.mk
+++ b/cpu/arm_cortexa8/omap3/config.mk
@@ -34,3 +34,5 @@ PLATFORM_CPPFLAGS +=$(call cc-option)
 PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\
 		    $(call cc-option,-malignment-traps,))
+
+EXAMPLE_LOAD_ADDR = 0x80300000
diff --git a/examples/Makefile b/examples/Makefile
index dbcfa92..348a25c 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -21,63 +21,28 @@
 # MA 02111-1307 USA
 #
 
-ifeq ($(ARCH),ppc)
-LOAD_ADDR = 0x40000
-endif
-
-ifeq ($(ARCH),i386)
-LOAD_ADDR = 0x40000
-endif
-
-ifeq ($(ARCH),arm)
-ifeq ($(BOARD),omap2420h4)
-LOAD_ADDR = 0x80300000
-else
-ifeq ($(CPU),omap3)
-LOAD_ADDR = 0x80300000
-else
-LOAD_ADDR = 0xc100000
-endif
-endif
-endif
-
 ifeq ($(ARCH),mips)
-LOAD_ADDR = 0x80200000 -T mips.lds
+EX_LDFLAGS += -T mips.lds
 endif
 
 ifeq ($(ARCH),nios)
-LOAD_ADDR = 0x00800000 -L $(gcclibdir)/m32 -T nios.lds
+EX_LDFLAGS += -L $(gcclibdir)/m32 -T nios.lds
 endif
 
 ifeq ($(ARCH),nios2)
-LOAD_ADDR = 0x02000000 -L $(gcclibdir) -T nios2.lds
+EX_LDFLAGS += -L $(gcclibdir) -T nios2.lds
 endif
 
 ifeq ($(ARCH),m68k)
-LOAD_ADDR = 0x20000  -L $(clibdir)
-endif
-
-ifeq ($(ARCH),microblaze)
-LOAD_ADDR = 0x80F00000
+EX_LDFLAGS += -L $(clibdir)
 endif
 
-ifeq ($(ARCH),blackfin)
-LOAD_ADDR = 0x1000
-endif
-
-ifeq ($(ARCH),avr32)
-LOAD_ADDR = 0x00000000
-endif
-
-ifeq ($(ARCH),sh)
-LOAD_ADDR = 0x8C000000
 ifeq ($(CPU),sh2)
 BIG_ENDIAN=y
 endif
-endif
 
 ifeq ($(ARCH),sparc)
-LOAD_ADDR = 0x00000000 -L $(gcclibdir) -T sparc.lds
+EX_LDFLAGS += -L $(gcclibdir) -T sparc.lds
 endif
 
 include $(TOPDIR)/config.mk
@@ -176,7 +141,7 @@ $(LIB):	$(obj).depend $(LIBOBJS)
 
 $(ELF):
 $(obj)%:	$(obj)%.o $(LIB)
-		$(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
+		$(LD) -g $(EX_LDFLAGS) -Ttext $(EXAMPLE_LOAD_ADDR) \
 			-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
 			-L$(gcclibdir) -lgcc
 
diff --git a/i386_config.mk b/i386_config.mk
index 9e6d37d..07c5a9a 100644
--- a/i386_config.mk
+++ b/i386_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
+
+EXAMPLE_LOAD_ADDR = 0x40000
diff --git a/m68k_config.mk b/m68k_config.mk
index 12bd27c..5a38044 100644
--- a/m68k_config.mk
+++ b/m68k_config.mk
@@ -23,3 +23,5 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
 PLATFORM_LDFLAGS  += -n
+
+EXAMPLE_LOAD_ADDR = 0x20000
diff --git a/microblaze_config.mk b/microblaze_config.mk
index e44c79e..6cc45d5 100644
--- a/microblaze_config.mk
+++ b/microblaze_config.mk
@@ -25,3 +25,5 @@
 #
 
 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
+
+EXAMPLE_LOAD_ADDR = 0x80F00000
diff --git a/mips_config.mk b/mips_config.mk
index 05eb05d..8a51939 100644
--- a/mips_config.mk
+++ b/mips_config.mk
@@ -46,3 +46,5 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
 PLATFORM_CPPFLAGS		+= -G 0 -mabicalls -fpic
 PLATFORM_CPPFLAGS		+= -msoft-float
 PLATFORM_LDFLAGS		+= -G 0 -static -n -nostdlib
+
+EXAMPLE_LOAD_ADDR = 0x80200000
diff --git a/nios2_config.mk b/nios2_config.mk
index 3f23b56..7d444e3 100644
--- a/nios2_config.mk
+++ b/nios2_config.mk
@@ -24,3 +24,5 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
 PLATFORM_CPPFLAGS += -ffixed-r15 -G0
+
+EXAMPLE_LOAD_ADDR = 0x02000000
diff --git a/nios_config.mk b/nios_config.mk
index 1cf0f32..1a4323b 100644
--- a/nios_config.mk
+++ b/nios_config.mk
@@ -23,3 +23,5 @@
 #
 
 PLATFORM_CPPFLAGS += -m32 -DCONFIG_NIOS -D__NIOS__ -ffixed-g7 -gstabs
+
+EXAMPLE_LOAD_ADDR = 0x00800000
diff --git a/ppc_config.mk b/ppc_config.mk
index c95b3b1..f25ceb4 100644
--- a/ppc_config.mk
+++ b/ppc_config.mk
@@ -37,3 +37,5 @@ endif
 ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
 PLATFORM_CPPFLAGS+= -D__PPC__
 endif
+
+EXAMPLE_LOAD_ADDR = 0x40000
diff --git a/sh_config.mk b/sh_config.mk
index 49d50f7..8838e24 100644
--- a/sh_config.mk
+++ b/sh_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
+
+EXAMPLE_LOAD_ADDR = 0x8C000000
diff --git a/sparc_config.mk b/sparc_config.mk
index 87f745f..0526b79 100644
--- a/sparc_config.mk
+++ b/sparc_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__
+
+EXAMPLE_LOAD_ADDR = 0x00000000
-- 
1.5.6.5

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

* [U-Boot] [PATCH 1/1] example: introduce EXAMPLE_LOAD_ADDR
  2009-03-04  9:11 [U-Boot] [PATCH 1/1] example: introduce EXAMPLE_LOAD_ADDR Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-08 22:37 ` Wolfgang Denk
  2009-03-14 11:13   ` [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2009-03-08 22:37 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <1236157904-31875-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> that could be overwrite in followaing order
-----------------------------^^^^^^^^^^
Please fix spelling.

> ARCH
> CPU
> SOC
> BOARD
> 
> via the corresponding config.mk
> 
> the value could be exported to the environment to reduce the user mistake
> when they try to use example's standalone application

And please rename EXAMPLE_LOAD_ADDR into STANDALONE_LOAD_ADDR or
similar.

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
It is clear that the individual who persecutes a  man,  his  brother,
because he is not of the same opinion, is a monster.       - Voltaire

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-08 22:37 ` Wolfgang Denk
@ 2009-03-14 11:13   ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-14 11:37     ` Mike Frysinger
  0 siblings, 1 reply; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-14 11:13 UTC (permalink / raw)
  To: u-boot

that could be overwrite in following order
ARCH
CPU
SOC
BOARD

via the corresponding config.mk

the value could be exported to the environment to reduce the user mistake
when they try to use example's standalone application

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
V2:
fix a typo on the comment
and rename EXAMPLE_LOAD_ADRR to STANDALONE_LOAD_ADDR

Best Regards,
J.
 arm_config.mk                    |    2 +
 avr32_config.mk                  |    2 +
 blackfin_config.mk               |    2 +
 board/omap2420h4/config.mk       |    2 +
 cpu/arm_cortexa8/omap3/config.mk |    2 +
 examples/Makefile                |   47 +++++---------------------------------
 i386_config.mk                   |    2 +
 m68k_config.mk                   |    2 +
 microblaze_config.mk             |    2 +
 mips_config.mk                   |    2 +
 nios2_config.mk                  |    2 +
 nios_config.mk                   |    2 +
 ppc_config.mk                    |    2 +
 sh_config.mk                     |    2 +
 sparc_config.mk                  |    2 +
 15 files changed, 34 insertions(+), 41 deletions(-)

diff --git a/arm_config.mk b/arm_config.mk
index 73d9625..742084d 100644
--- a/arm_config.mk
+++ b/arm_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
+
+STANDALONE_LOAD_ADDR = 0xc100000
diff --git a/avr32_config.mk b/avr32_config.mk
index 441caa4..a6a49f9 100644
--- a/avr32_config.mk
+++ b/avr32_config.mk
@@ -23,3 +23,5 @@
 
 PLATFORM_RELFLAGS	+= -ffixed-r5 -fPIC -mno-init-got -mrelax
 PLATFORM_LDFLAGS	+= --relax
+
+STANDALONE_LOAD_ADDR = 0x00000000
diff --git a/blackfin_config.mk b/blackfin_config.mk
index f3fcd7a..764c676 100644
--- a/blackfin_config.mk
+++ b/blackfin_config.mk
@@ -44,3 +44,5 @@ endif
 ifneq (,$(findstring s,$(MAKEFLAGS)))
 LDR_FLAGS += --quiet
 endif
+
+STANDALONE_LOAD_ADDR = 0x1000
diff --git a/board/omap2420h4/config.mk b/board/omap2420h4/config.mk
index 3edcde0..23890ce 100644
--- a/board/omap2420h4/config.mk
+++ b/board/omap2420h4/config.mk
@@ -26,3 +26,5 @@ TEXT_BASE = 0x80e80000
 #TEXT_BASE = 0x0
 #TEXT_BASE = 0x08000000
 #TEXT_BASE = 0x04000000
+
+STANDALONE_LOAD_ADDR = 0x80300000
diff --git a/cpu/arm_cortexa8/omap3/config.mk b/cpu/arm_cortexa8/omap3/config.mk
index fbb753e..e7d2f33 100644
--- a/cpu/arm_cortexa8/omap3/config.mk
+++ b/cpu/arm_cortexa8/omap3/config.mk
@@ -34,3 +34,5 @@ PLATFORM_CPPFLAGS +=$(call cc-option)
 PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\
 		    $(call cc-option,-malignment-traps,))
+
+STANDALONE_LOAD_ADDR = 0x80300000
diff --git a/examples/Makefile b/examples/Makefile
index dbcfa92..7e7fd6c 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -21,63 +21,28 @@
 # MA 02111-1307 USA
 #
 
-ifeq ($(ARCH),ppc)
-LOAD_ADDR = 0x40000
-endif
-
-ifeq ($(ARCH),i386)
-LOAD_ADDR = 0x40000
-endif
-
-ifeq ($(ARCH),arm)
-ifeq ($(BOARD),omap2420h4)
-LOAD_ADDR = 0x80300000
-else
-ifeq ($(CPU),omap3)
-LOAD_ADDR = 0x80300000
-else
-LOAD_ADDR = 0xc100000
-endif
-endif
-endif
-
 ifeq ($(ARCH),mips)
-LOAD_ADDR = 0x80200000 -T mips.lds
+EX_LDFLAGS += -T mips.lds
 endif
 
 ifeq ($(ARCH),nios)
-LOAD_ADDR = 0x00800000 -L $(gcclibdir)/m32 -T nios.lds
+EX_LDFLAGS += -L $(gcclibdir)/m32 -T nios.lds
 endif
 
 ifeq ($(ARCH),nios2)
-LOAD_ADDR = 0x02000000 -L $(gcclibdir) -T nios2.lds
+EX_LDFLAGS += -L $(gcclibdir) -T nios2.lds
 endif
 
 ifeq ($(ARCH),m68k)
-LOAD_ADDR = 0x20000  -L $(clibdir)
-endif
-
-ifeq ($(ARCH),microblaze)
-LOAD_ADDR = 0x80F00000
+EX_LDFLAGS += -L $(clibdir)
 endif
 
-ifeq ($(ARCH),blackfin)
-LOAD_ADDR = 0x1000
-endif
-
-ifeq ($(ARCH),avr32)
-LOAD_ADDR = 0x00000000
-endif
-
-ifeq ($(ARCH),sh)
-LOAD_ADDR = 0x8C000000
 ifeq ($(CPU),sh2)
 BIG_ENDIAN=y
 endif
-endif
 
 ifeq ($(ARCH),sparc)
-LOAD_ADDR = 0x00000000 -L $(gcclibdir) -T sparc.lds
+EX_LDFLAGS += -L $(gcclibdir) -T sparc.lds
 endif
 
 include $(TOPDIR)/config.mk
@@ -176,7 +141,7 @@ $(LIB):	$(obj).depend $(LIBOBJS)
 
 $(ELF):
 $(obj)%:	$(obj)%.o $(LIB)
-		$(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
+		$(LD) -g $(EX_LDFLAGS) -Ttext $(STANDALONE_LOAD_ADDR) \
 			-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
 			-L$(gcclibdir) -lgcc
 
diff --git a/i386_config.mk b/i386_config.mk
index 9e6d37d..83662d6 100644
--- a/i386_config.mk
+++ b/i386_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
+
+STANDALONE_LOAD_ADDR = 0x40000
diff --git a/m68k_config.mk b/m68k_config.mk
index 12bd27c..cf652c4 100644
--- a/m68k_config.mk
+++ b/m68k_config.mk
@@ -23,3 +23,5 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
 PLATFORM_LDFLAGS  += -n
+
+STANDALONE_LOAD_ADDR = 0x20000
diff --git a/microblaze_config.mk b/microblaze_config.mk
index e44c79e..a81b415 100644
--- a/microblaze_config.mk
+++ b/microblaze_config.mk
@@ -25,3 +25,5 @@
 #
 
 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
+
+STANDALONE_LOAD_ADDR = 0x80F00000
diff --git a/mips_config.mk b/mips_config.mk
index 05eb05d..a4c873a 100644
--- a/mips_config.mk
+++ b/mips_config.mk
@@ -46,3 +46,5 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
 PLATFORM_CPPFLAGS		+= -G 0 -mabicalls -fpic
 PLATFORM_CPPFLAGS		+= -msoft-float
 PLATFORM_LDFLAGS		+= -G 0 -static -n -nostdlib
+
+STANDALONE_LOAD_ADDR = 0x80200000
diff --git a/nios2_config.mk b/nios2_config.mk
index 3f23b56..0fe6db3 100644
--- a/nios2_config.mk
+++ b/nios2_config.mk
@@ -24,3 +24,5 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
 PLATFORM_CPPFLAGS += -ffixed-r15 -G0
+
+STANDALONE_LOAD_ADDR = 0x02000000
diff --git a/nios_config.mk b/nios_config.mk
index 1cf0f32..41e5d2f 100644
--- a/nios_config.mk
+++ b/nios_config.mk
@@ -23,3 +23,5 @@
 #
 
 PLATFORM_CPPFLAGS += -m32 -DCONFIG_NIOS -D__NIOS__ -ffixed-g7 -gstabs
+
+STANDALONE_LOAD_ADDR = 0x00800000
diff --git a/ppc_config.mk b/ppc_config.mk
index c95b3b1..2426f71 100644
--- a/ppc_config.mk
+++ b/ppc_config.mk
@@ -37,3 +37,5 @@ endif
 ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
 PLATFORM_CPPFLAGS+= -D__PPC__
 endif
+
+STANDALONE_LOAD_ADDR = 0x40000
diff --git a/sh_config.mk b/sh_config.mk
index 49d50f7..6b84f64 100644
--- a/sh_config.mk
+++ b/sh_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
+
+STANDALONE_LOAD_ADDR = 0x8C000000
diff --git a/sparc_config.mk b/sparc_config.mk
index 87f745f..ba39595 100644
--- a/sparc_config.mk
+++ b/sparc_config.mk
@@ -22,3 +22,5 @@
 #
 
 PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__
+
+STANDALONE_LOAD_ADDR = 0x00000000
-- 
1.5.6.5

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 11:13   ` [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-14 11:37     ` Mike Frysinger
  2009-03-14 12:45       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2009-03-14 11:37 UTC (permalink / raw)
  To: u-boot

On Saturday 14 March 2009 07:13:02 Jean-Christophe PLAGNIOL-VILLARD wrote:
> that could be overwrite in following order
> ARCH
> CPU
> SOC
> BOARD
>
> via the corresponding config.mk

the idea sounds fine to me ...

> the value could be exported to the environment to reduce the user mistake
> when they try to use example's standalone application

i dont really understand what you're trying to say here.  could you elaborate 
so we can fix up the changelog ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090314/6f580d1e/attachment.pgp 

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 11:37     ` Mike Frysinger
@ 2009-03-14 12:45       ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-14 13:12         ` Mike Frysinger
  2009-03-14 21:31         ` Wolfgang Denk
  0 siblings, 2 replies; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-14 12:45 UTC (permalink / raw)
  To: u-boot

On 07:37 Sat 14 Mar     , Mike Frysinger wrote:
> On Saturday 14 March 2009 07:13:02 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > that could be overwrite in following order
> > ARCH
> > CPU
> > SOC
> > BOARD
> >
> > via the corresponding config.mk
> 
> the idea sounds fine to me ...
> 
> > the value could be exported to the environment to reduce the user mistake
> > when they try to use example's standalone application
> 
> i dont really understand what you're trying to say here.  could you elaborate 
> so we can fix up the changelog ?
as example generate via the config.h a env var name standalone_load_addr
automaticly so the end user will just have to built it, load it and run it

Best Regards,
J.

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 12:45       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-14 13:12         ` Mike Frysinger
  2009-03-14 13:19           ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-14 21:31         ` Wolfgang Denk
  1 sibling, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2009-03-14 13:12 UTC (permalink / raw)
  To: u-boot

On Saturday 14 March 2009 08:45:56 Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 07:37 Sat 14 Mar     , Mike Frysinger wrote:
> > On Saturday 14 March 2009 07:13:02 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > that could be overwrite in following order
> > > ARCH
> > > CPU
> > > SOC
> > > BOARD
> > >
> > > via the corresponding config.mk
> >
> > the idea sounds fine to me ...
> >
> > > the value could be exported to the environment to reduce the user
> > > mistake when they try to use example's standalone application
> >
> > i dont really understand what you're trying to say here.  could you
> > elaborate so we can fix up the changelog ?
>
> as example generate via the config.h a env var name standalone_load_addr
> automaticly so the end user will just have to built it, load it and run it

i still dont get it.  config.h is the shortcut header to get at the board 
config.h.  defines do not randomly get exported from there into the 
environment.  the autoconf.mk mechanism only exports CONFIG_* stuff.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090314/1bb30a1c/attachment.pgp 

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 13:12         ` Mike Frysinger
@ 2009-03-14 13:19           ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-14 13:41             ` Mike Frysinger
  0 siblings, 1 reply; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-14 13:19 UTC (permalink / raw)
  To: u-boot

On 09:12 Sat 14 Mar     , Mike Frysinger wrote:
> On Saturday 14 March 2009 08:45:56 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 07:37 Sat 14 Mar     , Mike Frysinger wrote:
> > > On Saturday 14 March 2009 07:13:02 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > that could be overwrite in following order
> > > > ARCH
> > > > CPU
> > > > SOC
> > > > BOARD
> > > >
> > > > via the corresponding config.mk
> > >
> > > the idea sounds fine to me ...
> > >
> > > > the value could be exported to the environment to reduce the user
> > > > mistake when they try to use example's standalone application
> > >
> > > i dont really understand what you're trying to say here.  could you
> > > elaborate so we can fix up the changelog ?
> >
> > as example generate via the config.h a env var name standalone_load_addr
> > automaticly so the end user will just have to built it, load it and run it
> 
> i still dont get it.  config.h is the shortcut header to get at the board 
> config.h.  defines do not randomly get exported from there into the 
> environment.  the autoconf.mk mechanism only exports CONFIG_* stuff.
via the board config.h you could add default extra env settings by doing this
as example

#define CONFIG_EXTRA_ENV_SETTINGS "standalone_load_addr="xstr(STANDALONE_LOAD_ADDR)

Best Regards,
J.

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 13:19           ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-14 13:41             ` Mike Frysinger
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Frysinger @ 2009-03-14 13:41 UTC (permalink / raw)
  To: u-boot

On Saturday 14 March 2009 09:19:01 Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:12 Sat 14 Mar     , Mike Frysinger wrote:
> > On Saturday 14 March 2009 08:45:56 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 07:37 Sat 14 Mar     , Mike Frysinger wrote:
> > > > On Saturday 14 March 2009 07:13:02 Jean-Christophe wrote:
> > > > > that could be overwrite in following order
> > > > > ARCH
> > > > > CPU
> > > > > SOC
> > > > > BOARD
> > > > >
> > > > > via the corresponding config.mk
> > > >
> > > > the idea sounds fine to me ...
> > > >
> > > > > the value could be exported to the environment to reduce the user
> > > > > mistake when they try to use example's standalone application
> > > >
> > > > i dont really understand what you're trying to say here.  could you
> > > > elaborate so we can fix up the changelog ?
> > >
> > > as example generate via the config.h a env var name
> > > standalone_load_addr automaticly so the end user will just have to
> > > built it, load it and run it
> >
> > i still dont get it.  config.h is the shortcut header to get at the board
> > config.h.  defines do not randomly get exported from there into the
> > environment.  the autoconf.mk mechanism only exports CONFIG_* stuff.
>
> via the board config.h you could add default extra env settings by doing
> this as example
>
> #define CONFIG_EXTRA_ENV_SETTINGS
> "standalone_load_addr="xstr(STANDALONE_LOAD_ADDR)

so you're talking about the u-boot runtime environment, not the u-boot build 
environment.

i dont think your example here is the whole story.  nothing moves the u-boot 
make var STANDALONE_LOAD_ADDR from the env into CPPFLAGS / define.  so you 
would also need to add to some .mk somewhere:
CPPFLAGS += -DSTANDALONE_LOAD_ADDR=$(STANDALONE_LOAD_ADDR)

probably best if you just deleted that last paragraph from the commit message 
since it's too vague to be useful imo.
-mike

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 12:45       ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-14 13:12         ` Mike Frysinger
@ 2009-03-14 21:31         ` Wolfgang Denk
  2009-03-15 10:51           ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2009-03-14 21:31 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20090314124556.GA23599@game.jcrosoft.org> you wrote:
>
> > > the value could be exported to the environment to reduce the user mistake
> > > when they try to use example's standalone application
> > 
> > i dont really understand what you're trying to say here.  could you elaborate 
> > so we can fix up the changelog ?
> as example generate via the config.h a env var name standalone_load_addr
> automaticly so the end user will just have to built it, load it and run it

This is error prone.  NAK.

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
I object to intellect without discipline;  I object to power without
constructive purpose.
	-- Spock, "The Squire of Gothos", stardate 2124.5

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-14 21:31         ` Wolfgang Denk
@ 2009-03-15 10:51           ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-15 18:29             ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-15 10:51 UTC (permalink / raw)
  To: u-boot

On 22:31 Sat 14 Mar     , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20090314124556.GA23599@game.jcrosoft.org> you wrote:
> >
> > > > the value could be exported to the environment to reduce the user mistake
> > > > when they try to use example's standalone application
> > > 
> > > i dont really understand what you're trying to say here.  could you elaborate 
> > > so we can fix up the changelog ?
> > as example generate via the config.h a env var name standalone_load_addr
> > automaticly so the end user will just have to built it, load it and run it
> 
> This is error prone.  NAK.
which error?

Best Regards,
J.

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-15 10:51           ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-15 18:29             ` Wolfgang Denk
  2009-03-15 19:23               ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-15 21:47               ` Mike Frysinger
  0 siblings, 2 replies; 14+ messages in thread
From: Wolfgang Denk @ 2009-03-15 18:29 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20090315105132.GC23599@game.jcrosoft.org> you wrote:
>
> > > as example generate via the config.h a env var name standalone_load_addr
> > > automaticly so the end user will just have to built it, load it and run it
> > 
> > This is error prone.  NAK.
> which error?

The load address of a standalone application cannot be known at
compile time of the U-Boot image.

Please don't assume that the code / Makefiles etc. of that application
is even part of the U-Boot source tree or build system.

Please don't assume that everybody uses the same load addresses.

Please don't asume that all standalone applications running on a
system use the same load addresses - there are cases, where several SA
apps are simultaneously loaded, etc.


Don't try to be clever when this cannot work.

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
A meeting is an event at which the minutes are kept and the hours are
lost.

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-15 18:29             ` Wolfgang Denk
@ 2009-03-15 19:23               ` Jean-Christophe PLAGNIOL-VILLARD
  2009-03-15 21:47               ` Mike Frysinger
  1 sibling, 0 replies; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-15 19:23 UTC (permalink / raw)
  To: u-boot

On 19:29 Sun 15 Mar     , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20090315105132.GC23599@game.jcrosoft.org> you wrote:
> >
> > > > as example generate via the config.h a env var name standalone_load_addr
> > > > automaticly so the end user will just have to built it, load it and run it
> > > 
> > > This is error prone.  NAK.
> > which error?
> 
> The load address of a standalone application cannot be known at
> compile time of the U-Boot image.
> 
> Please don't assume that the code / Makefiles etc. of that application
> is even part of the U-Boot source tree or build system.
> 
> Please don't assume that everybody uses the same load addresses.
I do not assume it that's why I've call it at the first version
EXAMPLE_LOAD_ADDR because it was only for the example
> 
> Please don't asume that all standalone applications running on a
> system use the same load addresses - there are cases, where several SA
> apps are simultaneously loaded, etc.
I known I just want to cleanup the example
As you describe we can run multiple app at the same time and I've done it
on some of my board

Best Regards,
J.

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-15 18:29             ` Wolfgang Denk
  2009-03-15 19:23               ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-15 21:47               ` Mike Frysinger
  2009-03-15 21:49                 ` Wolfgang Denk
  1 sibling, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2009-03-15 21:47 UTC (permalink / raw)
  To: u-boot

On Sunday 15 March 2009 14:29:59 Wolfgang Denk wrote:
> In message Jean-Christophe PLAGNIOL-VILLARD you wrote:
> > > > as example generate via the config.h a env var name
> > > > standalone_load_addr automaticly so the end user will just have to
> > > > built it, load it and run it
> > >
> > > This is error prone.  NAK.
> >
> > which error?
>
> The load address of a standalone application cannot be known at
> compile time of the U-Boot image.
>
> Please don't assume that the code / Makefiles etc. of that application
> is even part of the U-Boot source tree or build system.
>
> Please don't assume that everybody uses the same load addresses.
>
> Please don't asume that all standalone applications running on a
> system use the same load addresses - there are cases, where several SA
> apps are simultaneously loaded, etc.
>
>
> Don't try to be clever when this cannot work.

i dont really see the value in moving the load addr from the u-boot build env 
to the board env automatically, but moving the definitions from 
examples/Makefile to the top level $arch_config.mk sounds sane to me.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090315/88522392/attachment.pgp 

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

* [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR
  2009-03-15 21:47               ` Mike Frysinger
@ 2009-03-15 21:49                 ` Wolfgang Denk
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2009-03-15 21:49 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

In message <200903151747.23995.vapier@gentoo.org> you wrote:
>
> > Don't try to be clever when this cannot work.
> 
> i dont really see the value in moving the load addr from the u-boot build env 
> to the board env automatically, but moving the definitions from 
> examples/Makefile to the top level $arch_config.mk sounds sane to me.

Right. Thanks for making this clear.

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
"Nobody will ever need more than 640k RAM!"       -- Bill Gates, 1981
"Windows 95 needs at least 8 MB RAM."             -- Bill Gates, 1996
"Nobody will ever need Windows 95."             -- logical conclusion

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

end of thread, other threads:[~2009-03-15 21:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04  9:11 [U-Boot] [PATCH 1/1] example: introduce EXAMPLE_LOAD_ADDR Jean-Christophe PLAGNIOL-VILLARD
2009-03-08 22:37 ` Wolfgang Denk
2009-03-14 11:13   ` [U-Boot] [PATCH V2] example/standalone: introduce STANDALONE_LOAD_ADDR Jean-Christophe PLAGNIOL-VILLARD
2009-03-14 11:37     ` Mike Frysinger
2009-03-14 12:45       ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-14 13:12         ` Mike Frysinger
2009-03-14 13:19           ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-14 13:41             ` Mike Frysinger
2009-03-14 21:31         ` Wolfgang Denk
2009-03-15 10:51           ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-15 18:29             ` Wolfgang Denk
2009-03-15 19:23               ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-15 21:47               ` Mike Frysinger
2009-03-15 21:49                 ` Wolfgang Denk

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.