Build with no console whatsoever is not a common configuration for development, but is used in some verified boot scenarios. Some configurations go even further and disable the shell altogether. Add headless.config and noshell.config fragments that describes these configurations and sandbox targets that makes use of them.
This will be automatically found by CI and built to ensure that we don't inadvertently break CONFIG_CONSOLE_NONE and CONFIG_SHELL_NONE without noticing. Platforms with CONFIG_CONSOLE_NONE are also likely to disable the DEFAULT_ENVIRONMENT, so this is added to headless_defconfig as well. More options can be added to the configs as needed to increase CI's build coverage. Cc: Steffen Hemer <s.he...@phytec.de> Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de> --- arch/sandbox/Makefile | 8 ++++++++ common/boards/configs/headless.config | 3 +++ common/boards/configs/noshell.config | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 common/boards/configs/headless.config create mode 100644 common/boards/configs/noshell.config diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index c2906c0b1c0c..d5327d44e097 100644 --- a/arch/sandbox/Makefile +++ b/arch/sandbox/Makefile @@ -2,6 +2,14 @@ KBUILD_DEFCONFIG := sandbox_defconfig +generated_configs += headless_defconfig noshell_defconfig lockdown_defconfig +headless_defconfig: + $(call merge_into_defconfig,sandbox_defconfig,headless) +noshell_defconfig: + $(call merge_into_defconfig,sandbox_defconfig,noshell) +lockdown_defconfig: + $(call merge_into_defconfig,sandbox_defconfig,headless noshell) + KBUILD_CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden diff --git a/common/boards/configs/headless.config b/common/boards/configs/headless.config new file mode 100644 index 000000000000..f1eb1e6fa717 --- /dev/null +++ b/common/boards/configs/headless.config @@ -0,0 +1,3 @@ +CONFIG_CONSOLE_NONE=y +# CONFIG_ENV_HANDLING is not set +CONFIG_DEFAULT_ENVIRONMENT=y diff --git a/common/boards/configs/noshell.config b/common/boards/configs/noshell.config new file mode 100644 index 000000000000..4696a1b3f971 --- /dev/null +++ b/common/boards/configs/noshell.config @@ -0,0 +1,2 @@ +CONFIG_SHELL_NONE=y +# CONFIG_DISABLE_INPUT is not set -- 2.39.2