Skip to contentSkip to conversation

should all include/configs/*.h headers be included via SYS_CONFIG_NAME?

U-Boot Robert P. J. Day 1 participant 1 message Apr 23, 2019

lore
Share & tools
lore
#0 lore raw

pretty sure i know the answer to this, but i'm going to ask it
anyway ... should all header files under include/configs/ be included in a build either directly or indirectly via the value in CONFIG_SYS_CONFIG_NAME?

i'm aware of that Kbuild setting and what it's used for:

config SYS_CONFIG_NAME
string "Board configuration name"
default "zynq-common"
help
This option contains information about board configuration name. Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header will be used for board configuration.

at which point that header file might well include further header files under include/configs/ and so on. so the question is, are include/configs/ header files meant to be included *exclusively* via CONFIG_SYS_CONFIG_NAME?

i ask since, out of curiosity, i did a quick grep to see if any of
them were included from anywhere else, and i found all of one hit in the entire code base:

  $ git grep '#include <configs' | grep -v ^include
  board/renesas/ecovec/lowlevel_init.S:#include <configs/ecovec.h>
  $

i thought it was odd that there would be a single example of that in the whole code base, even more so since the board file Kconfig board/renesas/ecovec/Kconfig includes:

config SYS_CONFIG_NAME
default "ecovec"

which suggests that header file would have been included anyway.

thoughts?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

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