[PATCH] bootm: Fix Linux silent console on newer kernels
Tom Rini
trini at konsulko.com
Tue Jun 7 18:47:37 CEST 2022
On Thu, May 19, 2022 at 06:26:05PM -0400, Sean Anderson wrote:
> 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 at seco.com>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220607/d82f4993/attachment.sig>
More information about the U-Boot
mailing list