[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#969070: $console handling might result in unbootable system



Source: flash-kernel
Severity: critical

Since [0] flash-kernel does:

  if test -n "${console}"; then
    setenv bootargs "${bootargs} console=${console}"
  fi

The common $console format as set by u-boot includes the leading "console=":
include/configs/arndale.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" include/configs/espresso7420.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/mvebu_armada-37xx.h:#define CONFIG_DEFAULT_CONSOLE "console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000" include/configs/mvebu_armada-37xx.h: "console=" CONFIG_DEFAULT_CONSOLE "\0" \ include/configs/odroid.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
include/configs/odroid.h:   "console=" CONFIG_DEFAULT_CONSOLE \
include/configs/odroid_xu3.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
include/configs/odroid_xu3.h:   "console=" CONFIG_DEFAULT_CONSOLE \
include/configs/origen.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/peach-pi.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/peach-pit.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/s5p_goni.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
include/configs/s5p_goni.h: "console=" CONFIG_DEFAULT_CONSOLE \
include/configs/s5pc210_universal.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
include/configs/s5pc210_universal.h:    "console=" CONFIG_DEFAULT_CONSOLE \
include/configs/smdk5250.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/smdk5420.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/smdk5420.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/smdkv310.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" include/configs/snow.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/spring.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" include/configs/trats.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
include/configs/trats.h:    "console=" CONFIG_DEFAULT_CONSOLE \
include/configs/trats2.h:#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
include/configs/trats2.h:   "console=" CONFIG_DEFAULT_CONSOLE \

So on some boards we end up with bootargs containing "console=console=...", which, combined with a systemd bug [1] (present in buster), makes the system unbootable:
[    4.632197] systemd-udevd[90]: Starting version 241
[    4.639324] systemd-udevd[91]: Failed to create udev control event
source: Operation not permitted
<full hang here>

Doing a "env delete console" and the system boots up properly. That includes the kernel output over serial, since the kernel dts files have contain "chosen { stdout-path = &uart0; };".

So I'd say appending $console to $bootargs is some historical leftover, and it can just be removed from the generic scripts.

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783074
[1] https://github.com/systemd/systemd/issues/13332


Reply to: