Update device tree overlay dtb file with yocto build recipe image

Hi,

I’m build the yoct os image with the default device tree at build image os is booted in the device first then manually I change the device tree with commands for that need to be update these changes in the yocto build layer recipes directly boot to the required device tree at boot?

device info:

root@verdin-imx8mp-15722244:~# tdx-info
Software summary
Bootloader:               U-Boot
Kernel version:           6.6.101-7.5.0-devel #1 SMP PREEMPT Mon Oct 27 12:24:20 UTC 2025
Kernel command line:      root=PARTUUID=ddb88a1f-02 ro rootwait console=tty1 console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0
Distro name:              NAME="TDX Wayland with XWayland"
Distro version:           VERSION_ID=7.5.0-devel-20260122114211-build.0
Distro variant:           -
Hostname:                 verdin-imx8mp-15722244
Hardware info
HW model:                 Toradex Verdin iMX8M Plus WB on Ivy
Toradex version:          0070 V1.1A
Serial number:            15722244
Processor arch:           aarch64
root@verdin-imx8mp-15722244:~#

device tree overlay setup manual command:

> strings /proc/device-tree/model
> fw_setenv fdtfile imx8mp-verdin-wifi-ivy.dtb
> fw_printenv fdtfile
root@verdin-imx8mp-15722244:~# strings /proc/device-tree/model
Toradex Verdin iMX8M Plus WB on Ivy
root@verdin-imx8mp-15722244:~# fw_printenv fdtfile
fdtfile=imx8mp-verdin-wifi-ivy.dtb
root@verdin-imx8mp-15722244:~#reboot now

Here after the reboot the changes are applied and the device tree dtb is configured, this to be done in the yocto build itself instead manuall command os boot with required device tree at first itself.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


To configure your Yocto build to use the correct device tree (imx8mp-verdin-wifi-ivy.dtb) from the start, you need to customize the U-Boot environment variables in your Yocto build(1).

Solution: Modify U-Boot Environment in Yocto

You can set the fdtfile variable permanently in your Yocto build by creating a custom meta layer and modifying the U-Boot configuration(2).

Step 1: Create Custom Meta Layer

Create a custom meta layer if you don’t already have one(2):

# Run `. export` or `source setup-environment` when building Torizon OS  

$ . export # will take you to the `build` directory  
$ bitbake-layers create-layer ../layers/meta-customer # inside the build directory  

(2)

Step 2: Add Layer to Build Configuration

Add your custom layer to conf/bblayers.conf(2):

BBLAYERS ?= " \  
  ${TOPDIR}/../layers/meta-toradex-nxp \  
  ${TOPDIR}/../layers/meta-freescale \  
  ${TOPDIR}/../layers/meta-freescale-3rdparty \  
  ${TOPDIR}/../layers/meta-toradex-bsp-common \  
  ${TOPDIR}/../layers/meta-openembedded/meta-oe \  
  ${TOPDIR}/../layers/meta-openembedded/meta-filesystems \  
  ${TOPDIR}/../layers/meta-openembedded/meta-gnome \  
  ${TOPDIR}/../layers/meta-openembedded/meta-xfce \  
  ${TOPDIR}/../layers/meta-openembedded/meta-networking \  
  ${TOPDIR}/../layers/meta-openembedded/meta-multimedia \  
  ${TOPDIR}/../layers/meta-openembedded/meta-python \  
  ${TOPDIR}/../layers/meta-freescale-distro \  
  ${TOPDIR}/../layers/meta-toradex-demos \  
  ${TOPDIR}/../layers/meta-qt5 \  
  ${TOPDIR}/../layers/meta-toradex-distro \  
 ${TOPDIR}/../layers/meta-yocto/meta-poky \  
  ${TOPDIR}/../layers/openembedded-core/meta \  
  ${TOPDIR}/../layers/meta-customer \  
"  

(2)

Step 3: Create U-Boot Environment Configuration

In your custom meta layer, create a U-Boot configuration file to set the fdtfile variable(1). The fdtfile variable specifies the device tree binary (DTB) file used during boot(1).

Create the directory structure and configuration file in your meta layer to override the default U-Boot environment and set fdtfile=imx8mp-verdin-wifi-ivy.dtb(1).

Step 4: Initialize Git Project

