Disable serial console of u-boot on TX2

Do you mean the waiting time that asks you to select the boot kernel?

Yes,

If the u-boot receive anything on the uart0 port its stop the normal boot, thus blocking our system.

Could you also share what have you done to disable the stdout in uboot?

I’ll confirm if env parameters have been changed or not, but #1 contains all current modifications (working kernel) to UART0.

I’m not getting an stdout on UART0 during boot, nor debug.logs on runtime, I’ll double check everything today.

(note that u-boot stdout would be ignored by the other board as format wont match).

u-boot was set to silent.

I currently try to force the u-boot to complete.

setenv bootdelay 0
saveenv

prevent the UART message to put the system in interactive u-boot, but still lock on the boot option for kernel choice.

Could I simply force the u-boot to ignore the stdin value and chose 1 at boot ?

With a really dirty patch I now can’t get interrupted during boot by UART serial

All edited files are in sources/u-boot (R28.2):

configs/p2771-0000-500_defconfig

+CONFIG_BOOTDELAY=0
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_SILENT_CONSOLE=y #not working, still looking into that
+CONFIG_SYS_DEVICE_NULLDEV=1
+CONFIG_SILENT_CONSOLE_UPDATE_ON_SET=1

common/menu.c (dirty)

static inline int menu_interactive_choice(struct menu *m, void **choice)
{
        char cbuf[CONFIG_SYS_CBSIZE];
        struct menu_item *choice_item = NULL;
        
        +return menu_default_choice(m, choice); //if ever enter (? still possible ?) force default choice & exit
        //comment for backup
       /* while([...]
       */
}

common/autoboot.c

static int __abortboot(int bootdelay)
{
     int abort = 0;
     +return abort; //force no abort
}

cmd/bootmenu.c

static void bootmenu_autoboot_loop(struct bootmenu_data*menu, enum bootmenu_key* key, int *esc)
{
    +return;  //quit bootmenu at entry
}
[...]
int do_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
[...]
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >0) // >=0)
       delay = CONFIG_BOOTDELAY;
#endif 
+if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY == 0) //force exit
+       return 0;
+#endif
[...]
}

Now I need to check my diffs as I can’t silent the boot & u-boot anymore…, but on the bright side I tried to enter interactive boot & u-boot, sending UART0 continuous data, so far it never prevented it to boot.

I have the exact same situation as you. I have an external processor on UART0 which is constantly sending data, which makes the TX2’s U-boot hang.

I want to try your solution, thanks for documenting what worked for you! I’m also really new to U-boot and am not sure how to build; do you possibly have some from-scratch build instructions for U-boot you could share??

We are experiencing the same issue - if there is incoming UART0 transfer during the boot process of Jetson OS process it stops. Does anyone know if there is any available patch for Jetpack R32.1 release?

Thanks,

Etan

From common/Kconfig in the U-Boot source:

config BOOTDELAY
	int "delay in seconds before automatically booting"
	default 2
	depends on AUTOBOOT
	help
	  Delay before automatically running bootcmd;
	  set to 0 to autoboot with no delay, but you can stop it by key input.
	  set to -1 to disable autoboot.
	  set to -2 to autoboot with no delay and not check for abort

	  See doc/README.autoboot for details.

So if you set CONFIG_BOOTDELAY to -2, it will autoboot with no delay and will not be interruptible from the console.

Just a side note to consider…

Even if logging never outputs to the serial UART, and is silent, this does not necessarily disable the UART itself, and the UART probably continues to listen. Options (as above) to “not listen” would do the job, but this would be slightly different than disabling the UART console (the former is a “workaround”, while the latter is an actual “solution”). One has to disable the UART in multiple stages of boot, and thus it is difficult.

Hi Madisox,

Thanks for your reply but there is no such CONFIG_BOOTDELAY parameter in my p2771-0000-000_defconfig file.

According to this thread there should be any available patch for adding it: https://devtalk.nvidia.com/default/topic/1046074/jetson-tx2/disable-serial-console-of-u-boot-on-tx2/2 but the code changes are for R28.1

The content of my p2771-0000-000_defconfig:

CONFIG_ARM=y
CONFIG_TEGRA=y
CONFIG_TEGRA186=y
CONFIG_TARGET_P2771_0000=y
CONFIG_DEFAULT_DEVICE_TREE=“tegra186-p2771-0000-000”
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="Tegra186 (P2771-0000-000) # "

CONFIG_CMD_IMI is not set

CONFIG_CMD_IMLS is not set

CONFIG_CMD_FLASH is not set

CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y

CONFIG_CMD_FPGA is not set

CONFIG_CMD_GPIO=y

CONFIG_CMD_SETEXPR is not set

CONFIG_CMD_DHCP=y

CONFIG_CMD_NFS is not set

CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_DWC_ETH_QOS=y
CONFIG_RTL8169=y
CONFIG_E1000=y
CONFIG_PCI_TEGRA=y
CONFIG_TEGRA186_BPMP_I2C=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_POWER_DOMAIN=y
CONFIG_TEGRA186_POWER_DOMAIN=y
CONFIG_POSITION_INDEPENDENT=y

I’ve already tried two other solutions but without success:
https://devtalk.nvidia.com/default/topic/1030489
http://connecttech.com/resource-center/kdb347-reassigning-disable-serial-debug-connect-tech-tx1-carriers/

Still looking for a working solution.

Etan

Here is another option that to me seems simpler and avoids patching sources and rebuilding.

Reconfigure your PADCTL_DEBUG_UART1_RX_0 (0x02435010) from HSIO/UARTA mode (0x00000458) to GPIO mode (0x00000059). This worked for me. I can press on the enter key all day long on the serial console and it won’t get through to U-Boot to stop the boot process. Then later when/if you need to use UART0/UARTA in say the kernel you can reconfigure it back to HSIO mode for UART support.

Here is the patch to disable it and make it a GPIO:

--- a/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg	2019-12-10 01:02:49.000000000 -0600
+++ b/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg	2020-01-24 10:58:07.025071028 -0600
@@ -299,7 +299,7 @@
 pinmux.0x0243d008 = 0x00000402; # gpio_wan7_ph2: spi1, tristate-disable, input-disable, lpdr-disable
 pinmux.0x0243d000 = 0x0000040a; # gpio_wan8_ph3: spi1, pull-up, tristate-disable, input-disable, lpdr-disable
 pinmux.0x02435018 = 0x00000400; # uart1_tx_pt0: uarta, tristate-disable, input-disable, lpdr-disable
-pinmux.0x02435010 = 0x00000458; # uart1_rx_pt1: uarta, pull-up, tristate-enable, input-enable, lpdr-disable
+pinmux.0x02435010 = 0x00000059; # uart1_rx_pt1: rsvd1, pull-up, tristate-enable, input-enable, lpdr-disable
 pinmux.0x0c302020 = 0x00000400; # uart3_tx_pw2: uartc, tristate-disable, input-disable, lpdr-disable
 pinmux.0x0c302018 = 0x00000458; # uart3_rx_pw3: uartc, pull-up, tristate-enable, input-enable, lpdr-disable
 pinmux.0x0c302010 = 0x00000400; # uart3_rts_pw4: uartc, tristate-disable, input-disable, lpdr-disable

Note that if you have a different board/module you will need to patch a different cfg file.

Following that change you can re-flash the pinmux settings using MB1_BCT:

sudo ./flash.sh -k MB1_BCT jetson-tx2 mmcblk0p1