All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] "CONFIG_*" versus "CONFIG_SYS_*" variables in u-boot?
@ 2016-09-29 14:27 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2016-09-29 14:27 UTC (permalink / raw)
  To: u-boot


  from README file:

  There are two classes of configuration variables:

  * Configuration _OPTIONS_:
    These are selectable by the user and have names beginning with
    "CONFIG_".

  * Configuration _SETTINGS_:
    These depend on the hardware etc. and should not be meddled with if
    you don't know what you're doing; they have names beginning with
    "CONFIG_SYS_".

historically, i've always understood (from kernel stuff) that
macros that begin with "CONFIG_" should *always* be user-selectable
through the Kbuild system. so i'm not sure how to interpret a
"CONFIG_SYS_"  prefix.

  i ask given a couple examples i just ran across. first, this
regarding the macro "CONFIG_MAC_OFFSET":

board/cm5200/cm5200.c:	if (i2c_read(CONFIG_SYS_I2C_EEPROM, CONFIG_MAC_OFFSET, 2, buf, 6) == 0) {
board/cm5200/cm5200.c:			CONFIG_MAC_OFFSET);
include/configs/cm5200.h:#define CONFIG_MAC_OFFSET	0x35	/* MAC address offset in I2C EEPROM */

to me, that *clearly* should not have used "CONFIG_MAC_OFFSET", but
rather just "MAC_OFFSET."

  the second example, though, is not quite as clear:

board/pdm360ng/pdm360ng.c:			       CONFIG_SYS_I2C_EEPROM_MAC_OFFSET, 1, buf, 6);
board/pdm360ng/pdm360ng.c:				CONFIG_SYS_I2C_EEPROM_MAC_OFFSET);
include/configs/pdm360ng.h:#define CONFIG_SYS_I2C_EEPROM_MAC_OFFSET	0x10

so even though this second example is also not defined by the Kbuild
system, is it somehow more acceptable because it begins with
"CONFIG_SYS_"? i'm having trouble appreciating the distinction.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-29 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 14:27 [U-Boot] "CONFIG_*" versus "CONFIG_SYS_*" variables in u-boot? Robert P. J. Day

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.