Initialize your custom layer as a git project (mandatory for Torizon OS)(2):

$ git init  
$ git commit -m "Initial Commit" -m "Add <meta-mylayer> from template"  

(2)

Step 5: Build Your Image

After configuring your custom layer with the U-Boot environment changes, rebuild your image(2):

$ bitbake <your-image>  

(2)

Alternative: Modify Local Configuration

You can also modify the U-Boot environment variables directly in your build/conf/local.conf file by adding U-Boot configuration parameters that set the default fdtfile value(1).

This approach ensures that your device boots with the correct device tree (imx8mp-verdin-wifi-ivy.dtb) from the first boot without requiring manual U-Boot commands(1).

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.

Hi @ToradexAI,

I need the exact recipe configuration for the device tree layout setup in the yocto build,

for the step 3 Create U-Boot Environment Configuration,

I have already the custom layer and recipes where to add this file config to update the changes directly form the yocto build image OS for the default device tree to my fw_setenv fdtfile imx8mp-verdin-wifi-ivy.dtb

My Custom layer recipes:

hari@Administrator:~/oe-core/layers/meta-lokbest$ ls
conf  recipes-bsp  recipes-core  recipes-graphics  recipes-images  recipes-kernel  recipes-lokbest  recipes-test-suite  wic
hari@Administrator:~/oe-core/layers/meta-lokbest$

Here were add the config and update the recipes bbappend file to reflect in the Image OS boot.

To set the fdtfile environment variable in your Yocto build for the Verdin iMX8M Plus, you need to create a U-Boot bbappend file in your custom layer(1).

Create U-Boot Recipe Configuration

In your meta-lokbest layer, create the U-Boot bbappend file:

mkdir -p recipes-bsp/u-boot
touch recipes-bsp/u-boot/u-boot-toradex_%.bbappend

(1)

U-Boot BBappend Content

Create the following content in recipes-bsp/u-boot/u-boot-toradex_%.bbappend:

