Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/shell: make cmds submodules and add KConfig modeling #18355

Merged
merged 5 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/asymcute_mqttsn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USEMODULE += gnrc_ipv6_default
USEMODULE += asymcute
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
# For testing we also include the ping command and some stats
USEMODULE += gnrc_icmpv6_echo
Expand Down
2 changes: 1 addition & 1 deletion examples/benchmark_udp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif

# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += netstats_l2
USEMODULE += netstats_ipv6
Expand Down
2 changes: 1 addition & 1 deletion examples/ccn-lite-relay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ QUIET ?= 1

USEMODULE += ps
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
USEMODULE += netdev_default
Expand Down
2 changes: 1 addition & 1 deletion examples/cord_ep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ USEMODULE += gnrc_icmpv6_echo
USEMODULE += cord_ep_standalone

USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += fmt

Expand Down
2 changes: 1 addition & 1 deletion examples/cord_lc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ USEMODULE += gnrc_icmpv6_echo
USEMODULE += cord_lc

USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# The default size of GCOAP_PDU_BUF_SIZE can be too small for the response
Expand Down
2 changes: 1 addition & 1 deletion examples/default/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ QUIET ?= 1

# Modules to include:
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
# include and auto-initialize all available sensors
USEMODULE += saul_default
Expand Down
2 changes: 1 addition & 1 deletion examples/dtls-echo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USEMODULE += sock_udp

# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

USEPKG += tinydtls
# tinydtls needs crypto secure PRNG
Expand Down
2 changes: 1 addition & 1 deletion examples/dtls-sock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ USEMODULE += prng_sha1prng

# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

# UDP Port to use (20220 is default for DTLS).
DTLS_PORT ?= 20220
Expand Down
2 changes: 1 addition & 1 deletion examples/dtls-wolfssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USEMODULE += sock_udp

# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

USEPKG += wolfssl
USEMODULE += wolfcrypt
Expand Down
2 changes: 1 addition & 1 deletion examples/emcute_mqttsn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USEMODULE += gnrc_ipv6_default
USEMODULE += emcute
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
# For testing we also include the ping command and some stats
USEMODULE += gnrc_icmpv6_echo
Expand Down
2 changes: 1 addition & 1 deletion examples/filesystem/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ QUIET ?= 1

# Modules to include:
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Use the default file system
Expand Down
2 changes: 1 addition & 1 deletion examples/gcoap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ USEMODULE += fmt
USEMODULE += netutils
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Comment this out to disable code in RIOT that does safety checking
Expand Down
2 changes: 1 addition & 1 deletion examples/gcoap/Makefile.slip
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ USEMODULE += od
USEMODULE += fmt
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Comment this out to disable code in RIOT that does safety checking
Expand Down
2 changes: 1 addition & 1 deletion examples/gcoap_block_server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ USEMODULE += fmt
USEMODULE += hashes
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Comment this out to disable code in RIOT that does safety checking
Expand Down
2 changes: 1 addition & 1 deletion examples/gcoap_dtls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ USEMODULE += fmt
USEMODULE += netutils
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Comment this out to disable code in RIOT that does safety checking
Expand Down
2 changes: 1 addition & 1 deletion examples/gcoap_fileserver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ QUIET ?= 1

# Modules to include:
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

# enable the fileserver module
USEMODULE += gcoap_fileserver
Expand Down
2 changes: 1 addition & 1 deletion examples/gnrc_border_router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ USEMODULE += gnrc_sixlowpan_border_router_default
USEMODULE += gnrc_icmpv6_echo
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Optionally include RPL as a routing protocol. When includede gnrc_uhcpc will
Expand Down
2 changes: 1 addition & 1 deletion examples/gnrc_lorawan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ USEMODULE += gnrc_pktdump

# Include the shell and shell commands.
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

