Skip to contentSkip to conversation

PLATFORM_CPPFLAGS ?

U-Boot Timur Tabi 3 participants 4 messages Aug 6, 2009

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

Why do we define the same macros in config.mk and in the board header file?

config.mk:
PLATFORM_CPPFLAGS += -DCONFIG_E500=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1

MPC8572DS.h:

#define CONFIG_BOOKE            1       /* BOOKE */
#define CONFIG_E500             1       /* BOOKE e500 family */
#define CONFIG_MPC85xx          1       /* MPC8540/60/55/41/48 */
#define CONFIG_MPC8572          1

Isn't it redundant to have these entries in config.mk? We seem to be doing this more and more, but config.mk is always board-specific, just like MPC8572DS.h.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#1 lore raw

Dear Timur Tabi,

Quoted 1 line · In message <[email protected]> you wrote:

Why do we define the same macros in config.mk and in the board header file?

We == Freescale here? I agree - I never understood this either.

Quoted 3 lines

Isn't it redundant to have these entries in config.mk? We seem to be doing this more and more, but config.mk is always board-specific, just like MPC8572DS.h.

Yes, this is redundant, and IMHO bogus. I always thought it was a local pastime at Freescale...

Best regards,

Wolfgang Denk

Signature · 6 lines
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 star captain's most solemn oath is that he will give his life, even
his entire crew, rather than violate the Prime Directive.
	-- Kirk, "The Omega Glory", stardate unknown
#2 lore raw
Quoted 6 lines · Wolfgang Denk

Dear Timur Tabi,

Quoted 2 lines · In message <[email protected]> you wrote:

Why do we define the same macros in config.mk and in the board header file?

Quoted 8 lines

We == Freescale here? I agree - I never understood this either.

Quoted 3 lines

Isn't it redundant to have these entries in config.mk? We seem to be doing this more and more, but config.mk is always board-specific, just like MPC8572DS.h.

Yes, this is redundant, and IMHO bogus. I always thought it was a local pastime at Freescale...

I think its a copy/paste thing that's just propagated w/o anyone asking why.

We probably based the first 85xx port on a 440 seeing as the 440's seem to do the following:

board/amcc/ebony/config.mk:PLATFORM_CPPFLAGS += -DCONFIG_440=1

any reason the 440's platforms do this?

- k

#3 lore raw

Dear Kumar Gala,

Quoted 3 lines · In message <[email protected]> you wrote:

I think its a copy/paste thing that's just propagated w/o anyone asking why.

The Wisdom of Crowds in action ;-)

Quoted 6 lines

We probably based the first 85xx port on a 440 seeing as the 440's seem to do the following:

board/amcc/ebony/config.mk:PLATFORM_CPPFLAGS += -DCONFIG_440=1

any reason the 440's platforms do this?

There is probably a reason. Most probably not a good one, though ;-)

Best regards,

Wolfgang Denk

Signature · 4 lines
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 whole world is about three drinks behind."     - Humphrey Bogart