do_configure:append() {
    # Remove exisiting fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile, "imx8mp-verdin-wifi-ivy.dtb" should be replaced with your device tree binary file
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(1)

This bbappend will modify the U-Boot configuration header file to set the default fdtfile variable to imx8mp-verdin-wifi-ivy.dtb(1).

How It Works

The U-Boot environment variable fdtfile specifies the device tree binary (DTB) file used during boot(2). By modifying the U-Boot configuration at build time, you ensure the correct device tree is loaded automatically without requiring manual U-Boot commands(2).

Directory Structure

Your final directory structure should look like:

meta-lokbest/
├── conf/
├── recipes-bsp/
│   └── u-boot/
│       └── u-boot-toradex_%.bbappend
├── recipes-core/
├── recipes-graphics/
├── recipes-images/
├── recipes-kernel/
├── recipes-lokbest/
├── recipes-test-suite/
└── wic/

After adding this bbappend file, rebuild your image and the device will boot with imx8mp-verdin-wifi-ivy.dtb as the default device tree(1).

**


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.

Hi @ToradexAI,

Final Check for the changes applied in the recipes-bsp u-boot bbappend file,

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp/u-boot$ cat u-boot-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

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

do_configure:append() {
    # Add tdxargs if it doesn't exist
    if ! grep -q "tdxargs=" ${S}/include/configs/verdin-imx8mp.h; then
        # Find the environment settings section and add tdxargs
        sed -i '/CONFIG_EXTRA_ENV_SETTINGS/a\\t"tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0\\0" \\' ${S}/include/configs/verdin-imx8mp.h
    fi

    # Set boot delay to 0 for fast boot - find and replace any CONFIG_BOOTDELAY definition
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        # Add CONFIG_BOOTDELAY if it doesn't exist
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi
}

do_configure:append() {
    # Remove exisiting fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile, "imx8mp-verdin-wifi-ivy.dtb" should be replaced with your device tree binary file
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

I need to clarify which specific OS and version you’re using to provide the most accurate guidance. Could you please run tdx-info and share the output so I can confirm your platform details? You can find more information about this command at Getting Device Information with Tdx-Info | Toradex Developer Center.

However, based on your current setup, I can review your bbappend configuration:

Review of Your U-Boot Configuration

Your bbappend file looks mostly correct, but there are a few considerations:

:white_check_mark: Correct Elements:

  • The fdtfile setting follows the documented approach(1)
  • You’re targeting the correct configuration file for Verdin iMX8M Plus
  • The sed commands match the documented pattern(1)

:warning: Potential Issues:

  1. Duplicate do_configure:append() blocks: You have two separate do_configure:append() functions. These should be combined into one block(1).

  2. File structure: The configuration should target the correct header file for your specific module(1).

Recommended Structure:

do_configure:append() {
    # Add tdxargs if it doesn't exist
    if ! grep -q "tdxargs=" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i '/CONFIG_EXTRA_ENV_SETTINGS/a\\t"tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0\\0" \\' ${S}/include/configs/verdin-imx8mp.h
    fi

    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(1)

This follows the documented approach for customizing U-Boot configuration in Yocto(1).

**


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.

Hi @ToradexAI,

Device Info

root@verdin-imx8mp-15722244:~# tdx-info

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.6.101-7.5.0-devel #1 SMP PREEMPT Mon Oct 27 12:24:20 UTC 2025
Kernel command line:      root=PARTUUID=ddb88a1f-02 ro rootwait console=tty1 console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0
Distro name:              NAME="TDX Wayland with XWayland"
Distro version:           VERSION_ID=7.5.0-devel-20260122114211-build.0
Distro variant:           -
Hostname:                 verdin-imx8mp-15722244
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Ivy
Toradex version:          0070 V1.1A
Serial number:            15722244
Processor arch:           aarch64
------------------------------------------------------------
root@verdin-imx8mp-15722244:~#

Based on your device information showing you’re running BSP 7.5.0-devel on a Verdin iMX8M Plus WB on Ivy carrier board, your U-Boot bbappend configuration looks correct for setting the device tree to imx8mp-verdin-wifi-ivy.dtb(1).

Configuration Review

Your current setup is appropriate for your hardware platform. However, you should consolidate the two do_configure:append() blocks into one for better maintainability(1):

Recommended Final Configuration:

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

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

do_configure:append() {
    # Add tdxargs if it doesn't exist
    if ! grep -q "tdxargs=" ${S}/include/configs/verdin-imx8mp.h; then
        # Find the environment settings section and add tdxargs
        sed -i '/CONFIG_EXTRA_ENV_SETTINGS/a\\t"tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0\\0" \\' ${S}/include/configs/verdin-imx8mp.h
    fi

    # Set boot delay to 0 for fast boot - find and replace any CONFIG_BOOTDELAY definition
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        # Add CONFIG_BOOTDELAY if it doesn't exist
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(1)

How This Works

The fdtfile environment variable specifies the device tree binary (DTB) file used during boot(2). Your configuration will set this to imx8mp-verdin-wifi-ivy.dtb which matches your Verdin iMX8M Plus WB on Ivy carrier board setup(2).

Next Steps

  1. Save the consolidated bbappend file
  2. Rebuild your image with bitbake <your-image-name>(1)
  3. Deploy the new image - it should boot with the correct device tree automatically

This approach eliminates the need for manual fw_setenv commands as the device tree will be configured at build time(2).

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.

Hi @ToradexAI,

I need to disable the hdmi port console input was displayed in my screen while turning on and off the device. I need to disable the hdmi port input console log at the screen to disable it. where I need to update the settings in the yocto build recipe or some where else need the clarification.
It was blank my logo at boot so I need to disable it.

To disable the HDMI console output and prevent console messages from interfering with your boot logo, you need to modify the kernel command line parameters in your Yocto build(1).

Solution: Modify Kernel Command Line Parameters

Based on your current U-Boot configuration, you already have some console suppression settings. To completely disable HDMI console output, you need to modify the kernel command line parameters(1).

Update Your U-Boot Configuration

In your existing recipes-bsp/u-boot/u-boot-toradex_%.bbappend file, modify the tdxargs section to remove the HDMI console and add additional suppression parameters(1):

do_configure:append() {
    # Add tdxargs with console suppression - remove console=tty1 to disable HDMI output
    if ! grep -q "tdxargs=" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i '/CONFIG_EXTRA_ENV_SETTINGS/a\\t"tdxargs=console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 plymouth.ignore-serial-consoles\\0" \\' ${S}/include/configs/verdin-imx8mp.h
    fi

    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(1)

Key Changes Explained

The important modification is removing console=tty1 from your kernel command line parameters(1). Here’s what each parameter does:

  • Removed console=tty1: This prevents console output to the HDMI display
  • Keep console=ttymxc2,115200: This maintains UART console for debugging
  • quiet: Suppresses most kernel messages
  • loglevel=0: Sets minimum log level
  • vt.global_cursor_default=0: Disables cursor
  • vt.default_redraw=0: Prevents screen redraw
  • plymouth.ignore-serial-consoles: Additional console suppression

Alternative: Kernel Configuration Method

You can also modify kernel configuration parameters by creating a custom kernel configuration in your meta layer(1). This approach involves creating a custom defconfig file that disables console output to framebuffer devices(1).

After making these changes, rebuild your image and the HDMI display should remain blank during boot, allowing your boot logo to display without console interference(1).

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.

Hi @ToradexAI,

I have the two input hdmi ports in my custom carrier board, so need to disable for the all available hdmi ports, here I have the uboot bbappend file and also the patch files where all the changes need to be done for this hdmi input console in the display.

recipes-bsp Custom Layer:

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ tree .
.
└── u-boot
    ├── files
    │   └── verdin-imx8mp
    │       ├── disable-console-logs.patch
    │       └── fast-boot-config.patch
    └── u-boot-toradex_%.bbappend

3 directories, 3 files
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/files/verdin-imx8mp/disable-console-logs.patch
Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/files/verdin-imx8mp/fast-boot-config.patch
diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h
index 1234567..abcdefg 100644
--- a/include/configs/verdin-imx8mp.h
+++ b/include/configs/verdin-imx8mp.h
@@ -XX,X +XX,X @@
-#define CONFIG_BOOTDELAY        1
+#define CONFIG_BOOTDELAY        0
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/u-boot-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

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

do_configure:append() {
    # Add tdxargs if it doesn't exist
    if ! grep -q "tdxargs=" ${S}/include/configs/verdin-imx8mp.h; then
        # Find the environment settings section and add tdxargs
        sed -i '/CONFIG_EXTRA_ENV_SETTINGS/a\\t"tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0\\0" \\' ${S}/include/configs/verdin-imx8mp.h
    fi

    # Set boot delay to 0 for fast boot - find and replace any CONFIG_BOOTDELAY definition
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        # Add CONFIG_BOOTDELAY if it doesn't exist
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$

recipes-kernel Custom Layer:

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ tree .
.
└── linux
    ├── files
    │   ├── ppp.cfg
    │   └── verdin-imx8mp-qmi.cfg
    ├── linux-toradex
    │   └── fast-boot.cfg
    └── linux-toradex_%.bbappend

3 directories, 4 files
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex/fast-boot.cfg
# Enable framebuffer console for splash
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk but keep framebuffer
CONFIG_PRINTK=n
CONFIG_EARLY_PRINTK=n
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

unset KBUILD_DEFCONFIG

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

KERNEL_CONFIG_FRAGMENTS += "fast-boot.cfg verdin-imx8mp-qmi.cfg ppp.cfg"

# TDXargs for Kernel Console logs disable params
APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 console=tty0 init=/init"

RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "splash-screen"
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$

Where all the exact changes need to be done for the disable hdmi input console in me display.

To disable HDMI console output for all available HDMI ports on your custom carrier board, you need to modify both your U-Boot and kernel configurations(1)(2). Here’s where to make the exact changes:

Fix Your U-Boot Configuration

Your current U-Boot bbappend has redundant configurations. Update your u-boot-toradex_%.bbappend file:

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

SRC_URI += "\
    file://verdin-imx8mp/disable-console-logs.patch \
    file://verdin-imx8mp/fast-boot-config.patch \
"

do_configure:append() {
    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

Update Your Disable Console Logs Patch

Modify your disable-console-logs.patch to remove console=tty1 completely(1):

Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

Fix Your Kernel Configuration

Update your linux-toradex_%.bbappend to remove conflicting console parameters(1):

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

unset KBUILD_DEFCONFIG

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

KERNEL_CONFIG_FRAGMENTS += "fast-boot.cfg verdin-imx8mp-qmi.cfg ppp.cfg"

# Remove console=tty0 to disable all framebuffer console output
APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0"

RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "splash-screen"

Update Your Kernel Config Fragment

Modify your fast-boot.cfg to disable framebuffer console(1):

# Disable framebuffer console to prevent HDMI output
# CONFIG_FRAMEBUFFER_CONSOLE is not set
CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk completely
CONFIG_PRINTK=n
CONFIG_EARLY_PRINTK=n

Key Changes Explained

The critical changes to disable HDMI console output(1):

  1. Remove console=tty1 from kernel command line - this prevents console output to framebuffer devices
  2. Keep only console=ttymxc2,115200 for UART debugging
  3. Disable CONFIG_FRAMEBUFFER_CONSOLE in kernel config - this prevents any framebuffer console initialization
  4. Add consoleblank=0 to prevent screen blanking(1)

These changes will ensure that no console messages appear on any HDMI outputs while preserving your boot logo display(1).

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.

Hi @ToradexAI,

After this changes applied in the bsp and kernel recipes also nothing changed or updated in display it is still appearing at start hdmi input console log,

Updated Recipes BSP:

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/files/verdin-imx8mp/disable-console-logs.patch
Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/u-boot-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

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

do_configure:append() {
    # Add tdxargs if it doesn't exist
    if ! grep -q "tdxargs=" ${S}/include/configs/verdin-imx8mp.h; then
        # Find the environment settings section and add tdxargs
        sed -i '/CONFIG_EXTRA_ENV_SETTINGS/a\\t"tdxargs=console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 plymouth.ignore-serial-consoles\\0" \\' ${S}/include/configs/verdin-imx8mp.h
    fi

    # Set boot delay to 0 for fast boot - find and replace any CONFIG_BOOTDELAY definition
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        # Add CONFIG_BOOTDELAY if it doesn't exist
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$

Updated Recipes Kernel:

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex/fast-boot.cfg
# Enable framebuffer console for splash
# CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk but keep framebuffer
CONFIG_PRINTK=n
CONFIG_EARLY_PRINTK=n
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

unset KBUILD_DEFCONFIG

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

KERNEL_CONFIG_FRAGMENTS += "fast-boot.cfg verdin-imx8mp-qmi.cfg ppp.cfg"

# TDXargs for Kernel Console logs disable params
APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0 init=/init"
# APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 console=tty0 init=/init"

RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "splash-screen"
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$

If any changes need to do in the weston configuration for disable it, is required,

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-graphics/weston$ ls
files  weston_%.bbappend
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-graphics/weston$ cat files/weston.ini
[core]
use-g2d=true
repaint-window=16
idle-time=0
xwayland=true
background-color=0x00000000

[shell]
panel-position=none
background-color=0x00000000
background-image=
locking=false
animation=none

[libinput]
enable_tap=true
touchscreen_calibrator=true
calibration_helper=/usr/bin/toradex-save-touchscreen-calibration

[screen-share]
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-graphics/weston$

The console output is still appearing because you need to disable the framebuffer console more completely. Here are the specific changes needed:

Fix the Kernel Configuration

You need to properly disable the framebuffer console. Update your fast-boot.cfg to completely remove framebuffer console support(1):

# Disable framebuffer console completely to prevent HDMI console output
# CONFIG_FRAMEBUFFER_CONSOLE is not set

CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk completely
# CONFIG_PRINTK is not set
# CONFIG_EARLY_PRINTK is not set

(1)

Remove Console from Kernel Command Line

The critical issue is that you still have console output enabled. Based on the Toradex documentation, you need to use specific kernel arguments(1). Update your U-Boot patch to use console=null(1):

Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=console=null quiet loglevel=0 vt.global_cursor_default=0 consoleblank=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

(1)

Alternative: Remove Framebuffer Console from Kernel

According to the Toradex documentation, you can completely remove framebuffer console support from the kernel by removing the kernel configuration “CONFIG_FRAMEBUFFER_CONSOLE”(1). Add this to your fast-boot.cfg:

# CONFIG_FRAMEBUFFER_CONSOLE is not set

(1)

Fix Your U-Boot BBappend

Remove the duplicate tdxargs configuration from your bbappend file since you’re setting it in the patch:

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

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

do_configure:append() {
    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(2)

Key Changes Summary

The documentation indicates several kernel arguments that may help disable the console(1):

  • vt.global_cursor_default=0(1)
  • consoleblank=0(1)
  • console=null(1)
  • earlycon(1)

Your Weston configuration looks correct and shouldn’t need changes for this issue.

After making these changes, rebuild your image completely to ensure all modifications take effect.

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.

Hi @ToradexAI, @jeremias.tx, @abinash.tx

After the changes done in the recipes-bsp and recipes-kernel layer based on the discussion output from the previous post. The build I have checked in the display changes are affected for the applied configs. Still it shows the hdmi input console log at the start, restart and shut off time in the display screen.

recipes-bsp in Custom Layer

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ tree .
.
└── u-boot
    ├── files
    │   └── verdin-imx8mp
    │       ├── disable-console-logs.patch
    │       └── fast-boot-config.patch
    ├── u-boot-toradex_%.bbappend

3 directories, 6 files
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/files/verdin-imx8mp/disable-console-logs.patch
Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=console=null quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$ cat u-boot/u-boot-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

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

do_configure:append() {
    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$

recipes-kernel in Custom Layer:

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ tree .
.
└── linux
    ├── files
    │   ├── ppp.cfg
    │   └── verdin-imx8mp-qmi.cfg
    ├── linux-toradex
    │   ├── fast-boot.cfg
    └── linux-toradex_%.bbappend

3 directories, 5 files
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex/fast-boot.cfg
# Disable framebuffer console completely to prevent HDMI console output
# CONFIG_FRAMEBUFFER_CONSOLE is not set

CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk completely
# CONFIG_PRINTK is not set
# CONFIG_EARLY_PRINTK is not set
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

unset KBUILD_DEFCONFIG

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

KERNEL_CONFIG_FRAGMENTS += "fast-boot.cfg verdin-imx8mp-qmi.cfg ppp.cfg"

# TDXargs for Kernel Console logs disable params
APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0 init=/init"
# APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 console=tty0 init=/init"

RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "splash-screen"
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$

Based on your suggestion there is nothing changes is applied after the configs are done in the required files. what is the exact configs should be applied for the hdmi input console log display in my device screen. any suggestions or anybody from team has solved this please let me know to resolve this issue.

To completely disable console messages on the HDMI display, you need to ensure the kernel configuration is properly set. Based on the Toradex documentation, there are specific kernel arguments that help disable the console(1).

Complete Solution for Disabling HDMI Console

1. Remove Framebuffer Console Support Completely

According to the documentation, to get rid of console messages and any system output, the framebuffer console support can be removed from the kernel entirely by removing the kernel configuration “CONFIG_FRAMEBUFFER_CONSOLE”(1).

Update your fast-boot.cfg:

# Remove framebuffer console support completely
# CONFIG_FRAMEBUFFER_CONSOLE is not set

# Disable virtual terminal support entirely
# CONFIG_VT is not set
# CONFIG_VT_CONSOLE is not set

CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk completely
# CONFIG_PRINTK is not set
# CONFIG_EARLY_PRINTK is not set

2. Disable Console Using U-Boot Environment

The documentation states that to disable console messages on the screen, remove the “console=tty1” kernel command line parameter from the setup environment variable in U-Boot(1). Update your patch:

Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=console=${console},${baudrate}n8 ${memargs} consoleblank=0 vt.global_cursor_default=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

3. Additional Kernel Arguments

The documentation mentions several kernel arguments that may help disable the console(1):

  • vt.global_cursor_default=0(1)
  • consoleblank=0(1)
  • console=null or console=${console}(1)
  • earlycon(1)

4. Alternative: Use Invalid Console

According to the documentation, if you also remove the console= entry for the serial console Linux will fallback to the framebuffer console again. Use an invalid console (e.g. console=null) or remove framebuffer console support from the kernel to work around this(1).

5. Disable Getty Service

The documentation also mentions that systemd still initializes a getty on tty1. This can be easily disabled using(1):

# systemctl disable getty@tty1.service  

Add this to your image recipe or create a systemd bbappend to disable this service automatically.

6. Complete U-Boot Configuration

Update your U-Boot bbappend to use the documented approach:

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

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

do_configure:append() {
    # Disable framebuffer console completely by removing console=tty1
    sed -i 's/console=tty1 //g' ${S}/include/configs/verdin-imx8mp.h
    
    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

The key is completely removing virtual terminal and framebuffer console support from the kernel configuration, which should prevent any console output on HDMI displays(1).

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.

Hi @ToradexAI,

currently the cat /proc/cmdline contains these kernel variable,

root@verdin-imx8mp-15722251:~# cat /proc/cmdline
root=PARTUUID=089d8f44-02 ro rootwait console=tty1 console=ttymxc2,115200 console=null quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0
root@verdin-imx8mp-15722251:~#

But I need the only configs of those kernel cmds in my device at boot,

root=PARTUUID=089d8f44-02 ro rootwait console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0

Based on this changes need the correct patch files, bbappend and config files for the recipes-bsp and recipes-kernel in my custom layer.

To remove console=tty1 and console=null from your kernel command line and keep only the desired parameters, you need to modify your U-Boot configuration to set the exact tdxargs you want(1).

Solution: Update U-Boot Configuration

1. Update Your U-Boot Patch File

Modify your disable-console-logs.patch to set only the desired kernel parameters(1):

Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,7 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

2. Update Your U-Boot BBappend File

The tdxargs environment variable is used for custom kernel parameters(1). Update your u-boot-toradex_%.bbappend:

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

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

do_configure:append() {
    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(2)

3. Remove Conflicting Kernel Parameters

Update your linux-toradex_%.bbappend to remove any conflicting APPENDARGS:

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

unset KBUILD_DEFCONFIG

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

KERNEL_CONFIG_FRAGMENTS += "fast-boot.cfg verdin-imx8mp-qmi.cfg ppp.cfg"

# Remove APPENDARGS that conflict with tdxargs
# APPENDARGS += " quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0 init=/init"

RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "splash-screen"

(2)

4. Keep Your Kernel Configuration

Your fast-boot.cfg should remain as is to disable framebuffer console(3):

# Disable framebuffer console completely to prevent HDMI console output
# CONFIG_FRAMEBUFFER_CONSOLE is not set

CONFIG_FB=y
CONFIG_FB_SIMPLE=y

# Enable logo support - for splash display
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

# Disable printk completely
# CONFIG_PRINTK is not set
# CONFIG_EARLY_PRINTK is not set

(3)

How This Works

All custom kernel parameters must be set using the tdxargs environment variable(1). By default, tdxargs is empty and reserved for user-defined parameters(1). On startup, U-Boot runs a boot script that assembles the final kernel command line bootargs as follows(1):

env set bootcmd_args 'run rootfsargs_set && env set bootargs ${rootfsargs} ${setupargs} ${appendargs} ${tdxargs}'

(1)

This configuration will give you exactly the kernel command line you want: root=PARTUUID=089d8f44-02 ro rootwait console=ttymxc2,115200 quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0.

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.

Hi @ToradexAI,

verify and correct the layer to affect the boot cmd at the boot time.

hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp/u-boot$ tree .
.
├── files
│   └── verdin-imx8mp
│       ├── boot.cmd
│       ├── disable-console-logs.patch
│       ├── disable-console-logs.patch.bkp
│       ├── fast-boot-config.patch
│       └── verdin-imx8mp.h
├── u-boot-script-boundary_%.bbappend
├── u-boot-toradex_%.bbappend
├── u-boot-toradex_%.bbappend.bkp
└── u-boot-toradex_%.bbappend.bkp_2

2 directories, 9 files
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp/u-boot$ cat u-boot-script-boundary_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "file://verdin-imx8mp/boot.cmd"
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp/u-boot$ cat files/verdin-imx8mp/boot.cmd
# SPDX-License-Identifier: GPL-2.0+ OR MIT
# Toradex boot script (customized)

# --- console handling FIX ---
# REMOVE HDMI console (tty1)
# Keep UART console only

setexpr _res sub "," "_" ${console}
if test "${_res}" = "" -o "${_res}" = "${console}"; then
    env set console "${console},${baudrate}"
fi

env set appendargs
env set setupargs console=${console}

# --- rest is unchanged ---
env set bootcmd_unzip ';'

if test ${kernel_image} = "fitImage"; then
    env set kernel_addr_load ${ramdisk_addr_r}
elif test -n ${kernel_comp_addr_r}; then
    env set kernel_addr_load ${loadaddr}
elif test ${kernel_image} = "Image.gz"; then
    env set kernel_addr_load ${loadaddr}
    env set bootcmd_unzip 'unzip ${kernel_addr_load} ${kernel_addr_r}'
else
    env set kernel_addr_load ${kernel_addr_r}
fi

env set rootfsargs_set 'run uuid_set && env set rootfsargs "root=PARTUUID=${uuid} ro rootwait"'
env set bootcmd_args 'run rootfsargs_set && env set bootargs ${rootfsargs} ${setupargs} ${appendargs} ${tdxargs}'
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp/u-boot$

Got an error at build time,

hari@Administrator:~/oe-core/build$ bitbake -c cleansstate u-boot-script-boundary
Loading cache: 100% |########################################################################################| Time: 0:00:02
Loaded 5423 entries from dependency cache.
Parsing recipes: 100% |######################################################################################| Time: 0:00:02
Parsing of 3395 .bb files complete (3392 cached, 3 parsed). 5425 targets, 638 skipped, 0 masked, 0 errors.
ERROR: Nothing PROVIDES 'u-boot-script-boundary'
u-boot-script-boundary was skipped: incompatible with machine verdin-imx8mp (not in COMPATIBLE_MACHINE)

Summary: There was 1 ERROR message, returning a non-zero exit code.
hari@Administrator:~/oe-core/build$ bitbake-layers show-recipes | grep u-boot | grep script
u-boot-script-boundary:
u-boot-script-qoriq:
u-boot-script-toradex:
hari@Administrator:~/oe-core/build$

All boot script is showing as incompatible with machine verdin-imx8mp, then which is supported and how can I implement that boot env in scripts.

Based on your error, the u-boot-script-boundary recipe is incompatible with the Verdin iMX8M Plus machine(1). For Toradex modules, you should use the u-boot-script-toradex recipe instead.

Correct Approach: Use U-Boot Script Toradex

Replace your u-boot-script-boundary_%.bbappend with u-boot-script-toradex_%.bbappend:

mv u-boot-script-boundary_%.bbappend u-boot-script-toradex_%.bbappend

Update Your BBappend File

Your u-boot-script-toradex_%.bbappend should be:

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

SRC_URI += "file://verdin-imx8mp/boot.cmd"

(1)

Simplify Your Boot Script

For Toradex modules, you can create a simpler boot script that focuses only on the console configuration(2). Update your boot.cmd:

# Custom boot script for Verdin iMX8M Plus
# Remove console=tty1 and set only UART console

# Set console to UART only (remove framebuffer console)
env set setupargs "console=ttymxc2,115200"

# Set custom kernel arguments
env set tdxargs "quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0"

# Standard Toradex boot sequence
run distro_bootcmd

(2)

Alternative: Modify U-Boot Configuration Directly

Instead of using a boot script, you can modify the U-Boot configuration directly in your existing approach. Update your disable-console-logs.patch:

Index: git/include/configs/verdin-imx8mp.h
===================================================================
--- git.orig/include/configs/verdin-imx8mp.h
+++ git/include/configs/verdin-imx8mp.h
@@ -44,6 +44,8 @@
        "fdt_board=dev\0" \
        "initrd_addr=0x43800000\0" \
        "initrd_high=0xffffffffffffffff\0" \
+       "setupargs=console=ttymxc2,115200\0" \
+       "tdxargs=quiet loglevel=0 vt.global_cursor_default=0 vt.default_redraw=0 consoleblank=0\0" \
        "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
                "if test \"$confirm\" = \"y\"; then " \
                "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

(1)

Complete U-Boot BBappend

Your final u-boot-toradex_%.bbappend should be:

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

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

do_configure:append() {
    # Set boot delay to 0 for fast boot
    if grep -q "#define CONFIG_BOOTDELAY" ${S}/include/configs/verdin-imx8mp.h; then
        sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
    else
        echo "#define CONFIG_BOOTDELAY 0" >> ${S}/include/configs/verdin-imx8mp.h
    fi

    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add new fdtfile for Ivy carrier board
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "fdtfile=imx8mp-verdin-wifi-ivy.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(1)

This approach will ensure that only console=ttymxc2,115200 appears in your kernel command line, removing the unwanted console=tty1 and console=null parameters(2).

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.