Silence UART during boot

Is it possible to disable all console output during the booting ? I would like to connect the serial port to a device, but the boot information confuses that device.

I have already set the console to null in the bootargs environment, but I still get some info from uboot itself.

 

How about this: How to terminate console on serial port (UART) [Old OpenWrt Wiki]

Thank you, this won’t silence uboot itself however. I see in various uboot docs that there is a silent variable, but I’m not sure if the uboot variant GLI is using honors this option.

 

I suggest not to silent uboot itself.

Because, first you have to debug your uboot code. While you are doing this, if you silent your UART, you don’t know what it will happen when uboot met problem. But of course you can do this in your own risk.

The uboot code is here:

I suggest that you add some code in your own board to analyze the strings from UART.

We have done similar. Only text with certain text will be accepted and other text will be omitted.

Thank you.

I really don’t mind u-boot to barf on the uart if something is wrong, in that case nothing will work anyway so the confusion on my peripheral is not really of any impact. The silent option for u-boot will only generate output when you send something on the uart first during booting as far as I can understand, and that would be just fine for my purpose.

Thanks for the link, i’ll check whether this version of u-boot honors the silent option.

 

 

 

 

One thing comes to my mind is that, if you connect some devices to the UART and it output some info during uboot booting, uboot could just stop. Because in uboot console, if you press any key, uboot will stop.

So, you need to change the uboot code as well.

Hi,

I am not using GLI, but I have same problem with openwrt and I could not silence the the boot messages printed by kernel, I tried bootargs, early printk and other options but still it prints kernel messages. kernel.printk= 0 4 7 1 in /etc/sysctl.conf makes some later messages silenced by not the early ones.

I would be grateful for any help you can provide.

for uboot, you can use this uboot GitHub - domino-team/uboot-domino

which you can set key combinations to stop the boot process. So the uboot will not be stopped accidentally.

thanks for reply,

I am using pepe2k uboot. My main problem is where the kernel messages is printed on the console, I want to make it disable, messages like " [ 0.000000] Linux version x.x.x".

I tried following options for that but no result, and still it prints on the console:

  • disabling early printk in ar71xx/configxxx
  • changing CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd console=null" in ar71xx/configxxx
  • change bootargs in uboot, console=null
  • Make uboot with --silence option

@majid.it, I think you followed this guide: How to terminate console on serial port (UART) [Old OpenWrt Wiki]

It should work otherwise this guide should not be here for long.

Don’t forget one thing, when you change this and recompile your firmware, clean the kernel first

make target/linux/clean

make

thanks for your reply,

Yes I followed that wiki page as one of my sources. I cleaned the linux too unfortunately did not get any hopeful result until now.