Hi.
I've got a bit unusual issue. I bought one of those Radxa E20C mini-routers to use as a VPN gateway, and I'm having some trouble operating it. I wanted to disable any remote admin functionality over the ethernet ports, and instead use the debug serial UART link to get a terminal. Unfortunately, the link has proven to be very unstable. When printing large amount of text, the output is often mutilated garbage with large parts of text randomly missing or intermixed. It would seem the serial link is dropping some characters because the baudrate is too high. The device comes with one of those WCH CH340 serial chips, which is known to have problems at maximum advertised speeds (1500000). Manually changing the baud via terminal to something lower like 115200 completely eliminates the issue.
Unfortunately, this is only a temporary solution because each reboot will reset the baudrate back to its default. I could not find any easy way to permanently set the baudrate to 115200. While the uboot does allow changing the baud by using the "setenv" command, it doesn't support the "saveenv" command. The kernel will also switch back to 1500000 upon booting, so the baud rate must apparently be set in two different places - kernel and uboot. I tried editing the kernel command line in the boot.scr file on the first eMMC partition, and the system then failed to boot with some CRC error.
Original boot.scr:
setenv bootargs "console=${serial_port},1500000 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
Changed to:
setenv bootargs "console=${serial_port},115200 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
What would be the easiest way to permanently set the serial baud rate to 115200 (uboot + kernel)? Can someone point me in the right direction? Is recompiling the entire image from scratch the only option?
Thanks in advance.