How can i completely disable the debug UART console?

I’m using a Colibri iMX8X in my project and is using all UART ports available to communicate with other sub-systems. So I can’t allow that kernel/debug functions write something in the UART-A port.
I’ve tried this and doesn’t work at all!!!.

I’ve tried build modify the u-boot to not call the UART-A in the booting phase, and it doesn’t boot.

From the many things I’ve tried, what appears to work in some degree was to lower the values of msg kernel in the menuconfig.

Other than that, documentation only brought more confusion.

How is the right way to disable the debug UART-A and apply changes in the Device Tree using Yocto project BSP?

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To disable the debug UART console on your Colibri iMX8X, you can follow these steps to ensure that UART_A is free for your application needs:

  1. Disable U-Boot Console Output on UART_A:

    • Modify the U-Boot environment to prevent it from using UART_A for console output. You can do this by setting the console variable to an empty string or removing it entirely. This will stop U-Boot from sending any output to UART_A.
  2. Disable Linux Kernel Console Output on UART_A:

    • Adjust the kernel command line in U-Boot to remove any console output settings for UART_A. Set the console= option to an empty value. Additionally, use the quiet kernel parameter to minimize kernel message verbosity.
  3. Disable Serial Getty on UART_A:

    • Prevent the serial getty service from starting on UART_A by masking it. Execute the command systemctl mask serial-getty@ttyLP0.service, replacing ttyLP0 with the correct device name for your module.
  4. Modify the Device Tree Using Yocto Project BSP:

    • Edit the Device Tree source files in your Yocto project to disable UART_A. Locate the node for UART_A and set its status to disabled. This will prevent the Linux kernel from initializing UART_A.
    • Rebuild your Yocto project to apply these changes.

By following these steps, you should be able to disable the debug UART console on your Colibri iMX8X. This will allow you to use UART_A for your specific application requirements. If you encounter any issues, double-check that all changes are correctly applied and that the device tree is properly rebuilt and deployed.

Best regards,
Toradex AI Assistant.

Please, also check if these links can help you solve your problem:

How to patch device tree? (YOCTO).

Hi @CaioGM!

Is using UART_A mandatory for your project? We do not recommend doing this, as said in the article that you sent because it prevents analyzing errors or the U-Boot, for example.

Is the UART the only way to communicate with these sub-systems?

Best regards.
Lucas Azeituno.

Unfortunately, it is.
the project was built around the Colibri iMX8X module, and the debug UART thing was unbeknown to us at the time.
We manage to make a few patches to correct that using TorizonOS, but now we’re on the path to build a customized Linux with Yocto.
Besides compiling the image with no problem, I couldn’t apply the patches successfully.
At first, I’ve tried many things, but let’s start with this/this.
But then I received this error msg,
error-bitbake (4.8 KB)
Can you see where i’m wrong?

Thanks in advance.
Caio Mendes.

Update#1:
I’ve applied successfully the patches in the U-boot, as described by the link above.
However, the msgs I am seeing are from the kernel console. I can diminish, but not eradicate.

Besides the success with u-boot part, I’m still needing some assistance with kernel msg console, which I can’t complete disable.
How do I configure the kernel during build time to complete disable the kernel console messages?

TKS,
Caio Mendes.