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

Hi,

I need to diable the kernel console logs via the Yocto Build OS image developing time where I need to exactly ensure and Integrate the kernel console logs configuration as custom meta layer or recipes in the yocto layer folder.

I have to clarify that the fw env configuration after the boot in the device terminal shell it working good and after the ecexution and reboot it were setting the kernel console logs disable but now here it is doen by manually then, I need to convert it to apply directly via the yocto build layer and recipes folder need a help for that OS build for verdin iMX8MP Board.

fw_setenv console
fw_setenv stdout
fw_setenv stdin
fw_setenv stderr
fw_setenv defargs ""
fw_setenv tdxargs "quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0"
fw_setenv bootargs '${defargs} ${tdxargs}'
reboot now

Result:

cat /proc/cmdline
root=PARTUUID=... ro rootwait quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0

Need Help in:
This Manual Configuration should be applied directly via the yocto Build OS image, without using the Manual Commands the device directly set it by the layer or recipes configs need help on this to clarify where the apply this configs in the Build Layer.

Hi, I’m the Toradex AI Assistant.

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


Disable Kernel Console Logs via Yocto Build for Verdin iMX8MP

I can help you integrate your console log configuration directly into the Yocto build process. Based on your requirement to set kernel parameters like quiet loglevel=0 logo.nologo vt.global_cursor_default=0 at build time, you’ll need to create a custom U-Boot configuration.

Solution: Custom U-Boot Configuration via Yocto

1. Create a Custom Meta Layer

First, create a custom meta layer for your modifications (1):

# 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

(1)

2. Add the Layer to Your Build Configuration

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

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 \
"

(1)

3. Create U-Boot Recipe Override

Create the U-Boot recipe structure in your custom layer (2):

$ cd ../layers/meta-customer/
$ mkdir -p recipes-bsp/u-boot/files/verdin-imx8mp

(2)

4. Create the U-Boot Configuration Patch

Create a patch file to modify the U-Boot environment variables. Based on the Japanese documentation example for Verdin iMX8MP (2), create:

recipes-bsp/u-boot/files/verdin-imx8mp/disable-console-logs.patch

The patch should modify the U-Boot configuration to include your kernel parameters in the default environment. This would target the setup configuration in the U-Boot header file, similar to how the Japanese example modifies ./include/configs/verdin-imx8mp.h (2).

5. Create the U-Boot bbappend File

Create recipes-bsp/u-boot/u-boot-toradex_2020.04.bbappend (2):

SRC_URI_append_verdin-imx8mp = " file://disable-console-logs.patch"

(2)

6. Key U-Boot Variables to Modify

Based on the U-Boot documentation, you’ll want to modify these internal variables (3):

  • tdxargs - Contains custom kernel arguments (3)
  • defargs - Can be set to empty as you’re doing (3)
  • bootargs - Final kernel arguments (built automatically from other variables) (3)

The goal is to set tdxargs to contain your desired parameters: "quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0" (3).

7. Build Your Custom Image

After implementing the changes:

$ bitbake -c cleansstate virtual/bootloader
$ bitbake tdx-reference-multimedia-image

(4)

Important Notes

  • The U-Boot environment variables you’re setting (console, stdout, stdin, stderr) control console output routing (3)
  • The tdxargs variable is specifically designed for custom kernel parameters and should contain your quiet boot settings (3)
  • Your patch should modify the default U-Boot environment to include these settings permanently (2)

This approach will embed your console log configuration directly into the U-Boot binary during the Yocto build process, eliminating the need for manual fw_setenv commands after deployment.

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,

The same way of the above kernel console log disable configuration like, I need to set the Fast boot param configs via the yocto build. Here in the layer and recipes recipe need to do the fast boot time set in the layer folder for the image os build.

Fast Boot Configuration via Yocto Build for Verdin iMX8MP

I can help you implement fast boot parameters directly in your Yocto build using the same meta layer approach. Based on the Toradex fast boot implementation, you’ll need to create patches for both U-Boot and kernel configurations.

1. Fast Boot U-Boot Configuration

Create a U-Boot patch to modify boot delay and remove unnecessary features. In your existing meta layer, create:

recipes-bsp/u-boot/files/verdin-imx8mp/fast-boot-config.patch

