Yocto grub suppressed console output (quiet)

Question

I’m using the grub-UEFI integration of mender that is based on: GitHub - mendersoftware/grub-mender-grubenv.

I would like to add the grub quiet option so that the grub console output will be suppressed or redirected to a serial port. Is there any hidden option to append the quiet option to the kernel boot options? I could not find anything in the bb files of the mender-meta layer.

The desired result is that the boot is without any log message on the screen.

Board description

  • Intel-x64-x68

Prerequirements

layer.conf


INHERIT += "mender-full"
PREFERRED_VERSION_mender-client = "3.1.0"
MENDER_STORAGE_DEVICE = "/dev/sda"
MENDER_DEVICE_TYPE="x86_64"

MENDER_FEATURES_DISABLE_append = " mender-uboot mender-image-sd mender-growfs-data"


IMAGE_ROOTFS_SIZE="1572864"
MENDER_BOOT_PART_SIZE_MB="2048"
MENDER_STORAGE_TOTAL_SIZE_MB = "6144"
MENDER_DATA_PART_SIZE_MB = "128"



Hi , i don’t know if this can help but maybe you can use the poky’s splash screen recipe
and change the image with a bbappend in your layer, so you will not see any log .
And , if you want a completely black screen , just put a black image :stuck_out_tongue:

I’ve already included that recipe, and it shows an image. Unfortunately, the welcome to GRUB message is way earlier in the boot order, so that splash will not be a solution.

Hi @B-Stefan welcome to community.

I had same requirement some time ago and was hacking grub but there is no way to disable it (at least one I found) other then this patch:

From 9d78a003040c0a56d729f9844b1ce311b04e9287 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Wed, 8 May 2019 16:28:18 +0200
Subject: [PATCH] Disable welcome to grub messages + others

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 grub-core/kern/misc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index d1a54df..bfa5fe4 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -109,6 +109,8 @@ grub_strcpy (char *dest, const char *src)
 int
 grub_printf (const char *fmt, ...)
 {
+  return 0;
+
   va_list ap;
   int ret;

--
2.7.4

This disable all grub messages so you won’t see anything from grub at all. Hope it helps.

Thanks for the input and the hint for the grub solution. I’m working on it and will let you know if it worked .

For the grub env you just can modify the boot args of grub

File structure

Be aware that for all yocto .bbappend files the location is crucial

Screenshot 2022-02-03 at 20.57.41

grub-mender-grubenv_%.bbappend


FILESEXTRAPATHS_prepend_mender-client-install := "${THISDIR}/files:"
SRC_URI_append_mender-client-install = " file://03_qemu_console_grub.cfg;subdir=git"

03_qemu_console_grub.cfg


set console_bootargs="fbcon=map:2 quiet video=LVDS-1:e video=LVDS-2:e video=VGA-1:d video=HDMI-1:d"