utils: introduce find_usbdebug.sh to help find USB debug ports
commit47d6663bba233014dc6d418b94ad6161751f2176
authorStefan Tauner <stefan.tauner@gmx.at>
Mon, 2 May 2016 21:16:57 +0000 (2 23:16 +0200)
committerPatrick Georgi <pgeorgi@google.com>
Wed, 19 Dec 2018 10:21:32 +0000 (19 10:21 +0000)
treeef0dd9194c847142522ac74f7a952a25edbd8dde
parent43825e89607db06ac96926ab9872887980fb2ad3
utils: introduce find_usbdebug.sh to help find USB debug ports

Carl-Daniel made this script a long time ago but it never was picked up
in the tree. Now that USB debugging is way more common it makes
sense to include it.

I have made a number of changes to the original version:
* -h help text
* check for running as root
* enhanced readability (test -> if)
* new execution flow and refined output that better shows the device(s)
  attached to the debug port(s)
* handling of Intel rate-matching hubs
* hiding of (bogus) error messages from lspci and lsusb

Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at>
Change-Id: Iadf775e990f5c5f91a28d57e3331d1f59acee305
Reviewed-on: https://review.coreboot.org/c/9305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Documentation/util.md
util/README.md
util/find_usbdebug/description.md [new file with mode: 0644]
util/find_usbdebug/find_usbdebug.sh [new file with mode: 0755]