Disable serial console of u-boot on TX2

Hello, in our system we are using ttyS0 port for communicating with another device. This configuration prevents TX2 from booting up. We couldn’t get past u-boot phase.

So far, I have tried disabling serial console by modifying the u-boot source code as described in a stackoverflow post:

https://stackoverflow.com/questions/34356844/how-to-disable-serial-consolenon-kernel-in-u-boot?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

in u-boot/include/configs/p2771-0000.h I added the following lines:

#define CONFIG_DISABLE_CONSOLE
#define CONFIG_SILENT_CONSOLE
#define CONFIG_SYS_DEVICE_NULLDEV
#define CONFIG_SILENT_U_BOOT_ONLY

#define CONFIG_BOARD_EARLY_INIT_F 1
#define CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC

and in u-boot/arch/arm/mach-tegra/board186.c I added:
int board_early_init_f(void)
{
+gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);
return 0;
}

Is there anything else that I need to change in order to disable the console?

Don’t know if this will do it, but in the U-Boot source, file “include/configs/p2371-2180.h” you might try removing this define:

#define CONFIG_TEGRA_ENABLE_UARTA

In the current version of sources (28.2), I don’t have CONFIG_TEGRA_ENABLE_UARTA definition in “include/configs/p2771-0000.h” .

The header file is as follows:

/*

  • Copyright © 2013-2016, NVIDIA CORPORATION.
  • SPDX-License-Identifier: GPL-2.0
    */

#ifndef _P2771_0000_H
#define _P2771_0000_H

#include <linux/sizes.h>

#include “tegra186-common.h”

/* High-level configuration options */
#define CONFIG_TEGRA_BOARD_STRING “NVIDIA P2771-0000”

/* I2C */
#define CONFIG_SYS_I2C_TEGRA

/* SD/MMC */
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_TEGRA_MMC

/* Environment in eMMC, at the end of 2nd “boot sector” */
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_MMC_ENV_PART 2
#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE)

/* PCI host support */
#define CONFIG_PCI
#define CONFIG_PCI_PNP
#define CONFIG_CMD_PCI

/* Silence UART at start-up – my modifications --*/
#define CONFIG_DISABLE_CONSOLE
#define CONFIG_SILENT_CONSOLE
#define CONFIG_SYS_DEVICE_NULLDEV
#define CONFIG_SILENT_U_BOOT_ONLY

#define CONFIG_BOARD_EARLY_INIT_F 1
#define CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC

#define BOARD_EXTRA_ENV_SETTINGS
"calculated_vars=kernel_addr_r fdt_addr_r scriptaddr pxefile_addr_r "
“ramdisk_addr_r\0”
“kernel_addr_r_align=00200000\0”
“kernel_addr_r_offset=00080000\0”
“kernel_addr_r_size=02000000\0”
“kernel_addr_r_aliases=loadaddr\0”
“fdt_addr_r_align=00200000\0”
“fdt_addr_r_offset=00000000\0”
“fdt_addr_r_size=00200000\0”
“scriptaddr_align=00200000\0”
“scriptaddr_offset=00000000\0”
“scriptaddr_size=00200000\0”
“pxefile_addr_r_align=00200000\0”
“pxefile_addr_r_offset=00000000\0”
“pxefile_addr_r_size=00200000\0”
“ramdisk_addr_r_align=00200000\0”
“ramdisk_addr_r_offset=00000000\0”
“ramdisk_addr_r_size=02000000\0”

#include “tegra-common-post.h”

/* Crystal is 38.4MHz. clk_m runs at half that rate */
#define COUNTER_FREQUENCY 19200000

#undef CONFIG_NR_DRAM_BANKS
#define CONFIG_NR_DRAM_BANKS (1024 + 2)

#endif

Edit: I’m sorry, I noticed that I already removed that define.

Hi,

Do you want to disable only the uboot log or also the whole bootloader message on uart?

If you want to totally disable uart, please refer to L4T document ->
“Kernel Boot Time Optimization”. -> “Disable Debugging”

I want to disable whole bootloader communication on uart.

You may be using the wrong source. Line 19 should be the define listed in my reply above.

The R28.2 version of U-Boot can be downloaded with the driver package’s source_sync.sh:

./source_sync.sh -u tegra-l4t-r28.2

@linuxdev I noticed that you are mentioning “p2371-2180.h”. I thought this file is related to TX1 and “p2771-0000.h” is related to TX2, and I worked on this file.

I tried removing that line in “p2371-2180.h” now, but it didn’t solve my problem.

@WayneWWW L4T docs says in Kernel Boot Time Optimization -> Disable Debugging

Disable Debugging
To reduce boot time, disable debugging kernel hacks in the production configuration.
For example: FTRACE, TRACER, KMEMLEAK, etc.

I’m not sure how to use this. Am I referring to the right document?

Hi,

Sorry that I notice our document has some content that is out-of-date. Please refer to this thread and reflash your device to see if uart log is gone.

https://devtalk.nvidia.com/default/topic/1030489