shell: do not enable subsystem/driver shell modules by default

Do not enable subsystem/driver shell modules by default and stop abusing
CONFIG_SHELL_MINIMAL, which is internal to the shell subsystem, to decide
when to enable a driver shell.

The list of shell modules has grown considerably through the
years. Enabling CONFIG_SHELL for doing e.g. an interactive debug session
leads to a large number of shell modules also being enabled unless
explicitly disabled, which again leads to non-negligible increases in
RAM/ROM usage.

This commit attempts to establish a policy of subsystem/driver shell
modules being disabled by default, requiring the user/application to
explicitly enable only those needed.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2023-11-16 15:09:40 +01:00 committed by Carles Cufí
parent f345378db1
commit c0c8952739
31 changed files with 3 additions and 28 deletions

View file

@ -17,7 +17,6 @@ if ADC
config ADC_SHELL
bool "ADC Shell"
default y
depends on SHELL
help
Enable ADC Shell for testing.

View file

@ -27,7 +27,6 @@ config AUDIO_CODEC_INIT_PRIORITY
config AUDIO_CODEC_SHELL
bool "Audio Codec shell"
default y
depends on SHELL
help
Enable the Audio Codec shell with Audio Codec related commands.

View file

@ -25,7 +25,6 @@ config CAN_INIT_PRIORITY
config CAN_SHELL
bool "CAN shell"
default y
depends on SHELL
select POLL
help

View file

@ -25,7 +25,6 @@ if CLOCK_CONTROL_NRF
config CLOCK_CONTROL_NRF_SHELL
bool "Shell commands"
depends on SHELL
default y if SHELL
choice CLOCK_CONTROL_NRF_SOURCE
prompt "32KHz clock source"

View file

@ -19,7 +19,6 @@ source "subsys/logging/Kconfig.template.log_config"
config DAC_SHELL
bool "DAC shell"
default y
depends on SHELL
help
Enable DAC related shell commands.

View file

@ -19,7 +19,6 @@ config EDAC_ERROR_INJECT
config EDAC_SHELL
bool "EDAC Shell"
depends on SHELL
default y if SHELL
help
Enable EDAC shell for debugging EDAC.

View file

@ -24,7 +24,6 @@ config EEPROM_INIT_PRIORITY
config EEPROM_SHELL
bool "EEPROM shell"
default y
depends on SHELL
help
Enable the EEPROM shell with EEPROM related commands.

View file

@ -53,7 +53,6 @@ config FLASH_SHELL
bool "Flash shell"
depends on SHELL && FLASH_PAGE_LAYOUT
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
default y
help
Enable the flash shell with flash related commands such as test,
write, read and erase.

View file

@ -16,7 +16,6 @@ source "subsys/logging/Kconfig.template.log_config"
config HWINFO_SHELL
bool "HWINFO Shell"
default y
depends on SHELL
help
Enable hwinfo Shell for testing.

View file

@ -15,7 +15,6 @@ if I2C
config I2C_SHELL
bool "I2C Shell"
default y
depends on SHELL
help
Enable I2C Shell.

View file

@ -21,7 +21,6 @@ source "subsys/logging/Kconfig.template.log_config"
config LORA_SHELL
bool "LoRa Shell"
default y
depends on SHELL
help
Enable LoRa Shell for testing.

View file

@ -15,7 +15,6 @@ if MDIO
config MDIO_SHELL
bool "MDIO Shell"
default y
depends on SHELL
help
Enable MDIO Shell.

View file

@ -82,7 +82,6 @@ config PCIE_PRT
config PCIE_SHELL
bool "PCIe/new PCI Shell"
default y
depends on SHELL
help
Enable commands for debugging PCI(e) using the built-in shell.

View file

@ -32,7 +32,6 @@ config PM_CPU_OPS_PSCI
config PSCI_SHELL
bool "Support for PSCI interface shell commands"
default y
depends on SHELL && PM_CPU_OPS_PSCI
help
Say Y here if you need to enable PSCI interface shell commands

View file

@ -22,7 +22,6 @@ config PWM_INIT_PRIORITY
config PWM_SHELL
bool "PWM shell"
default y
depends on SHELL
help
Enable the PWM related shell commands.

View file

@ -17,7 +17,6 @@ config REGULATOR_THREAD_SAFE_REFCNT
config REGULATOR_SHELL
bool "Regulator shell"
default y
depends on SHELL
help
Enable regulator shell framework, for interacting with regulators via

View file

@ -32,7 +32,6 @@ config SENSOR_SHELL
depends on SHELL
select CBPRINTF_FP_SUPPORT
select SENSOR_ASYNC_API
default y if !SHELL_MINIMAL
help
This shell provides access to basic sensor data.

View file

@ -12,7 +12,6 @@ if SMBUS
config SMBUS_SHELL
bool "SMBus Shell"
default y
depends on SHELL
help
Enable SMBus Shell.

View file

@ -26,7 +26,6 @@ config W1_INIT_PRIORITY
config W1_SHELL
bool "1-Wire Shell"
depends on SHELL
default y if !SHELL_MINIMAL
help
Enable 1-Wire Shell for testing.

View file

@ -3,7 +3,6 @@
config WDT_SHELL
bool "Watchdog (WDT) shell"
default y
depends on SHELL
help
Enable WDT shell.

View file

@ -32,7 +32,6 @@ endif # PCIE_PRT
config ACPI_SHELL
bool "ACPI command Shell"
default y
depends on SHELL
help
Enable commands for debugging ACPI using the built-in shell.

View file

@ -1,4 +1,5 @@
CONFIG_SMBUS=y
CONFIG_SMBUS_SHELL=y
CONFIG_SMBUS_INTEL_PCH=y
CONFIG_SMBUS_LOG_LEVEL_DBG=y
CONFIG_USERSPACE=y

View file

@ -5,5 +5,6 @@ CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_GPIO=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_SHELL=y
CONFIG_SENSOR=y
CONFIG_LED=y

View file

@ -7,4 +7,5 @@ CONFIG_GETOPT=y
CONFIG_GETOPT_LONG=y
CONFIG_GPIO=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_SHELL=y
CONFIG_WATCHDOG=y

View file

@ -71,7 +71,6 @@ endchoice
config DEBUG_COREDUMP_SHELL
bool "Coredump shell"
default y
depends on SHELL
help
This shell provides access to coredump and its backends.

View file

@ -33,7 +33,6 @@ endchoice
config MCUBOOT_SHELL
bool "MCUboot shell"
default y
depends on MCUBOOT_IMG_MANAGER
depends on SHELL
help

View file

@ -15,7 +15,6 @@ config LOG_CMDS
bool "Shell commands"
depends on SHELL
depends on !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL
default y if SHELL
config LOG_TEST_CLEAR_MESSAGE_SPACE
bool "Clear message after allocation"

View file

@ -151,7 +151,6 @@ endmenu # "Zephyr optimizations"
config OPENTHREAD_SHELL
bool "OpenThread shell"
depends on SHELL
default y
config MBEDTLS_PROMPTLESS
bool

View file

@ -20,7 +20,6 @@ config STATS_NAMES
config STATS_SHELL
bool "Statistics Shell Command"
default y
depends on STATS && SHELL
imply STATS_NAMES
help

View file

@ -18,7 +18,6 @@ source "subsys/logging/Kconfig.template.log_config"
config USBD_SHELL
bool "USB device shell"
default y
depends on SHELL
help
Enable USB device shell.

View file

@ -17,7 +17,6 @@ source "subsys/logging/Kconfig.template.log_config"
config USBH_SHELL
bool "USB host shell"
default y
depends on SHELL
help
Shell commands for USB host support.