The patch should include these key optimizations based on Toradex fast boot configurations:

-#define CONFIG_BOOTDELAY		1
+#define CONFIG_BOOTDELAY		0
 #define CONFIG_ZERO_BOOTDELAY_CHECK

This sets the boot delay to 0 seconds for immediate boot.

2. Kernel Arguments for Fast Boot

In your U-Boot environment patch, you should also configure the kernel arguments to include fast boot parameters. Add to your existing tdxargs configuration:

"tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0 init=/init\0"

The init=/init parameter can help speed up the initialization process.

3. Remove Unnecessary U-Boot Features

Create additional patches to disable unused U-Boot features that slow down boot time. Based on Toradex fast boot optimizations, you can remove:

  • Network commands (CONFIG_CMD_PING, CONFIG_CMD_DHCP, CONFIG_CMD_NET)
  • File system commands (CONFIG_CMD_EXT3, CONFIG_CMD_EXT4)
  • Other unused features (CONFIG_CMD_FUSE, CONFIG_CMD_BMP)

4. Update Your bbappend File

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

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

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

5. Kernel Configuration for Fast Boot

You can also optimize the kernel configuration by creating a kernel configuration fragment (1). Create:

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

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

6. Add Kernel Configuration to Your Layer

Update your kernel bbappend file (1):

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

SRC_URI += "\
    file://fast-boot.cfg \
"

7. Build Your Optimized Image

Clean and rebuild your image (2):

$ bitbake -c cleansstate virtual/bootloader
$ bitbake -c cleansstate virtual/kernel
$ bitbake tdx-reference-minimal-image

Key Fast Boot Optimizations

The main areas for fast boot optimization include:

  1. U-Boot Boot Delay: Set to 0 for immediate kernel loading
  2. Kernel Console: Disable verbose logging and logos
  3. Init System: Use optimized init process
  4. Remove Unused Features: Disable unnecessary U-Boot commands and kernel features

This approach integrates all fast boot configurations directly into your Yocto build process, ensuring consistent fast boot behavior across all deployed devices without requiring manual configuration.

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,

what are the params and format for the patch files need to be add exactly in the recipes layer I need the clear cut exact param configuration details and bbappend details for the above discussed things?

1.) recipes-bsp/u-boot/files/verdin-imx8mp/disable-console-logs.patch
2.) recipes-bsp/u-boot/u-boot-toradex_2020.04.bbappend
3.) recipes-bsp/u-boot/files/verdin-imx8mp/fast-boot-config.patch
4.) recipes-bsp/u-boot/u-boot-toradex_%.bbappend
5.) recipes-kernel/linux/linux-toradex/fast-boot.cfg

How to create and where to create this files and bbappend files and what the exact format inside the files to be added for the correct yocto build params and formats to build the OS with these required setups? I need the help for the exact param and strucutre format for the files to be added and the content inside the file to be present for my clear understanding and clarification.

Exact File Structure and Content for Yocto Build Configuration

1. Directory Structure Creation

First, create the complete directory structure in your custom meta layer (1):

$ cd ../layers/meta-customer/
$ mkdir -p recipes-bsp/u-boot/files/verdin-imx8mp
$ mkdir -p recipes-kernel/linux/linux-toradex

(1)

2. U-Boot bbappend File

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

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

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

(1)

3. Disable Console Logs Patch

Create recipes-bsp/u-boot/files/verdin-imx8mp/disable-console-logs.patch:

Based on the U-Boot configuration structure shown in the documentation (1), the patch should modify the U-Boot header file. The patch format should follow standard diff format:

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 @@
-    "tdxargs=\0" \
+    "tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\0" \

4. Fast Boot Configuration Patch

Create recipes-bsp/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

5. Kernel Configuration Fragment

Create 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

6. Kernel bbappend File

Create recipes-kernel/linux/linux-toradex_%.bbappend following the exact format from the documentation (1):

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

# Prevent the use of in-tree defconfig
unset KBUILD_DEFCONFIG

SRC_URI += "\
    file://fast-boot.cfg \
"

(1)

7. U-Boot Environment Configuration

Based on the documentation showing U-Boot configuration modification (1), you can also create a complete U-Boot environment patch that sets all the variables at once:

