ANDROID: GKI: Enable CONFIG_NULL_TTY by default

Because GKI has various serial drivers built in (8250, pl031, samsung,
sprd, geni) for earlycon, if they succeed probes for full functionality,
(such as if they are specified in DT as UART devices), the kernel would
unconditionally set up the first console device as the default console,
which is not generally desirable for production.

Enable CONFIG_NULL_TTY and enable "console=ttynull" by default. This
causes the kernel to always be silent unless a kernel console device is
explicitly specified on the cmdline. This has no effect on earlycon
"boot console" devices, just normal "console" devices.

Bug: 223797063
Change-Id: Id4cd0615bad79462f39397427380302b1904e42b
Signed-off-by: Alistair Delva <adelva@google.com>
This commit is contained in:
Alistair Delva 2022-03-14 16:20:48 -07:00
parent 7d9eeed3c5
commit 01e249da0a
2 changed files with 4 additions and 2 deletions

View File

@ -61,7 +61,7 @@ CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y CONFIG_SETEND_EMULATION=y
CONFIG_RANDOMIZE_BASE=y CONFIG_RANDOMIZE_BASE=y
# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set # CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off kvm-arm.mode=protected cgroup_disable=pressure" CONFIG_CMDLINE="console=ttynull stack_depot_disable=on cgroup_disable=pressure kasan.stacktrace=off kvm-arm.mode=protected"
# CONFIG_DMI is not set # CONFIG_DMI is not set
CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_PM_WAKELOCKS_LIMIT=0
@ -379,6 +379,7 @@ CONFIG_SERIAL_QCOM_GENI=y
CONFIG_SERIAL_QCOM_GENI_CONSOLE=y CONFIG_SERIAL_QCOM_GENI_CONSOLE=y
CONFIG_SERIAL_SPRD=y CONFIG_SERIAL_SPRD=y
CONFIG_SERIAL_SPRD_CONSOLE=y CONFIG_SERIAL_SPRD_CONSOLE=y
CONFIG_NULL_TTY=y
CONFIG_HVC_DCC=y CONFIG_HVC_DCC=y
CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_BUS=y
CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM=y

View File

@ -59,7 +59,7 @@ CONFIG_NR_CPUS=32
# CONFIG_X86_MCE is not set # CONFIG_X86_MCE is not set
CONFIG_EFI=y CONFIG_EFI=y
CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="stack_depot_disable=on cgroup_disable=pressure" CONFIG_CMDLINE="console=ttynull stack_depot_disable=on cgroup_disable=pressure"
CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_PM_WAKELOCKS_LIMIT=0
# CONFIG_PM_WAKELOCKS_GC is not set # CONFIG_PM_WAKELOCKS_GC is not set
@ -346,6 +346,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=0
CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_SAMSUNG=y CONFIG_SERIAL_SAMSUNG=y
CONFIG_SERIAL_SAMSUNG_CONSOLE=y CONFIG_SERIAL_SAMSUNG_CONSOLE=y
CONFIG_NULL_TTY=y
CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_BUS=y
CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM=y
# CONFIG_DEVMEM is not set # CONFIG_DEVMEM is not set