⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.netconsole

📁 F:worksip2440a board可启动u-boot-like.tar.gz F:worksip2440a board可启动u-boot-like.tar.gz
💻 NETCONSOLE
字号:
In U-Boot, we implemented the networked console via the standard"devices" mechanism, which means that you can switch between theserial and network input/output devices by adjusting the 'stdin' and'stdout' environment variables. To switch to the networked console,set either of these variables to "nc". Input and output can beswitched independently.We use an environment variable 'ncip' to set the IP address and theport of the destination. The format is <ip_addr>:<port>. If <port> isomitted, the value of 6666 is used. If the env var doesn't exist, thebroadcast address and port 6666 are used. If it is set to an IPaddress of 0 (or 0.0.0.0) then no messages are sent to the network.On the host side, please use this script to access the console:+++++++++++++++++++++++++++++++++++++++++++#! /bin/bashTARGET_IP=$1stty -icanon -echo intr ^Tnc -u -l -p 6666 < /dev/null &nc -u ${TARGET_IP} 6666stty icanon echo intr ^C+++++++++++++++++++++++++++++++++++++++++++It turns out that 'netcat' cannot be used to listen to broadcastpackets. We developed our own tool 'ncb' (see tools directory) thatlistens to broadcast packets on a given port and dumps them to thestandard output. use it as follows:+++++++++++++++++++++++++++++++++++++++++++#! /bin/bashstty icanon echo intr ^T./ncb &nc -u mpc5200 6666stty icanon echo intr ^Ckill 0+++++++++++++++++++++++++++++++++++++++++++For Linux, the network-based console needs special configuration.Minimally, the host IP address needs to be specified. This can bedone either via the kernel command line, or by passing parameterswhile loading the netconsole.o module (when used in a loadable moduleconfiguration). Please refer to Documentation/networking/logging.txtfile for the original Ingo Molnar's documentation on how to passparameters to the loadable module.The format of the kernel command line parameter (for the staticconfiguration) is as follows:  netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]where  src-port	source for UDP packets		(defaults to 6665)  src-ip	source IP to use		(defaults to the interface's address)  dev		network interface		(defaults to eth0)  tgt-port	port for logging agent		(defaults to 6666)  tgt-ip	IP address for logging agent		(this is the required parameter)  tgt-macaddr	ethernet MAC address for logging agent		(defaults to broadcast)Examples:  netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bcor  netconsole=@/,@192.168.3.1/Please note that for the Linux networked console to work, theethernet interface has to be up by the time the netconsole driver isinitialized. This means that in case of static kernel configuration,the respective Ethernet interface has to be brought up using the "IPAutoconfiguration" kernel feature, which is usually done by defaultsin the ELDK-NFS-based environment.To browse the Linux network console output, use the 'netcat' tool invokedas follows:	nc -u -l -p 6666Note that unlike the U-Boot implementation the Linux netconsole isunidirectional, i. e. you have console output only in Linux.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -