1 2In U-Boot, we implemented the networked console via the standard 3"devices" mechanism, which means that you can switch between the 4serial and network input/output devices by adjusting the 'stdin' and 5'stdout' environment variables. To switch to the networked console, 6set either of these variables to "nc". Input and output can be 7switched independently. 8 9On the host side, please use this script to access the console: 10 11+++++++++++++++++++++++++++++++++++++++++++ 12#! /bin/bash 13 14TARGET_IP=$1 15 16stty -icanon -echo intr ^T 17nc -u -l -p 6666 < /dev/null & 18nc -u ${TARGET_IP} 6666 19stty icanon echo intr ^C 20+++++++++++++++++++++++++++++++++++++++++++ 21 22For Linux, the network-based console needs special configuration. 23Minimally, the host IP address needs to be specified. This can be 24done either via the kernel command line, or by passing parameters 25while loading the netconsole.o module (when used in a loadable module 26configuration). Please refer to Documentation/networking/logging.txt 27file for the original Ingo Molnar's documentation on how to pass 28parameters to the loadable module. 29 30The format of the kernel command line parameter (for the static 31configuration) is as follows: 32 33 netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr] 34 35where 36 37 src-port source for UDP packets 38 (defaults to 6665) 39 src-ip source IP to use 40 (defaults to the interface's address) 41 dev network interface 42 (defaults to eth0) 43 tgt-port port for logging agent 44 (defaults to 6666) 45 tgt-ip IP address for logging agent 46 (this is the required parameter) 47 tgt-macaddr ethernet MAC address for logging agent 48 (defaults to broadcast) 49 50Examples: 51 52 netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc 53 54or 55 56 netconsole=@/,@192.168.3.1/ 57 58Please note that for the Linux networked console to work, the 59ethernet interface has to be up by the time the netconsole driver is 60initialized. This means that in case of static kernel configuration, 61the respective Ethernet interface has to be brought up using the "IP 62Autoconfiguration" kernel feature, which is usually done by defaults 63in the ELDK-NFS-based environment. 64 65To browse the Linux network console output, use the 'netcat' tool invoked 66as follows: 67 68 nc -u -l -p 6666 69