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