do_configure:append() {
    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add console disable and fast boot parameters
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

(1)

8. Complete Layer Configuration

Add your layer to conf/bblayers.conf as shown in the documentation (1):

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 \
"

(1)

9. Build Commands

After creating all files, build your image (1):

$ bitbake -c cleansstate virtual/bootloader
$ bitbake -c cleansstate virtual/kernel
$ bitbake <your-image>

(1)

This structure follows the exact format and patterns shown in the Toradex documentation for customizing U-Boot and kernel configurations through Yocto layers.

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.

Hello @ToradexAI,

I have the followed the steps exactly for the above given recipes-bsp and recipes-kernel exactly but I have recieved the error at the time of uocto build, why?

recipes-kernel Layer:

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

2 directories, 4 files
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel/linux$ cat linux-toradex/fast-boot.cfg
# Fast boot kernel optimizations
CONFIG_PRINTK=n
CONFIG_EARLY_PRINTK=n
CONFIG_LOGO=n
CONFIG_UBI_SILENCE_MSG=y
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel/linux$ cat linux-toradex_%.bbappend
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 \
"

# include both config fragments in SRC_URI so Yocto stages them
SRC_URI += "file://verdin-imx8mp-qmi.cfg \
            file://ppp.cfg"

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

do_configure:append() {
    # Remove existing fdtfile, if there is one
    sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
    # Add console disable and fast boot parameters
    sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n      "tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}

# Toradex-supported kernel cmdline injection
# APPENDARGS += " quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0"

recipes-bsp 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
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 @@
-    "tdxargs=\0" \
+    "tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\0" \
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 \
    file://fast-boot-config.patch \
"
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-bsp$

I got an error while building the Yocto build in Host Machine:

hari@Administrator:~/oe-core/build$ bitbake -k tdx-reference-multimedia-image
NOTE: Reconnecting to bitbake server...
Loading cache: 100% |########################################################################################| Time: 0:00:02
Loaded 5421 entries from dependency cache.
Parsing recipes: 100% |######################################################################################| Time: 0:00:01
Parsing of 3393 .bb files complete (3391 cached, 2 parsed). 5423 targets, 638 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly-meta)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-libav not available (for item gstreamer1.0-libav)
WARNING: versions of gstreamer1.0-libav available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly-dev)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly-asf)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-libav not available (for item gstreamer1.0-libav-dev)
WARNING: versions of gstreamer1.0-libav available: 1.22.12 1.24.0.imx

Build Configuration:
BB_VERSION           = "2.8.1"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-22.04"
TARGET_SYS           = "aarch64-tdx-linux"
MACHINE              = "verdin-imx8mp"
DISTRO               = "tdx-xwayland"
DISTRO_VERSION       = "7.5.0-devel-20260105070441+build.0"
TUNE_FEATURES        = "aarch64 armv8a crypto"
TARGET_FPU           = ""
meta-toradex-nxp     = "HEAD:c8b1e7c44c930edd8ff889ad01ab4a5f636948d8"
meta-freescale       = "HEAD:7d83a350d8b28498321a481a2a1c51bb4afb48e9"
meta-freescale-3rdparty = "HEAD:70c83e96c7f75e73245cb77f1b0cada9ed4bbc6d"
meta-toradex-ti      = "HEAD:699cbb557f3c5e57dbdffa2c2023993ee081cf07"
meta-arm-toolchain
meta-arm             = "HEAD:a81c19915b5b9e71ed394032e9a50fd06919e1cd"
meta-ti-bsp
meta-ti-extras       = "HEAD:5b095d968eb225b72e44dc164683aa9157ec2b93"
meta-toradex-bsp-common = "HEAD:366aae1eecae26cf31d6f227217670a8245a93f1"
meta-oe
meta-filesystems
meta-networking
meta-multimedia
meta-python          = "HEAD:15e18246dd0c0585cd1515a0be8ee5e2016d1329"
meta-freescale-distro = "HEAD:b9d6a5d9931922558046d230c1f5f4ef6ee72345"
meta-toradex-demos   = "HEAD:4ba1cebc6909ee7a83d569e8cc748f69e6a0a24f"
meta-qt5             = "HEAD:e197839013fa2cfd59339508303bce91fef48928"
meta-tpm             = "HEAD:bc865c5276c2ab4031229916e8d7c20148dfbac3"
meta-toradex-distro  = "HEAD:71f3887a63d9b10b925afd75d6fb00085cd420b3"
meta-poky            = "HEAD:3ff7ca786732390cd56ae92ff4a43aba46a1bf2e"
meta                 = "HEAD:06d4981313ce67a8d53b1c14be9845b4b5a9f4cf"
meta-toradex-chromium = "<unknown>:<unknown>"
meta-chromium        = "HEAD:dc31889c0899971def535dc1c040edf18bc16691"
meta-clang           = "scarthgap:731488911f55ebfe746068512b426351192f82f2"
meta-lokbest         = "<unknown>:<unknown>"

