[U-Boot-Users] [patch] 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
Signed-off-by: Mike Frysinger vapier@gentoo.org --- diff --git a/config.mk b/config.mk index 582df32..e57339f 100644 --- a/config.mk +++ b/config.mk @@ -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

On Friday 22 June 2007, Mike Frysinger wrote:
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

On 6/22/07, Mike Frysinger vapier@gentoo.org wrote:
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...
Acked-by: Grant Likely grant.likely@secretlab.ca
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.
participants (2)
-
Grant Likely
-
Mike Frysinger