fyi2000 DD-WRT Guru
Joined: 04 Apr 2010 Posts: 642
|
Posted: Wed Oct 13, 2010 19:55 Post subject: |
|
There're three types of messages which will be sent to serial console, boot loader, kernel and busybox. Messages come from boot loader can't be inhibited. But as long as the router runs without power cycle or reboot, it shouldn't be a problem.
Kernel messages can only be inhibited by commenting out the serial port from the kernel command line. This can be done by recompiling. For routers with RedBoot installed, there's a trick to do that. Simply load the kernel image, locate the kernel command line and change "ttyS0,115200" to "/dev/null" plus some blanks. For example,
Code: | RedBoot> fis load -l vmlinux.bin.l7
Image loaded from 0x80041000-0x80279086
RedBoot> d -b 0x8024E5B0 -l 64
8024E5B0: 63 6F 6E 73 6F 6C 65 3D 74 74 79 53 30 2C 39 36 |console=ttyS0,96|
8024E5C0: 30 30 20 72 6F 6F 74 66 73 74 79 70 65 3D 73 71 |00 rootfstype=sq|
8024E5D0: 75 61 73 68 66 73 2C 6A 66 66 73 32 20 69 6E 69 |uashfs,jffs2 ini|
8024E5E0: 74 3D 2F 65 74 63 2F 70 72 65 69 6E 69 74 00 00 |t=/etc/preinit..|
RedBoot> mfill -b 0x8024E5B8 -l 5 -p 0x2f -1
RedBoot> mfill -b 0x8024E5B9 -l 1 -p 0x64 -1
RedBoot> mfill -b 0x8024E5BA -l 1 -p 0x65 -1
RedBoot> mfill -b 0x8024E5BB -l 1 -p 0x76 -1
RedBoot> mfill -b 0x8024E5BD -l 1 -p 0x6E -1
RedBoot> mfill -b 0x8024E5BE -l 1 -p 0x75 -1
RedBoot> mfill -b 0x8024E5BF -l 2 -p 0x6C -1
RedBoot> mfill -b 0x8024E5C1 -l 1 -p 0x20 -1
RedBoot> d -b 0x8024E5B0 -l 64
8024E5B0: 63 6F 6E 73 6F 6C 65 3D 2F 64 65 76 2F 6E 75 6C |console=/dev/nul|
8024E5C0: 6C 20 20 72 6F 6F 74 66 73 74 79 70 65 3D 73 71 |l rootfstype=sq|
8024E5D0: 75 61 73 68 66 73 2C 6A 66 66 73 32 20 69 6E 69 |uashfs,jffs2 ini|
8024E5E0: 74 3D 2F 65 74 63 2F 70 72 65 69 6E 69 74 00 00 |t=/etc/preinit..|
RedBoot> exec |
Put these commands in RedBoot init script.
For Broadcom based routers, you just pray that there's no serious kernel faults that will pop up on the serial port.
At last regarding the Busybox console, from cases mentioned above, you can only redirect Busybox console by "setconsole" to some other physical devices besides /dev/null, ex. from /dev/tts/0 to /dev/tts/1. I don't know why. So I think it's not possible to do it with La Fonera which has only one serial port. Besides, I can't find a precompiled "setconsole" for Atheros and I'm not an expert of compiling.
The latest "setserial" can be found in the "setserial" package from OpenWrt and "stty" can be found in "coreutils" package.
There's a chaper on the LaFonera wiki which addresses "Rs232-Serial-port-to-wireless." In fact, there's an package called "ser2net" which comes from a sourceforge project. I believe some of you might be interested in that.
Fonera 2100 serial console need urgent help |
|