# Use GNRC Txtsnd to transmit LoRaWAN from the shell
USEMODULE += gnrc_txtsnd
Expand Down
4 changes: 2 additions & 2 deletions examples/gnrc_networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ USEMODULE += gnrc_rpl
USEMODULE += auto_init_gnrc_rpl
# Additional networking modules that can be dropped if not needed
USEMODULE += gnrc_icmpv6_echo
USEMODULE += gnrc_udp_cmd
USEMODULE += shell_cmd_gnrc_udp
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += netstats_l2
USEMODULE += netstats_ipv6
Expand Down
2 changes: 1 addition & 1 deletion examples/gnrc_networking_mac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ USEMODULE += gnrc_pktdump
USEMODULE += gnrc_icmpv6_echo
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += netstats_l2
USEMODULE += netstats_ipv6
Expand Down
2 changes: 1 addition & 1 deletion examples/gnrc_networking_subnets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ USEMODULE += gnrc_pktdump
USEMODULE += gnrc_icmpv6_echo
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += netstats_l2
USEMODULE += netstats_ipv6
Expand Down
2 changes: 1 addition & 1 deletion examples/ndn-ping/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ USEMODULE += netdev_default
USEMODULE += auto_init_gnrc_netif
USEMODULE += random
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

USEPKG += ndn-riot

Expand Down
2 changes: 1 addition & 1 deletion examples/paho-mqtt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ifneq (,$(DEFAULT_MQTT_PWD))
endif

USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += netdev_default
USEPKG += paho-mqtt
Expand Down
2 changes: 1 addition & 1 deletion examples/posix_sockets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USEMODULE += posix_sleep
USEMODULE += posix_inet
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Comment this out to disable code in RIOT that does safety checking
Expand Down
2 changes: 1 addition & 1 deletion examples/saul/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RIOTBASE ?= $(CURDIR)/../..
USEMODULE += saul_default
# include the shell:
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
# additional modules for debugging:
USEMODULE += ps

Expand Down
2 changes: 1 addition & 1 deletion examples/suit_update/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ USEMODULE += gnrc_icmpv6_echo

# include this for printing IP addresses
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default

# Set this to 1 to enable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
2 changes: 1 addition & 1 deletion examples/telnet_server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif
USEMODULE += netutils
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
# Include the telnet server
USEMODULE += stdio_telnet
Expand Down
2 changes: 1 addition & 1 deletion examples/twr_aloha/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ USEMODULE += uwb-core_twr_ds_ext

# System modules used by this application
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += l2util
USEMODULE += event_callback
Expand Down
2 changes: 1 addition & 1 deletion examples/twr_aloha/app.config.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIG_MODULE_UWB-CORE_TWR_SS_EXT=y
CONFIG_MODULE_UWB-CORE_TWR_DS=y
CONFIG_MODULE_UWB-CORE_TWR_DS_EXT=y
CONFIG_MODULE_SHELL=y
CONFIG_MODULE_SHELL_COMMANDS=y
CONFIG_MODULE_SHELL_CMDS_DEFAULT=y
CONFIG_MODULE_PS=y
CONFIG_MODULE_L2UTIL=y
CONFIG_MODULE_EVENT_PERIODIC=y
Expand Down
2 changes: 1 addition & 1 deletion examples/wakaama/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USEMODULE += gnrc_ipv6_router_default
USEMODULE += gnrc_icmpv6_echo
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += shell_cmds_default
USEMODULE += ps

# Comment this out to disable code in RIOT that does safety checking
Expand Down
10 changes: 10 additions & 0 deletions makefiles/deprecated_modules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@
# Keep this list ALPHABETICALLY SORTED!!!!111elven
DEPRECATED_MODULES += event_thread_lowest
DEPRECATED_MODULES += gnrc_netdev_default
DEPRECATED_MODULES += gnrc_pktbuf_cmd # use shell_cmd_gnrc_pktbuf instead
DEPRECATED_MODULES += gnrc_udp_cmd # use shell_cmd_grnc_udp instead
DEPRECATED_MODULES += heap_cmd # use shell_cmd_heap instead
DEPRECATED_MODULES += i2c_scan # use shell_cmd_i2c_scan instead
DEPRECATED_MODULES += md5sum # use shell_cmd_md5sum instead
DEPRECATED_MODULES += nice # use shell_cmd_nice instead
DEPRECATED_MODULES += random_cmd # use shell_cmd_random instead
DEPRECATED_MODULES += sema_deprecated
DEPRECATED_MODULES += shell_commands # use shell_cmds_default instead
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning behind this rename?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO having both shell_cmds and shell_commands is confusing, as it is not obvious by the name what their relationship is. I have to admid that the relationship of shell_cmds and shell_cmds_default is not super clear by their names only. But at least after knowing what they do it should be easy to not confuse the two.