Sstate summary: Wanted 498 Local 419 Mirrors 0 Missed 79 Current 5626 (84% match, 98% complete)#####         | ETA:  0:00:01
Removing 39 stale sstate objects for arch verdin_imx8mp: 100% |##############################################| Time: 0:00:00
NOTE: Executing Tasks
ERROR: u-boot-toradex-1_2024.07-r0 do_patch: Applying patch 'disable-console-logs.patch' on target directory '/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/git'
CmdError('quilt --quiltrc /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch disable-console-logs.patch
patching file include/configs/verdin-imx8mp.h
patch: **** missing line number at line 5: @@ -XX,X +XX,X @@

Patch disable-console-logs.patch does not apply (enforce with -f)

stderr: ')
ERROR: Logfile of failure stored in: /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/temp/log.do_patch.5366
ERROR: Task (/home/hari/oe-core/build/../layers/meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_2024.07.bb:do_patch) failed with exit code '1'
ERROR: linux-toradex-6.6.101+git-r0 do_configure: ExecutionError('/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/temp/run.do_configure.11489', 2, None, None)
ERROR: Logfile of failure stored in: /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/temp/log.do_configure.11489
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/binutils/binutils-cross_2.42.bb:do_populate_sysroot', '/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_13.4.bb:do_populate_sysroot', '/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', '/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', 'virtual:native:/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/bison/bison_3.8.2.bb:do_populate_sysroot', 'virtual:native:/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', 'virtual:native:/home/hari/oe-core/build/../layers/openembedded-core/meta/recipes-kernel/kmod/kmod_31.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['gettext-minimal-native', 'binutils-cross-aarch64', 'cmake-native', 'gcc-cross-aarch64', 'libtool-native', 'm4-native', 'quilt-native', 'texinfo-dummy-native', 'kern-tools-native', 'linux-libc-headers', 'openssl-native', 'expat-native', 'ncurses-native', 'readline-native', 'util-linux-libuuid-native', 'zlib-native', 'bison-native', 'flex-native', 'git-native', 'gnu-config-native', 'libedit-native', 'make-native', 'patch-native', 'perl-native', 'pkgconfig-native', 'pseudo-native', 'python3-native', 'bc-native', 'bzip2-native', 'libnsl2-native', 'libtirpc-native', 'xz-native', 'zstd-native', 'kmod-native', 'attr-native', 'ca-certificates-native', 'curl-native', 'gdbm-native', 'gmp-native', 'libffi-native', 'libmpc-native', 'mpfr-native', 'sqlite3-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_configure
| NOTE: make CC=aarch64-tdx-linux-gcc    -fuse-ld=bfd -fcanon-prefix-map  -fmacro-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/git=/usr/src/debug/linux-toradex/6.6.101+git  -fdebug-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/git=/usr/src/debug/linux-toradex/6.6.101+git  -fmacro-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/build=/usr/src/debug/linux-toradex/6.6.101+git  -fdebug-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/build=/usr/src/debug/linux-toradex/6.6.101+git  -fdebug-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot=  -fmacro-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot=  -fdebug-prefix-map=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native=   -fdebug-prefix-map=/home/hari/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source=/usr/src/kernel  -fmacro-prefix-map=/home/hari/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source=/usr/src/kernel  -fdebug-prefix-map=/home/hari/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-build-artifacts=/usr/src/kernel  -fmacro-prefix-map=/home/hari/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-build-artifacts=/usr/src/kernel  LD=aarch64-tdx-linux-ld.bfd   OBJCOPY=aarch64-tdx-linux-objcopy  STRIP=aarch64-tdx-linux-strip HOSTCC=gcc  HOSTCFLAGS=-isystem/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/usr/include -O2 -pipe HOSTLDFLAGS=-L/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/usr/lib                         -L/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/lib                         -Wl,-rpath,/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/lib                         -Wl,-O1 HOSTCPP=gcc  -E HOSTCXX=g++  HOSTCXXFLAGS=-isystem/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/recipe-sysroot-native/usr/include -O2 -pipe HOSTPKG_CONFIG=pkg-config-native -C /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/git O=/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/build olddefconfig
| make: Entering directory '/home/hari/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source'
| make[1]: Entering directory '/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/build'
|   GEN     Makefile
|   HOSTCC  scripts/basic/fixdep
|   HOSTCC  scripts/kconfig/conf.o
|   HOSTCC  scripts/kconfig/confdata.o
|   HOSTCC  scripts/kconfig/expr.o
|   HOSTCC  scripts/kconfig/lexer.lex.o
|   HOSTCC  scripts/kconfig/menu.o
|   HOSTCC  scripts/kconfig/parser.tab.o
|   HOSTCC  scripts/kconfig/preprocess.o
|   HOSTCC  scripts/kconfig/symbol.o
|   HOSTCC  scripts/kconfig/util.o
|   HOSTLD  scripts/kconfig/conf
| #
| # No change to .config
| #
| make[1]: Leaving directory '/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/build'
| make: Leaving directory '/home/hari/oe-core/build/tmp/work-shared/verdin-imx8mp/kernel-source'
| sed: can't read /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/git/include/configs/verdin-imx8mp.h: No such file or directory
| WARNING: exit code 2 from a shell command.
ERROR: Task (/home/hari/oe-core/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.2.x.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 12420 tasks of which 12371 didn't need to be rerun and 2 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 4 seconds

Summary: 2 tasks failed:
  /home/hari/oe-core/build/../layers/meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_2024.07.bb:do_patch
    log: /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/temp/log.do_patch.5366
  /home/hari/oe-core/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.2.x.bb:do_configure
    log: /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/linux-toradex/6.6.101+git/temp/log.do_configure.11489
Summary: There were 12 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
hari@Administrator:~/oe-core/build$

I need the solution for the error clearance and correct configs and recipe layer for the required setup for my build.

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.

Hi @ToradexAI,

I have done the settings for the edit in verdin-imx8mp.h file in the Disable Kernel Console Logs in Verdin iMX8MP Board at Yocto Build OS Image? - #8 by ToradexAI

But I didn’t see any tdxargs line in that to modify what I need to do for that if the line is not present in the file where to add the in the file and create the patch for my recipes.


I have attached the screenshots of the edit commands in devshell and then the patch file in the edit view suggest me to where the configs of the tdxargs to be added and then move the file our recipe layer.

Solution: Adding tdxargs to U-Boot Configuration

Looking at your screenshots, I can see that the tdxargs variable is not present in the current U-Boot configuration file. Based on the U-Boot documentation, tdxargs is a Toradex-specific variable used for custom kernel parameters (1).

Where to Add tdxargs Configuration

You need to add the tdxargs variable to the environment variables section of the U-Boot configuration. Based on the U-Boot variable documentation, tdxargs should be added alongside other environment variables (1).

Step-by-Step Solution

1. In your devshell, locate the environment variables section:

Look for the section that defines environment variables, typically around where you see other variables like bootcmd, boot_targets, etc. This is usually in a #define CONFIG_EXTRA_ENV_SETTINGS block.

2. Add the tdxargs variable:

In the environment variables section, add this line:

"tdxargs=quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0\0" \

3. Complete patch creation process:

# In your devshell, after editing the file
$ quilt refresh
$ quilt pop -a
$ cp patches/your-patch-name.patch /path/to/meta-lokbest/recipes-bsp/u-boot/files/verdin-imx8mp/
$ exit

Alternative Approach Using bbappend

Since the tdxargs variable may not exist in the base configuration, you can use the do_configure:append() method in your bbappend file to add it:

recipes-bsp/u-boot/u-boot-toradex_%.bbappend:

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

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 logo.nologo 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
    sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
}

Key Points from Documentation

According to the U-Boot documentation:

  • tdxargs is specifically designed for custom kernel parameters and should contain your quiet boot settings (1)
  • The variable is used in Toradex BSPs and gets appended to the final bootargs (1)
  • All custom kernel parameters must be set using the tdxargs environment variable (1)

Build and Test

After making these changes:

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

This approach ensures that the tdxargs variable is properly added to your U-Boot configuration, even if it wasn’t present in the original file.

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.

Hello @ToradexAI,

Here what is the issue again after changing the recipes-bsp and recipes-kernel files and patch file and also the bbappend files again the error has been because solve the issue with help of the updated recipes content is below,

recipes-bsp 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/u-boot-toradex_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "\
    file://disable-console-logs.patch \
    file://fast-boot-config.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 logo.nologo 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
    sed -i 's/#define CONFIG_BOOTDELAY.*[0-9]/#define CONFIG_BOOTDELAY 0/' ${S}/include/configs/verdin-imx8mp.h
}

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

# SRC_URI += "\
#    file://disable-console-logs.patch \
#    file://fast-boot-config.patch \
# "
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 logo.nologo 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$

recipes-kernel:

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
# Fast boot kernel optimizations
CONFIG_PRINTK=n
CONFIG_EARLY_PRINTK=n
CONFIG_LOGO=n
CONFIG_UBI_SILENCE_MSG=y
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$ cat linux/linux-toradex_%.bbappend
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"

# SRC_URI += "\
#    file://fast-boot.cfg \
# "

# include both config fragments in SRC_URI so Yocto stages them
# SRC_URI += "file://verdin-imx8mp-qmi.cfg \
#            file://ppp.cfg"

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

# Toradex-supported kernel cmdline injection
# APPENDARGS += " quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0"
hari@Administrator:~/oe-core/layers/meta-lokbest/recipes-kernel$

Error occured during the Yocto Build:

Build Configuration:

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

bitbake -k tdx-reference-multimedia-image

Error Result of the Yocto Build:

hari@Administrator:~/oe-core/build$ bitbake -k tdx-reference-multimedia-image
NOTE: Reconnecting to bitbake server...
Loading cache: 100% |########################################################################################| Time: 0:00:02
Loaded 5421 entries from dependency cache.
Parsing recipes: 100% |######################################################################################| Time: 0:00:00
Parsing of 3393 .bb files complete (3391 cached, 2 parsed). 5423 targets, 638 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly-meta)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-libav not available (for item gstreamer1.0-libav)
WARNING: versions of gstreamer1.0-libav available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly-asf)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly-dev)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-plugins-ugly not available (for item gstreamer1.0-plugins-ugly)
WARNING: versions of gstreamer1.0-plugins-ugly available: 1.22.12 1.24.0.imx
WARNING: preferred version 1.24.7.imx of gstreamer1.0-libav not available (for item gstreamer1.0-libav-dev)
WARNING: versions of gstreamer1.0-libav available: 1.22.12 1.24.0.imx

