Disable Kernel Console Logs in Verdin iMX8MP Board at Yocto Build OS Image?

Error Analysis and Solutions

I can see two main issues in your Yocto build errors that need to be fixed:

1. Patch File Format Issues

Your patch files have incorrect format. The error shows missing line number at line 5: @@ -XX,X +XX,X @@ because you used placeholder values instead of actual line numbers.

2. Kernel Configuration Issues

The kernel bbappend contains U-Boot configuration commands that don’t belong there, and the file path references are incorrect.

Corrected File Contents

1. Fix U-Boot Patch Files

Create proper patches using the documentation approach (1). First, you need to create real patches by examining the actual U-Boot source:

$ cd ../layers/meta-lokbest/recipes-bsp/u-boot/files/verdin-imx8mp/
$ rm disable-console-logs.patch fast-boot-config.patch

Use the documented approach to create patches (1):

$ bitbake -c devshell u-boot-toradex
$ quilt new disable-console-logs.patch
$ quilt edit include/configs/verdin-imx8mp.h

Based on the Japanese documentation example (2), modify the setup configuration:

# Find the line with "tdxargs=" and modify it to include your parameters
# Change from:
"tdxargs=\0" \
# To:
"tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\0" \

Then create the patch:

$ quilt refresh
$ mv ./patches/disable-console-logs.patch /path/to/your/layer/recipes-bsp/u-boot/files/verdin-imx8mp/
$ exit

2. Corrected U-Boot bbappend File

recipes-bsp/u-boot/u-boot-toradex_%.bbappend (1):

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "\
    file://disable-console-logs.patch \
"

# Alternative approach using do_configure as shown in documentation
do_configure:append() {
    # Modify U-Boot environment variables for console disable and fast boot
    sed -i 's/"tdxargs=\\0"/"tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\\0"/' ${S}/include/configs/verdin-imx8mp.h
    # Set boot delay to 0 for fast boot
    sed -i 's/#define CONFIG_BOOTDELAY.*1/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
}

3. Corrected Kernel bbappend File

recipes-kernel/linux/linux-toradex_%.bbappend (1):

FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# Prevent the use of in-tree defconfig
unset KBUILD_DEFCONFIG

SRC_URI += "\
    file://fast-boot.cfg \
    file://verdin-imx8mp-qmi.cfg \
    file://ppp.cfg \
"

# Tell the kernel recipe these config fragments should be applied
KERNEL_CONFIG_FRAGMENTS += "fast-boot.cfg verdin-imx8mp-qmi.cfg ppp.cfg"

Remove the U-Boot commands from kernel bbappend - the sed commands for U-Boot configuration don’t belong in the kernel recipe (1).

4. Kernel Configuration Fragment

recipes-kernel/linux/linux-toradex/fast-boot.cfg:

# Fast boot kernel optimizations
CONFIG_PRINTK=n
CONFIG_EARLY_PRINTK=n
CONFIG_LOGO=n
CONFIG_UBI_SILENCE_MSG=y

5. Build Commands

Clean and rebuild after fixing the files (1):

$ bitbake -c cleansstate u-boot-toradex
$ bitbake -c cleansstate linux-toradex
$ bitbake tdx-reference-multimedia-image

Key Issues Fixed

  1. Patch Format: Created proper patches with real line numbers instead of placeholders
  2. File Separation: Moved U-Boot configuration out of kernel bbappend
  3. Path References: Fixed FILESEXTRAPATHS to point to correct directories
  4. Configuration Method: Used the documented do_configure:append() approach (1)

The main problem was mixing U-Boot and kernel configurations in the wrong files, and using placeholder patch formats instead of real patches generated from actual source code.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.