board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig
PATCH v2 1/2 board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig
There is a couple of issues related to SYS_CONFIG_NAME config in axy17lte Kconfig.
1. The global SYS_CONFIG_NAME in axy17lte Kconfig overrides SYS_CONFIG_NAME for all boards specified after this line in arch/arm/mach-exynos/Kconfig:
source "board/samsung/axy17lte/Kconfig"
Right now it's the last 'source' line there, so the issue is not reproducible. But once some board is moved or added after this line the next build error will happen:
GEN include/autoconf.mk.dep
In file included from ./include/common.h:16:
include/config.h:3:10: fatal error: configs/exynos78x0-common.h.h:
No such file or directory
3 | #include <configs/exynos78x0-common.h.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated. That's happening because axy17lte Kconfig defines SYS_CONFIG_NAME option in global namespace (not guarded with any "if TARGET_..."), so it basically rewrites the correct SYS_CONFIG_NAME defined in the hypothetical boards which might appear after axy17lte in mach-exynos Kconfig.
2. Another side of the issue is that SYS_CONFIG_NAME is defined incorrectly in axy17lte Kconfig:
config SYS_CONFIG_NAME
default "exynos78x0-common.h"
The .h extension should not have been specified there. It's leading to a build error, as the generated include file has a double '.h' extension.
3. Each target in axy17lte/Kconfig defines its own SYS_CONFIG_NAME. But all of those in fact incorrect, as corresponding include/configs/<CONFIG_SYS_CONFIG_NAME>.h header files don't exist.
4. The global SYS_CONFIG_NAME pretty much repeats the help description from arch/Kconfig and doc/README.kconfig.
Corresponding defconfig files (a*y17lte_defconfig) fix above issues by overriding SYS_CONFIG_NAME and correctly setting it to "exynos78x0-common".
Fix all mentioned issues by removing the incorrect global SYS_CONFIG_NAME and instead specifying it (correctly) in SYS_CONFIG_NAME options for each target instead.
---
Changes in v2:
- Don't just remove global SYS_CONFIG_NAME, also fix SYS_CONFIG_NAME for each target in Kconfig
board/samsung/axy17lte/Kconfig | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
board/samsung/axy17lte/Kconfig +3 -11
@@ -1,11 +1,3 @@ -config SYS_CONFIG_NAME - string "Board configuration name" - default "exynos78x0-common.h" - 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. - if TARGET_A5Y17LTE config SYS_BOARD default "axy17lte"
@@ -16,7 +8,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a5y17lte" + default "exynos78x0-common" config EXYNOS7880 bool "Exynos 7880 SOC support"
@@ -33,7 +25,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a5y17lte" + default "exynos78x0-common" config EXYNOS7880 bool "Exynos 7880 SOC support"
@@ -50,7 +42,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a3y17lte" + default "exynos78x0-common" config EXYNOS7870 bool "Exynos 7870 SOC support"
Signature · 1 line
2.39.2
PATCH v2 2/2 configs: Remove unneeded SYS_CONFIG_NAME from a*y17lte defconfigs
As correct default SYS_CONFIG_NAME value is now set in board/samsung/axy17lte/Kconfig (in commit "board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig"), the SYS_CONFIG_NAME option can be safely removed from all a*y17lte defconfigs. That removal doesn't change resulting .config files.
---
Changes in v2:
- None. This patch wasn't present in v1
configs/a3y17lte_defconfig | 1 - configs/a5y17lte_defconfig | 1 - configs/a7y17lte_defconfig | 1 - 3 files changed, 3 deletions(-)
configs/a3y17lte_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_ARM=y -CONFIG_SYS_CONFIG_NAME="exynos78x0-common" CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=26000000 CONFIG_ARCH_EXYNOS=y
configs/a5y17lte_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_ARM=y -CONFIG_SYS_CONFIG_NAME="exynos78x0-common" CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=26000000 CONFIG_ARCH_EXYNOS=y
configs/a7y17lte_defconfig +0 -1
@@ -1,5 +1,4 @@ CONFIG_ARM=y -CONFIG_SYS_CONFIG_NAME="exynos78x0-common" CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=26000000 CONFIG_ARCH_EXYNOS=y
Signature · 1 line
2.39.2
Re: [PATCH v2 2/2] configs: Remove unneeded SYS_CONFIG_NAME from a*y17lte defconfigs
Hi!
2023년 11월 10일 (금) 05:13, Sam Protsenko <[email protected]>님이 작성:
Quoted 47 lines
As correct default
SYS_CONFIG_NAMEvalue is now set in board/samsung/axy17lte/Kconfig (in commit "board: samsung: FixSYS_CONFIG_NAMEconfigs in axy17lteKconfig"), theSYS_CONFIG_NAMEoption can be safely removed from all a*y17lte defconfigs. That removal doesn't change resulting .config files.Signed-off-by Sam Protsenko <[email protected]>---
Changes in v2:
- None. This patch wasn't present in v1configs/a3y17lte_defconfig | 1 - configs/a5y17lte_defconfig | 1 - configs/a7y17lte_defconfig | 1 - 3 files changed, 3 deletions(-)configs/a3y17lte_defconfig +0
-1@@ -1,5 +1,4 @@ CONFIG_ARM=y -CONFIG_SYS_CONFIG_NAME="exynos78x0-common" CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=26000000 CONFIG_ARCH_EXYNOS=yconfigs/a5y17lte_defconfig +0
-1@@ -1,5 +1,4 @@ CONFIG_ARM=y -CONFIG_SYS_CONFIG_NAME="exynos78x0-common" CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=26000000 CONFIG_ARCH_EXYNOS=yconfigs/a7y17lte_defconfig +0
-2@@ -1,5 +1,4 @@ CONFIG_ARM=y -CONFIG_SYS_CONFIG_NAME="exynos78x0-common" CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=26000000 CONFIG_ARCH_EXYNOS=y --
Quoted 2 lines
2.39.2
applied to u-boot-samsung.
Thanks.
Minkyu Kang.
Hi Tom, Minkyu,
Quoted 49 lines · Sam Protsenko
There is a couple of issues related to
SYS_CONFIG_NAMEconfig in axy17lteKconfig.1. The global
SYS_CONFIG_NAMEin axy17lteKconfigoverridesSYS_CONFIG_NAMEfor all boards specified after this line inarch/arm/mach-exynos/Kconfig:source "board/samsung/axy17lte/Kconfig"
Right now it's the last 'source' line there, so the issue is not reproducible. But once some board is moved or added after this line the next build error will happen:
GEN include/autoconf.mk.dep In file included from ./include/common.h:16: include/config.h:3:10: fatal error: configs/exynos78x0-common.h.h: No such file or directory 3 | #include <configs/exynos78x0-common.h.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.That's happening because axy17lte
KconfigdefinesSYS_CONFIG_NAMEoption in global namespace (not guarded with any "ifTARGET_..."), so it basically rewrites the correctSYS_CONFIG_NAMEdefined in the hypothetical boards which might appear after axy17lte in mach-exynosKconfig.2. Another side of the issue is that
SYS_CONFIG_NAMEis defined incorrectly in axy17lteKconfig:config
SYS_CONFIG_NAME
default "exynos78x0-common.h"The .h extension should not have been specified there. It's leading to a build error, as the generated include file has a double '.h' extension.
3. Each target in axy17lte/Kconfig defines its own
SYS_CONFIG_NAME. But all of those in fact incorrect, as corresponding include/configs/<CONFIG_SYS_CONFIG_NAME>.h header files don't exist.4. The global
SYS_CONFIG_NAMEpretty much repeats the help description fromarch/Kconfigand doc/README.kconfig.Corresponding defconfig files (a*y17lte_defconfig) fix above issues by overriding
SYS_CONFIG_NAMEand correctly setting it to "exynos78x0-common".
Quoted 7 lines
Fix all mentioned issues by removing the incorrect global
SYS_CONFIG_NAMEand instead specifying it (correctly) inSYS_CONFIG_NAMEoptions for each target instead.Signed-off-by Sam Protsenko <[email protected]>Fixes 3e2095e960b4 ("board: samsung: add support for Galaxy A series of 2017 (a5y17lte)")---
If this series (v2) looks good to you, can you please apply it? It's needed for the new Exynos dev board port I'm working on right now, and expect to submit the patches soon.
Thanks!
Quoted 53 lines
Changes in v2:
- Don't just remove globalSYS_CONFIG_NAME, also fixSYS_CONFIG_NAMEfor each target inKconfigboard/samsung/axy17lte/Kconfig | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)board/samsung/axy17lte/Kconfig +3
-12@@ -1,11 +1,3 @@ -config SYS_CONFIG_NAME - string "Board configuration name" - default "exynos78x0-common.h" - 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. - if TARGET_A5Y17LTE config SYS_BOARD default "axy17lte"@@ -16,7 +8,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a5y17lte" + default "exynos78x0-common" config EXYNOS7880 bool "Exynos 7880 SOC support"@@ -33,7 +25,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a5y17lte" + default "exynos78x0-common" config EXYNOS7880 bool "Exynos 7880 SOC support"@@ -50,7 +42,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a3y17lte" + default "exynos78x0-common" config EXYNOS7870 bool "Exynos 7870 SOC support" --2.39.2
Hi!
2023년 11월 22일 (수) 02:38, Sam Protsenko <[email protected]>님이 작성:
Quoted 119 lines
Hi Tom, Minkyu,
Quoted 49 lines · Sam Protsenko
There is a couple of issues related to
SYS_CONFIG_NAMEconfig in axy17lteKconfig.1. The global
SYS_CONFIG_NAMEin axy17lteKconfigoverridesSYS_CONFIG_NAMEfor all boards specified after this line inarch/arm/mach-exynos/Kconfig:source "board/samsung/axy17lte/Kconfig"
Right now it's the last 'source' line there, so the issue is not reproducible. But once some board is moved or added after this line the next build error will happen:
GEN include/autoconf.mk.dep In file included from ./include/common.h:16: include/config.h:3:10: fatal error: configs/exynos78x0-common.h.h: No such file or directory 3 | #include <configs/exynos78x0-common.h.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.That's happening because axy17lte
KconfigdefinesSYS_CONFIG_NAMEoption in global namespace (not guarded with any "ifTARGET_..."), so it basically rewrites the correctSYS_CONFIG_NAMEdefined in the hypothetical boards which might appear after axy17lte in mach-exynosKconfig.2. Another side of the issue is that
SYS_CONFIG_NAMEis defined incorrectly in axy17lteKconfig:config
SYS_CONFIG_NAME
default "exynos78x0-common.h"The .h extension should not have been specified there. It's leading to a build error, as the generated include file has a double '.h' extension.
3. Each target in axy17lte/Kconfig defines its own
SYS_CONFIG_NAME. But all of those in fact incorrect, as corresponding include/configs/<CONFIG_SYS_CONFIG_NAME>.h header files don't exist.4. The global
SYS_CONFIG_NAMEpretty much repeats the help description fromarch/Kconfigand doc/README.kconfig.Corresponding defconfig files (a*y17lte_defconfig) fix above issues by overriding
SYS_CONFIG_NAMEand correctly setting it to "exynos78x0-common".Quoted 6 lines
Fix all mentioned issues by removing the incorrect global
SYS_CONFIG_NAMEand instead specifying it (correctly) inSYS_CONFIG_NAMEoptions for each target instead.Signed-off-by Sam Protsenko <[email protected]>Fixes 3e2095e960b4 ("board: samsung: add support for Galaxy A series of2017 (a5y17lte)")
Quoted 1 line
---
If this series (v2) looks good to you, can you please apply it? It's needed for the new Exynos dev board port I'm working on right now, and expect to submit the patches soon.
Thanks!
Review
Quoted 8 lines
Changes in v2:
- Don't just remove globalSYS_CONFIG_NAME, also fixSYS_CONFIG_NAMEfor each target inKconfigboard/samsung/axy17lte/Kconfig | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)(quoted diff) +0
-0b/board/samsung/axy17lte/Kconfig
board/samsung/axy17lte/Kconfig line 5
Quoted 9 lines
index
a018547ff5d4..64a4ffa7e673100644board/samsung/axy17lte/Kconfig +0
-5@@ -1,11 +1,3 @@ -config SYS_CONFIG_NAME - string "Board configuration name" - default "exynos78x0-common.h" - help - This option contains information about board configurationname.
board/samsung/axy17lte/Kconfig line 6
Quoted 1 line
board/samsung/axy17lte/Kconfig +0
-1- Based on this optioninclude/configs/<CONFIG_SYS_CONFIG_NAME>.h header
Quoted 30 lines
board/samsung/axy17lte/Kconfig +3
-5- will be used for board configuration. - if TARGET_A5Y17LTE config SYS_BOARD default "axy17lte"@@ -16,7 +8,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a5y17lte" + default "exynos78x0-common" config EXYNOS7880 bool "Exynos 7880 SOC support"@@ -33,7 +25,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a5y17lte" + default "exynos78x0-common" config EXYNOS7880 bool "Exynos 7880 SOC support"@@ -50,7 +42,7 @@ config SYS_VENDOR default "samsung" config SYS_CONFIG_NAME - default "a3y17lte" + default "exynos78x0-common"
Quoted 5 lines
Quoted 5 lines
board/samsung/axy17lte/Kconfig +0
-1config EXYNOS7870 bool "Exynos 7870 SOC support" --2.39.2
applied to u-boot-samsung.
Thanks.
Minkyu Kang.