Disable console output but show kernel boot logo

Viewed 308

I'm currently working with AOSP Android 10 with Linux kernel v5.4.70 on a custom device and I'm trying to reduce the boot time of the device. Disabling the kernel console output with "quiet" command line argument reduces the boot time by almost 4 seconds but there is a side effect where it also hides my custom kernel boot logo so the screen is initially blank for 15 seconds until the Android boot animation starts. This option is really nice because I can still read the kernel output using dmesg after the boot but I need to show the logo. Obviously disabling printk() in kernel config would work but I want to keep the output after boot + kernel logo.

Things I've tried so far:

  • Using "loglevel=3" command line argument - also hides boot logo
  • Setting loglevel to 3 in android init.rc script on early-init stage - doesn't give such a big time save and messages are still printed for the first ~6 seconds
  • Using "quiet splash" command line arguments - splash seems to do nothing
  • Setting console and androidboot.console to ttynull - works but then I don't get any output from kernel at all
  • Using "quiet" and directly modifying fbcon.c file in drivers/video/fbdev/core and removed the following check - seems like "quiet" doesn't do anything in this case, boot logo is displayed and console shows output messages from the kernel
if (logo_shown < 0 && console_loglevel <= CONSOLE_LOGLEVEL_QUIET)
    logo_shown = FBCON_LOGO_DONTSHOW;

Is there any way I can achieve the desired result or is console logging directly tied to boot logo and there is no way to avoid it?

0 Answers
Related