Re: [PATCH 2/3] arm64: configs: unset CMDLINE_FORCE

From: John Garry
Date: Tue Oct 15 2019 - 04:38:22 EST


On 26/09/2019 20:30, Anders Roxell wrote:
When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig
CONFIG_CMDLINE_FORCE gets enabled. Which forces the user to pass the
full cmdline to CONFIG_CMDLINE="...".

Rework so that we disable CONFIG_CMDLINE_FORCE in the defconfig file so
we don't have to pass in the CONFIG_CMDLINE="..." when building an
allmodconfig kernel. Since CONFIG_CMDLINE_FORCE is unset default, so
when doing 'make savedefconfig' CONFIG_CMDLINE_FORCE will be dropped.

Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 52a32b53b2ed..878f379d8d84 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -854,3 +854,4 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_SCHED_DEBUG is not set
CONFIG_MEMTEST=y
+# CONFIG_CMDLINE_FORCE is not set

This was my initial idea for an alternative Kconfig change:

--->8---

According to the comment for CMDLINE, we should at least have the root device defined. So if CMDLINE is "", then it can not be defined so disallow CMDLINE_FORCE in this scenario.

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 950a56b71ff0..6f3bff2f385e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1580,6 +1580,7 @@ config CMDLINE

config CMDLINE_FORCE
bool "Always use the default kernel command string"
+ depends on CMDLINE != ""
help
Always use the default kernel command string, even if the boot
loader passes other arguments to the kernel.