diff options
| author | Tom Rini <[email protected]> | 2021-12-02 07:16:04 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-12-02 07:16:04 -0500 |
| commit | f89615088fba1b1f33713ad26dbe3a3c82b692ec (patch) | |
| tree | f25c7d1f07c5f518b14babab50ebe0f61e276ab0 /tools | |
| parent | cdccb39e37ba5b43dcae4e783c15f0471acf5529 (diff) | |
| parent | 300761b68da14fc77f3e236f35c459fb1a6769ce (diff) | |
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net into next
- New Broadcom NetXtreme driver
- Support for socat for netconsole
- Felix switch soft reset fix
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/netconsole | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/netconsole b/tools/netconsole index 1a0ef22244e..155453320f7 100755 --- a/tools/netconsole +++ b/tools/netconsole @@ -34,7 +34,7 @@ if [ -z "${ip}" ] || [ -n "$4" ] ; then usage "Invalid number of arguments" fi -for nc in netcat nc ; do +for nc in socat netcat nc ; do type ${nc} >/dev/null 2>&1 && break done @@ -47,6 +47,10 @@ if type ncb 2>/dev/null ; then # see if ncb is in $PATH exec ncb ${board_out_port} +elif [ "${nc}" = "socat" ] ; then + # socat does support broadcast + while ${nc} STDIO "UDP4-LISTEN:${board_out_port}"; do :; done + elif [ -x ${0%/*}/ncb ] ; then # maybe it's in the same dir as the netconsole script exec ${0%/*}/ncb ${board_out_port} @@ -59,5 +63,9 @@ else fi ) & pid=$! -${nc} -u ${ip} ${board_in_port} +if [ "${nc}" = "socat" ] ; then + ${nc} - "UDP4:${ip}:${board_in_port}" +else + ${nc} -u ${ip} ${board_in_port} +fi kill ${pid} 2>/dev/null |
