Hi,
I would like to use Debug UART port of the R3Mini(3 pins just next to Power-usb-c ) to access to other devices. (I can use usb-c serial port as debug).
How can we disable debug mode?
And how is this mapped as tty device? (this specific 3 pins, is it ttyS0/S1/S2 or smthing else?)
I can see /dev/ttyS0 ttyS1 and ttyS2, does it mean we have 3 serial on-board ports?
I have not tried it…Basicly it should be possible as it is simple uart. But disable the debug functionality (stdout in dts/cmdline) may make debugging impossible
How can I disable debug functionality? the way pointed as → stdout in dts/cmdline (do you mean wheteher from dts file and re-build image or from cmdline)
I’ve never modified a dts file but I can try to follow and figure it out.
Stdout in kernel is defined here in dts (syntax can be a bit different when using older kernel/image):
And yes dts changes require kernel recompile (or at least the fit image,but dts alone is more difficult than while compiling kernel).
Cmdline is sometimes also used for passing serial settings for debug-uart. This is how it is done in my uboot:
My uboot allows overriding this builtin environment by adding a uEnv.txt on BPI-BOOT partition setting this variable to empty value. For other systems maybe uboot needs to be recompiled.
I can see the “stdout-path” in “target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts”, which I shall comment-out.
But I couldnt see the uboot part?
can it be at one of the below?(from “package/boot/uboot-envtools/files/mediatek_filogic” )
9 . /lib/uboot-envtools.sh
10 . /lib/functions.sh
Works great!
Just modified - commented out “stdout-path” at mentioned dts file.
Verification:
Loaded this new image to R3Mini (device1)
At device1, debug output can be seen till the kernel starts, then no output.
I reach to device1 via ssh.
Connected the Debug uart of other R3Mini(device2) the device1.
At device1, “screen /dev/ttyS0 115200 cs7 parenb -parodd” can get the debug output of device2.