Ok, so there are basically four different things being written to the UART:
- das uboot bootloader messages
- kernel booting messages
- kernel "printk" messages (aka dmesg)
- console
Disabling the console is the easiest: just edit /etc/inittab and comment out (with #) or delete the line that has "askconsole" in it. On the next boot no console will be started.
You can disable the "printk" messages in two ways, either just disable them in the "Global Build Settings" in the menuconfig when you are building the image, or add a line saying "kernel.printk = 0 4 1 7" to the /etc/sysctl.conf
The kernel booting messages can be disabled by changing the kernel boot parameters. If you look at target/linux/ramips/dts/VOCORE.dts you can see that it includes file rt5350.dtsi, which in turns has this:
- Code: Select all
chosen {
bootargs = "console=ttyS0,57600";
};
You can copy it to VOCORE.dts and change to:
- Code: Select all
chosen {
bootargs = "console=null";
};
You can't do anything about the bootloader, without compiling your own version. And I think you really don't want -- because you want to have some emergency way of flashing a different image when something goes wrong. My solution is to just ignore anything on the serial line until a handshake sequence appears.
See
http://wiki.openwrt.org/doc/recipes/ter ... .on.serial for another way.
If instead of disabling it you want to redirect it to the second UART, you can do that. Do what is described in
http://vonger.cn/?p=1409 and change the bootargs line above to point to ttyS1 instead of ttyS0. All the rest will switch over automatically, I think.