Build Configuration:
BB_VERSION           = "2.8.1"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-22.04"
TARGET_SYS           = "aarch64-tdx-linux"
MACHINE              = "verdin-imx8mp"
DISTRO               = "tdx-xwayland"
DISTRO_VERSION       = "7.5.0-devel-20260105075439+build.0"
TUNE_FEATURES        = "aarch64 armv8a crypto"
TARGET_FPU           = ""
meta-toradex-nxp     = "HEAD:c8b1e7c44c930edd8ff889ad01ab4a5f636948d8"
meta-freescale       = "HEAD:7d83a350d8b28498321a481a2a1c51bb4afb48e9"
meta-freescale-3rdparty = "HEAD:70c83e96c7f75e73245cb77f1b0cada9ed4bbc6d"
meta-toradex-ti      = "HEAD:699cbb557f3c5e57dbdffa2c2023993ee081cf07"
meta-arm-toolchain
meta-arm             = "HEAD:a81c19915b5b9e71ed394032e9a50fd06919e1cd"
meta-ti-bsp
meta-ti-extras       = "HEAD:5b095d968eb225b72e44dc164683aa9157ec2b93"
meta-toradex-bsp-common = "HEAD:366aae1eecae26cf31d6f227217670a8245a93f1"
meta-oe
meta-filesystems
meta-networking
meta-multimedia
meta-python          = "HEAD:15e18246dd0c0585cd1515a0be8ee5e2016d1329"
meta-freescale-distro = "HEAD:b9d6a5d9931922558046d230c1f5f4ef6ee72345"
meta-toradex-demos   = "HEAD:4ba1cebc6909ee7a83d569e8cc748f69e6a0a24f"
meta-qt5             = "HEAD:e197839013fa2cfd59339508303bce91fef48928"
meta-tpm             = "HEAD:bc865c5276c2ab4031229916e8d7c20148dfbac3"
meta-toradex-distro  = "HEAD:71f3887a63d9b10b925afd75d6fb00085cd420b3"
meta-poky            = "HEAD:3ff7ca786732390cd56ae92ff4a43aba46a1bf2e"
meta                 = "HEAD:06d4981313ce67a8d53b1c14be9845b4b5a9f4cf"
meta-toradex-chromium = "<unknown>:<unknown>"
meta-chromium        = "HEAD:dc31889c0899971def535dc1c040edf18bc16691"
meta-clang           = "scarthgap:731488911f55ebfe746068512b426351192f82f2"
meta-lokbest         = "<unknown>:<unknown>"

