I have both the device and my computer set up with static IPs on my router
fw_setenv serverip is the receiving computer's ip
fw_setenv ipaddr is your device's ip
the commands below will start netconsole only if the serverip responds to a ping. Otherwise it will output on serial.
To listen to netconsole:
Run this on mac:
nc -lu 6666
Run this on linux:
nc -l -u 6666
Run the following on your device via SSH:
$this->bbcode_second_pass_code('', '
fw_setenv serverip 192.168.1.107
fw_setenv ipaddr 192.168.1.122
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'
')
You may need to get fw_setenv:
http://elinux.org/U-boot_environment_variables_in_linux