summaryrefslogtreecommitdiff
path: root/tools/nc.odroid
diff options
context:
space:
mode:
authorSuriyan Ramasami <suriyan.r@gmail.com>2014-03-06 17:53:04 +0400
committerMauro Ribeiro <mauro.ribeiro@hardkernel.com>2014-03-06 17:53:04 +0400
commit5d39bef9758b4cd6e39046f78b75aaee91271a48 (patch)
tree60ed0eb8cabdaea3ddb44176d0b02934f876d28e /tools/nc.odroid
parenta1ce4b9c109d9629c4ce68fabbf6b0dbf2549f2e (diff)
downloadu-boot-5d39bef9758b4cd6e39046f78b75aaee91271a48.tar.xz
Enable OTG port as CDC ETH for console output using netconsole.
1. Added DHCPSERVER functionality in u-boot to auto configure network. 2. Enabled CDC ETH OTG 3. Added automatic CDC ETH console if OTG cable connected on boot. 4. Added script tools/nc.odroid for automatic netconsole. The Odroid is configured with IP 10.10.10.11 and the other end is DHCP served an address of 10.10.10.10. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> The steps to get console over the OTG port is as follows: 1. Power off Odroid 2. Connect OTG port with cable to USB host 3. In host ensure firewall is not blocking port 6666 and DHCP ports 67 and 68. All are UDP. 4. In host ensure automatic configuration of ethernet interface is turned on in Network Manager. Its usually enabled by default. On the host it will appear as interface usb0 5. Run tools/nc.odroid 6. Power on Odroid board.
Diffstat (limited to 'tools/nc.odroid')
-rw-r--r--tools/nc.odroid31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/nc.odroid b/tools/nc.odroid
new file mode 100644
index 0000000000..b83ad8ca50
--- /dev/null
+++ b/tools/nc.odroid
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+boardip=10.10.10.11
+hostip=10.10.10.10
+interface=usb0
+port=6666
+
+echo "Please connect the the OTG port of the Odroid to your host PC"
+echo "Power on the Odroid"
+echo ""
+while [ 1 ];
+do
+ good=`ifconfig $interface 2> /dev/null | grep $hostip | wc -l`
+ if [ "$good" = "1" ];
+ then
+ echo "Board Connectivity established - Enjoy netconsole over CDC ETH"
+ echo "--------------------------------------------------------------"
+ break;
+ fi
+ sleep 1
+done
+
+trap "stty icanon echo intr ^C" 0 2 3 5 10 13 15
+echo "NOTE: the interrupt signal (normally ^C) has been remapped to ^T"
+
+stty -icanon -echo intr ^T
+(
+ nc -u -p $port $boardip $port
+)
+pid=$!
+kill ${pid} 2>/dev/null