Sstate summary: Wanted 497 Local 418 Mirrors 0 Missed 79 Current 5627 (84% match, 98% complete)#####         | ETA:  0:00:00
Initialising tasks: 100% |###################################################################################| Time: 0:00:12
NOTE: Executing Tasks
ERROR: u-boot-toradex-1_2024.07-r0 do_patch: Applying patch 'fast-boot-config.patch' on target directory '/home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/git'
CmdError('quilt --quiltrc /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch fast-boot-config.patch
patching file include/configs/verdin-imx8mp.h
patch: **** missing line number at line 5: @@ -XX,X +XX,X @@

Patch fast-boot-config.patch does not apply (enforce with -f)

stderr: ')
ERROR: Logfile of failure stored in: /home/hari/oe-core/build/tmp/work/verdin_imx8mp-tdx-linux/u-boot-toradex/2024.07/temp/log.do_patch.25099
ERROR: Task (/home/hari/oe-core/build/../layers/meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_2024.07.bb:do_patch) failed with exit code '1'
Setscene tasks: 6124 of 6124
Currently  1 running tasks (12444 of 12577)  98% |######################################################################## |
0: linux-toradex-6.6.101+git-r0 do_compile_kernelmodules - 2m29s (pid 67902)

Clear this error what is the problem for the yocto build after modify the recipes file?

I can help you solve this issue. Looking at your error, the problem is that your fast-boot-config.patch file still contains placeholder values instead of real patch content.

Error Analysis

The error shows: missing line number at line 5: @@ -XX,X +XX,X @@ because your fast-boot-config.patch still has placeholder values XX,X instead of actual line numbers.

Solution: Fix the Patch Files

1. Remove the Invalid Patch File

Since your fast-boot-config.patch has placeholder content, remove it and use only the do_configure:append() method:

$ rm ~/oe-core/layers/meta-lokbest/recipes-bsp/u-boot/files/verdin-imx8mp/fast-boot-config.patch

2. Update Your U-Boot bbappend File

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

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 logo.nologo 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
}

3. Your Kernel Configuration Looks Correct

Your kernel configuration is properly set up according to the documentation (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"

(1)

4. Alternative Approach: Use APPENDARGS

Based on the documentation showing kernel parameter configuration (1), you can also use the APPENDARGS variable for kernel parameters:

Add this to your kernel bbappend:

# Toradex-supported kernel cmdline injection
APPENDARGS += " quiet loglevel=0 logo.nologo vt.global_cursor_default=0 vt.default_redraw=0"

(1)

5. Build Commands

After making these changes (1):

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

Key Issues Fixed

  1. Removed invalid patch file with placeholder content
  2. Used only valid patches that were properly generated from devshell
  3. Applied fast boot configuration via do_configure:append() method
  4. Maintained proper kernel configuration structure

The main problem was the fast-boot-config.patch file containing placeholder values @@ -XX,X +XX,X @@ instead of real line numbers. By removing this invalid patch and using the do_configure:append() method instead, the build should complete successfully.

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 @Hariprabhu_13!

We’ll continue the support on the other thread.

Best regards.