u-boot/boot
Sean Anderson ba9aa40bb3 bootm: Fix Linux silent console on newer kernels
Linux determines its console based on several sources:

1. the console command line parameter
2. device tree (e.g. /chosen/stdout-path)
3. various other board- and arch-specific sources

If the console parameter specifies a real console (e.g. ttyS0) then that is
used as /dev/console. However, if it does not specify a real console (e.g.
ttyDoesntExist) then *nothing* will be used as /dev/console.
Reading/writing it will return ENODEV. Additionally, no other source will
be used as a console source.

Linux commit ab4af56ae250 ("printk/console: Allow to disable console output
by using console="" or console=null") recently changed the semantics of the
parameter. Previously, specifying console="" would be treated like
specifying some other bad console. This commit changed things so that it
added /dev/ttynull as a console (if available).  However, it also allows
for other console sources. If the device tree specifies a console (such as
if U-Boot and Linux share a device tree), then it will be used in addition
to /dev/ttynull. This can result in a non-silent console.

To avoid this, explicitly set ttynull as the console. This will disable
other console sources. If CONFIG_NULL_TTY is disabled, then this will have
the same behavior as in the past (no output, and writing /dev/console
returns ENODEV).

[1] and [2] have additional background on this kernel change.

[1] https://lore.kernel.org/all/20201006025935.GA597@jagdpanzerIV.localdomain/
[2] https://lore.kernel.org/all/20201111135450.11214-1-pmladek@suse.com/

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-06-06 18:01:21 -04:00
..
android_ab.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
boot_fit.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
bootdev-uclass.c bootstd: Add support for bootflows 2022-04-25 10:00:04 -04:00
bootflow.c bootstd: Add support for bootflows 2022-04-25 10:00:04 -04:00
bootm.c bootm: Fix Linux silent console on newer kernels 2022-06-06 18:01:21 -04:00
bootm_os.c bootm: Tidy up use of autostart env var 2021-11-16 14:35:09 -05:00
bootmeth-uclass.c bootstd: Add the bootmeth uclass and helpers 2022-04-25 10:00:04 -04:00
bootmeth_distro.c bootstd: Add an implementation of distro boot 2022-04-25 10:00:04 -04:00
bootmeth_efi.c bootstd: Add an implementation of EFI boot 2022-04-25 10:00:04 -04:00
bootmeth_efi_mgr.c bootstd: Add an implementation of EFI bootmgr 2022-04-25 10:00:04 -04:00
bootmeth_pxe.c bootstd: Add an implementation of distro PXE boot 2022-04-25 10:00:04 -04:00
bootmeth_sandbox.c bootstd: Add a sandbox bootmeth driver 2022-04-25 10:00:04 -04:00
bootmeth_script.c bootstd: Add an implementation of script boot 2022-04-25 10:00:04 -04:00
bootretry.c Convert CONFIG_BOOT_RETRY_TIME et al to Kconfig 2022-03-18 12:48:17 -04:00
bootstd-uclass.c bootstd: Add a system bootdev for strange boot methods 2022-04-25 10:00:04 -04:00
common_fit.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
fdt_region.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android-dt.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-board.c Convert CONFIG_SYS_BARGSIZE to Kconfig 2022-06-06 12:09:00 -04:00
image-cipher.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-fdt.c image: fdt: Fix DT relocation handling with multiple DRAM banks with gap 2022-04-20 11:14:39 -04:00
image-fit-sig.c tools: Pass the key blob around 2022-01-26 08:50:44 -07:00
image-fit.c image-fit: don't check free() argument 2022-04-19 14:51:11 -04:00
image-host.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-pre-load.c boot: image-pre-load: drop unused CONFIG_SYS_BOOTM_LEN 2022-06-06 17:47:16 -04:00
image-sig.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image.c tools: mkimage: Add Allwinner TOC0 support 2022-04-04 23:24:17 +01:00
Kconfig bootmenu: U-Boot console is enabled as default 2022-05-28 10:59:27 +02:00
Makefile bootstd: Add an implementation of script boot 2022-04-25 10:00:04 -04:00
pxe_utils.c cmd: pxe_utils: sysboot: replace cls command by video_clear in PXE parser 2022-04-11 11:39:19 -04:00
system_bootdev.c bootstd: Add a system bootdev for strange boot methods 2022-04-25 10:00:04 -04:00