From 9e04142210c11b05a2a518720ba3330b1950b0ff Mon Sep 17 00:00:00 2001 From: Adam Wujek <dev_public@wujek.eu> Date: Wed, 27 Nov 2024 15:51:37 +0100 Subject: [PATCH] Kconfig: move build-time options to separate menu (no technical change) Move: -BR2_CONFIGFILE -Compilation optimization to "Build-time configuration" menu Signed-off-by: Adam Wujek <dev_public@wujek.eu> --- Kconfig | 117 ++++++++++++++++++---------------- configs/wrs_release_defconfig | 14 ++-- 2 files changed, 71 insertions(+), 60 deletions(-) diff --git a/Kconfig b/Kconfig index 3b18f077b..fe15b97f2 100644 --- a/Kconfig +++ b/Kconfig @@ -109,20 +109,6 @@ config LEAPSEC_URL Example: "tftp://BOOTSERVER/leap-seconds.IPADDR" -config BR2_CONFIGFILE - string "Configuration file for Buildroot" - default "wrs_release_br2_config" - help - The configuration file selects which packages are to be - included in the WRS filesystem and which are not. If - you pass a relative pathname, the build procedure will - look for it in wr-switch-sw/configs/buildroot, while - absolute pathnames are used unchanged. - - If the string being passed doesn't refer to a file, the - scripts print a warning and use the default file. Incorrect - files lead to unpredicatable results. - config PPSI bool default y @@ -613,15 +599,6 @@ config WRS_LOG_LEVEL_OTHER configured will be passed to the syslog at the same <facility>.<level> -config KEEP_ROOTFS - bool "Keep generated filesystem and related script" - help - During development of build scripts, it may be useful - to keep the generated root filesystem as well as the - script used to create it. If selected, the build script - will report the actual file names at each build. - If unsusre, say N. - endmenu @@ -1365,6 +1342,68 @@ config HTTPD_DISABLE Disable web interface. menu "Developer options" + +menu "Build-time configuration" +config BR2_CONFIGFILE + string "Configuration file for Buildroot" + default "wrs_release_br2_config" + help + The configuration file selects which packages are to be + included in the WRS filesystem and which are not. If + you pass a relative pathname, the build procedure will + look for it in wr-switch-sw/configs/buildroot, while + absolute pathnames are used unchanged. + + If the string being passed doesn't refer to a file, the + scripts print a warning and use the default file. Incorrect + files lead to unpredicatable results. + +choice + prompt "Compilation optimization" + + config OPTIMIZATION_SPEED + bool "Execution time (-O2)" + help + GCC performs nearly all supported optimizations that do not + involve a space-speed tradeoff. + + config OPTIMIZATION_SIZE_SPEED + bool "Size and execution time (-Os)" + help + Optimize for size. Enables all -O2 optimizations except those + that often increase code size. + + config OPTIMIZATION_DEBUGGING + bool "Debugging (-Og)" + help + Should be the optimization level choice for the standard + edit-compile-debug cycle + + config OPTIMIZATION_NONE_DEBUGGING + bool "Debugging without optimization(-ggdb)" + help + Compile without optimization and with debug informations +endchoice #"Compilation optimization" + +config OPTIMIZATION + string + default "-Os -ggdb" if OPTIMIZATION_SIZE_SPEED + default "-O2 -ggdb" if OPTIMIZATION_SPEED + default "-Og -ggdb" if OPTIMIZATION_DEBUGGING + default "-ggdb" if OPTIMIZATION_NONE_DEBUGGING + default "-ggdb" + +config KEEP_ROOTFS + bool "Keep generated filesystem and related script" + help + During development of build scripts, it may be useful + to keep the generated root filesystem as well as the + script used to create it. If selected, the build script + will report the actual file names at each build. + If unsusre, say N. + +endmenu # "Build-time configuration" + config MONIT_DISABLE bool "Disable monit" default n @@ -1412,38 +1451,6 @@ config FAN_HYSTERESIS_PWM_VAL endmenu # "Fan speed control" -choice - prompt "Compilation optimization" - - config OPTIMIZATION_SPEED - boolean "Execution time (-O2)" - help - GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff. - - config OPTIMIZATION_SIZE_SPEED - boolean "Size and execution time (-Os)" - help - Optimize for size. Enables all -O2 optimizations except those that often increase code size. - - config OPTIMIZATION_DEBUGGING - boolean "Debugging (-Og)" - help - Should be the optimization level choice for the standard edit-compile-debug cycle - - config OPTIMIZATION_NONE_DEBUGGING - boolean "Debugging without optimization(-ggdb)" - help - Compile without optimization and with debug informations -endchoice - -config OPTIMIZATION - string - default "-Os -ggdb" if OPTIMIZATION_SIZE_SPEED - default "-O2 -ggdb" if OPTIMIZATION_SPEED - default "-Og -ggdb" if OPTIMIZATION_DEBUGGING - default "-ggdb" if OPTIMIZATION_NONE_DEBUGGING - default "-ggdb" - menu "Overwrite SoftPLL Settings" config SPLL_MPLL_KP_OVERWRITE diff --git a/configs/wrs_release_defconfig b/configs/wrs_release_defconfig index 1efb16ed3..140a4e3c6 100644 --- a/configs/wrs_release_defconfig +++ b/configs/wrs_release_defconfig @@ -11,7 +11,6 @@ CONFIG_DOTCONF_SOURCE_TRY_DHCP=y CONFIG_LEAPSEC_SOURCE_LOCAL=y # CONFIG_LEAPSEC_SOURCE_REMOTE_FORCE is not set # CONFIG_LEAPSEC_SOURCE_REMOTE_TRY is not set -CONFIG_BR2_CONFIGFILE="wrs_release_br2_config" CONFIG_PPSI=y # @@ -67,7 +66,6 @@ CONFIG_WRS_LOG_SNMPD="Swd" CONFIG_WRS_LOG_MONIT="syslog" CONFIG_WRS_LOG_OTHER="default_syslog" CONFIG_WRS_LOG_LEVEL_OTHER="" -# CONFIG_KEEP_ROOTFS is not set # # Global PTP configuration (profile, timing mode, BMCA and external port config, ...) @@ -954,17 +952,23 @@ CONFIG_HTTPD_DISABLE=y # # Developer options # -# CONFIG_MONIT_DISABLE is not set # -# Fan speed control +# Build-time configuration # -# CONFIG_FAN_HYSTERESIS is not set +CONFIG_BR2_CONFIGFILE="wrs_release_br2_config" CONFIG_OPTIMIZATION_SPEED=y # CONFIG_OPTIMIZATION_SIZE_SPEED is not set # CONFIG_OPTIMIZATION_DEBUGGING is not set # CONFIG_OPTIMIZATION_NONE_DEBUGGING is not set CONFIG_OPTIMIZATION="-O2 -ggdb" +# CONFIG_KEEP_ROOTFS is not set +# CONFIG_MONIT_DISABLE is not set + +# +# Fan speed control +# +# CONFIG_FAN_HYSTERESIS is not set # # Overwrite SoftPLL Settings -- GitLab