u-boot/test
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
..
boot bootstd: Add tests for bootstd including all uclasses 2022-04-25 10:00:04 -04:00
cmd test: dm: pinmux: Get LED2 udevice in the pinmux test 2022-04-28 09:26:44 -04:00
common event: Add events for device probe/remove 2022-03-10 08:28:36 -05:00
dm test: dm: spi: Replace _spi_get_bus_and_cs() by spi_get_bus_and_cs() in some case 2022-05-23 09:33:10 -04:00
env sandbox: add test of CONFIG_ENV_IMPORT_FDT 2021-05-04 12:52:30 -04:00
fs Consistently use nproc for counting the CPUs 2020-01-30 13:30:35 -05:00
image sandbox: test: Tidy up spl_test_load() calls 2022-03-18 19:24:24 -06:00
lib abuf: Correct a corner case with abuf_realloc() 2022-04-06 14:01:42 -04:00
log doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
optee test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
overlay test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
py efi: test/py: authenticate fit capsules 2022-06-04 08:43:55 +02:00
stdint Remove <inttypes.h> includes and PRI* usages in printf() entirely 2018-09-10 20:48:17 -04:00
trace SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bloblist.c bloblist: Add functions to obtain base address and size 2022-01-13 09:13:41 -07:00
bootm.c bootm: Fix Linux silent console on newer kernels 2022-06-06 18:01:21 -04:00
cmd_ut.c bootstd: Add tests for bootstd including all uclasses 2022-04-25 10:00:04 -04:00
command_ut.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
common.sh Consistently use nproc for counting the CPUs 2020-01-30 13:30:35 -05:00
compression.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
Kconfig lib: fix selection of CONFIG_CHARSET 2022-05-03 21:39:22 +02:00
Makefile bootstd: Add tests for bootstd including all uclasses 2022-04-25 10:00:04 -04:00
nokia_rx51_test.sh Nokia RX-51: Add check for /lib/ld-linux.so.2 in test script 2021-07-15 17:56:05 +05:30
print_ut.c lib: Move string tests to the string module 2022-04-25 10:00:03 -04:00
run test: Run sandbox_spl tests on sandbox_noinst 2021-03-26 17:03:09 +13:00
str_ut.c lib: Add a way to find the postiion of a trailing number 2022-04-25 10:00:03 -04:00
test-main.c event: Add a simple test 2022-03-10 08:28:36 -05:00
time_ut.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
unicode_ut.c test: unit test for u16_strlcat() 2022-05-03 21:39:22 +02:00
ut.c test: Add a way to skip console checking until a string matches 2021-09-16 14:39:40 -04:00