DEPRECATED_MODULES += sha1sum # use shell_cmd_sha1sum instead
DEPRECATED_MODULES += sha256sum # use shell_cmd_sha256sum instead
DEPRECATED_MODULES += ztimer_now64
47 changes: 47 additions & 0 deletions makefiles/pseudomodules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,53 @@ PSEUDOMODULES += senml_phydat
PSEUDOMODULES += senml_saul
PSEUDOMODULES += sha1sum
PSEUDOMODULES += sha256sum
benpicco marked this conversation as resolved.
Show resolved Hide resolved
PSEUDOMODULES += shell_cmd_app_metadata
PSEUDOMODULES += shell_cmd_at30tse75x
PSEUDOMODULES += shell_cmd_benchmark_udp
PSEUDOMODULES += shell_cmd_ccn-lite-utils
PSEUDOMODULES += shell_cmd_conn_can
PSEUDOMODULES += shell_cmd_cord_ep
PSEUDOMODULES += shell_cmd_cryptoauthlib
PSEUDOMODULES += shell_cmd_dfplayer
PSEUDOMODULES += shell_cmd_fib
PSEUDOMODULES += shell_cmd_gnrc_icmpv6_echo
PSEUDOMODULES += shell_cmd_gnrc_ipv6_blacklist
PSEUDOMODULES += shell_cmd_gnrc_ipv6_frag_stats
PSEUDOMODULES += shell_cmd_gnrc_ipv6_nib
PSEUDOMODULES += shell_cmd_gnrc_ipv6_whitelist
PSEUDOMODULES += shell_cmd_gnrc_netif
PSEUDOMODULES += shell_cmd_gnrc_pktbuf
PSEUDOMODULES += shell_cmd_gnrc_rpl
PSEUDOMODULES += shell_cmd_gnrc_sixlowpan_ctx
PSEUDOMODULES += shell_cmd_gnrc_sixlowpan_frag_stats
PSEUDOMODULES += shell_cmd_gnrc_udp
PSEUDOMODULES += shell_cmd_heap
PSEUDOMODULES += shell_cmd_i2c_scan
PSEUDOMODULES += shell_cmd_lwip_netif
PSEUDOMODULES += shell_cmd_mci
PSEUDOMODULES += shell_cmd_md5sum
PSEUDOMODULES += shell_cmd_nanocoap_vfs
PSEUDOMODULES += shell_cmd_netstats_neighbor
PSEUDOMODULES += shell_cmd_nice
PSEUDOMODULES += shell_cmd_nimble_netif
PSEUDOMODULES += shell_cmd_nimble_statconn
PSEUDOMODULES += shell_cmd_openwsn
PSEUDOMODULES += shell_cmd_pm
PSEUDOMODULES += shell_cmd_ps
PSEUDOMODULES += shell_cmd_random
PSEUDOMODULES += shell_cmd_rtc
PSEUDOMODULES += shell_cmd_rtt
PSEUDOMODULES += shell_cmd_saul_reg
PSEUDOMODULES += shell_cmd_semtech-loramac
PSEUDOMODULES += shell_cmd_sha1sum
PSEUDOMODULES += shell_cmd_sha256sum
PSEUDOMODULES += shell_cmd_sht1x
PSEUDOMODULES += shell_cmd_sntp
PSEUDOMODULES += shell_cmd_suit
PSEUDOMODULES += shell_cmd_sys
PSEUDOMODULES += shell_cmd_vfs
PSEUDOMODULES += shell_cmds_default
PSEUDOMODULES += shell_commands
PSEUDOMODULES += shell_hooks
PSEUDOMODULES += shell_lock_auto_locking
PSEUDOMODULES += slipdev_stdio
Expand Down
4 changes: 2 additions & 2 deletions sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ endif
ifneq (,$(filter skald,$(USEMODULE)))
DIRS += net/ble/skald
endif
ifneq (,$(filter shell_commands,$(USEMODULE)))
DIRS += shell/commands
ifneq (,$(filter shell_cmds,$(USEMODULE)))
DIRS += shell/cmds
endif
ifneq (,$(filter suit%,$(USEMODULE)))
DIRS += suit
Expand Down
Loading