Control: severity 969070 important
On 2020-08-27, Andre Heider wrote:
> 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>
In debian's u-boot package, this has been patched out for some targets
(and upstream originally included the patches, but eventually reverted).
The problem stems from an inconsistancy in u-boot, as some platforms use
this argument differently(especially when you get into vendor forks of
u-boot), and I don't believe u-boot has pattern matching to be able to
handle this properly (e.g. behave differently when console=* is set).
> 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; };".
Not all systems have stdout-path defined in the device-tree.
Maybe now those are the exceptions...
> So I'd say appending $console to $bootargs is some historical leftover,
> and it can just be removed from the generic scripts.
The problem is that *not* doing this with console can also result in an
unbootable system.
Reverting this would be breaking one thing to fix another. There's no
"correct" here, only different. :/
Downgraded severity, as this does not affect all systems.
live well,
vagrant
Attachment:
signature.asc
Description: PGP signature