Skip to contentSkip to conversation

only use $(TEXT_BASE) if it is set

PATCH New Mike Frysinger 2 participants 3 messages Jun 22, 2007 – Jul 15, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 only use $(TEXT_BASE) if it is set

we've moved TEXT_BASE out of the build system for Blackfin and into the config header so that when porting to a new board, users dont need to set both the CFG_MONITOR_BASE and TEXT_BASE to the same value in two remotely different files

for u-boot general though, i'd like to apply the attached patch that simply says only utilize TEXT_BASE in global common files if it is set ... that way everyone else can continue to use TEXT_BASE in their board specific .mk files while in Blackfin, we can simply unset it

---

config.mk +8 -3
index 582df32..e57339f 100644
@@ -147,8 +147,10 @@ OBJCFLAGS += --gap-fill=0xff
 
 gccincdir := $(shell $(CC) -print-file-name=include)
 
-CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS)		\
-	-D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE)		\
+CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) -D__KERNEL__
+ifneq ($(TEXT_BASE),) 
+CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
+endif
 
 ifneq ($(OBJTREE),$(SRCTREE))
 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
@@ -186,7 +188,10 @@ endif
 
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
-LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)
+LDFLAGS += -Bstatic -T $(LDSCRIPT) $(PLATFORM_LDFLAGS)
+ifneq ($(TEXT_BASE),)
+LDFLAGS += -Ttext $(TEXT_BASE)
+endif
 
 # Location of a usable BFD library, where we define "usable" as
 # "built for ${HOST}, supports ${TARGET}".  Sensible values are

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070622/1d715b83/attachment.pgp

#1 lore raw

PATCH 1/1 only use $(TEXT_BASE) if it is set

Quoted 9 lines · Mike Frysinger

we've moved TEXT_BASE out of the build system for Blackfin and into the config header so that when porting to a new board, users dont need to set both the CFG_MONITOR_BASE and TEXT_BASE to the same value in two remotely different files

for u-boot general though, i'd like to apply the attached patch that simply says only utilize TEXT_BASE in global common files if it is set ... that way everyone else can continue to use TEXT_BASE in their board specific .mk files while in Blackfin, we can simply unset it

ping ... simple patch which shouldnt break anyone ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070714/b5ffd298/attachment.pgp

#2 lore raw

PATCH 1/1 only use $(TEXT_BASE) if it is set

In reply to Mike Frysinger
Quoted 9 lines · Mike Frysinger

we've moved TEXT_BASE out of the build system for Blackfin and into the config header so that when porting to a new board, users dont need to set both the CFG_MONITOR_BASE and TEXT_BASE to the same value in two remotely different files

for u-boot general though, i'd like to apply the attached patch that simply says only utilize TEXT_BASE in global common files if it is set ... that way everyone else can continue to use TEXT_BASE in their board specific .mk files while in Blackfin, we can simply unset it

This change is probably okay, so...

However, I think it is only treating a symptom, and not the root problem. The root problem is that values set in the config header are not available to the build system and visa-versa. This is probably going to be solved as part of the Big-UBoot-Rework(tm) that is currently underway.

Cheers,
g.

Signature · 4 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195