DIsbale UART messages on device boot

If you are asking a question, please follow this template:

  1. My goal is: I need to disable all the messages over UART0 while device is booting up
  2. My actions are: In mos.yml I have already done debug.stdout_uart =1 and debug.stderr_uart=1
  3. The result I see is: Still I can see some logs while device is booting up
  4. My expectation & question is: I need to completely bypass all the messages of UART0 while device is booting and I want to know how to disable and enable UART in run time, because under UART API section There is no API for enable or disbale or close the UART

The device first boots using vendor code and later starts mOS.
AFAIK you can “easily” silence mOS, it has been asked before, for an ESP32 you need to instruct the IDF to not use UART0 and I personally don’t know how to do it nor if it is possible, check the IDF docs. For other devices, YMMV.