board: samsung: Remove incorrect SYS_CONFIG_NAME in axy17lte Kconfig
PATCH 1/1 board: samsung: Remove incorrect SYS_CONFIG_NAME in axy17lte Kconfig
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.
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 the build error, as the generated include file has double '.h' extension.
Fix the issue by simply removing the SYS_CONFIG_NAME definition in axy17lte Kconfig, as all related defconfigs already declare internal values for SYS_CONFIG_NAME:
- a5y17lte_defconfig
- a7y17lte_defconfig
- a3y17lte_defconfig
--- board/samsung/axy17lte/Kconfig | 8 -------- 1 file changed, 8 deletions(-)
board/samsung/axy17lte/Kconfig +0 -8
@@ -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"
Signature · 1 line
2.39.2
Hi!
2023년 10월 21일 (토) 09:10, Sam Protsenko <[email protected]>님이 작성:
Quoted 67 lines
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.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 the build error, as the generated include file has double '.h' extension.
Fix the issue by simply removing the
SYS_CONFIG_NAMEdefinition in axy17lteKconfig, as all related defconfigs already declare internal values forSYS_CONFIG_NAME:-
a5y17lte_defconfig
-a7y17lte_defconfig
-a3y17lte_defconfigSigned-off-by Sam Protsenko <[email protected]>Fixes 3e2095e960b4 ("board: samsung: add support for Galaxy A series of2017 (a5y17lte)")
--- board/samsung/axy17lte/Kconfig | 8 -------- 1 file changed, 8 deletions(-)board/samsung/axy17lte/Kconfig +0
-6@@ -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>.hheader
board/samsung/axy17lte/Kconfig +0
-3- will be used for board configuration. - if TARGET_A5Y17LTE config SYS_BOARD default "axy17lte" --
Quoted 2 lines
2.39.2
This patch makes a build error since axy17lte.h was not exist. Am I miss something?
And.. actually I can't catch what you exactly fix with this patch.
Thanks.
Minkyu Kang.
Quoted 9 lines · Sam Protsenko
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:
Good spotting on this one.
[snip]
Quoted 6 lines
board/samsung/axy17lte/Kconfig +0
-1@@ -1,11 +1,3 @@ -config SYS_CONFIG_NAME
board/samsung/axy17lte/Kconfig line 3
Quoted 10 lines
board/samsung/axy17lte/Kconfig +0
-7- 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"
But this isn't right as Minkyu points out because SYS_CONFIG_NAME isn't set for these platforms now. The fix is to do as board/freescale/lx2160a/Kconfig does for example and have SYS_CONFIG_NAME under each if TARGET_... stanza, even if we're repeating the value. It may or may not look cleaner to do:
config SYS_CONFIG_NAME
default "exynos78x0-common.h" if TARGET_A5Y17LTE || \ TARGET_A7Y17LTE || TARGET_A3Y17LTE
In the file directly, instead.
Signature · 1 line
Tom
Quoted 39 lines · Tom Rini
Quoted 9 lines · Sam Protsenko
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:
Good spotting on this one.
[snip]
Quoted 6 lines
board/samsung/axy17lte/Kconfig +0
-1@@ -1,11 +1,3 @@ -config SYS_CONFIG_NAMEboard/samsung/axy17lte/Kconfig line 3
Quoted 10 lines
board/samsung/axy17lte/Kconfig +0
-7- 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"But this isn't right as Minkyu points out because
SYS_CONFIG_NAMEisn't set for these platforms now. The fix is to do as board/freescale/lx2160a/Kconfig does for example and haveSYS_CONFIG_NAMEunder each ifTARGET_... stanza, even if we're repeating the value. It may or may not look cleaner to do:
configSYS_CONFIG_NAME
Quoted 5 lines
default "exynos78x0-common.h" if TARGET_A5Y17LTE || \ TARGET_A7Y17LTE || TARGET_A3Y17LTEIn the file directly, instead.
Thanks for the review! I just sent v2 [1], hopefully addressing your and Minkyu's comments. And also threw in [PATCH v2 2/2] this time, reworking defconfigs accordingly.
[1] https://lists.denx.de/pipermail/u-boot/2023-November/536981.html
Quoted 2 lines
--
Tom