summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-10-08 11:42:50 -0600
committerStephen Warren <swarren@nvidia.com>2015-10-08 11:45:23 -0600
commit890f6911cae7ea3c40140d8704584c36635ad39e (patch)
tree916837346de760c4f3fdc70930940307658d8c83
parent9e89de7bfce3459bade593424d9760b9972c0463 (diff)
downloadtegra-uboot-flasher-scripts-890f6911cae7ea3c40140d8704584c36635ad39e.tar.gz
Add support for tegrarcm's --usb-port-path cmdline option
This allows the user to specify which USB device to operate on. See the related tegrarcm commit for a full description of this option and how to calculate the required option value. An example is: ./tegra-uboot-flasher exec --usb-port-path 3-10.5 jetson-tk1 Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rwxr-xr-xtegra-uboot-flasher7
1 files changed, 6 insertions, 1 deletions
diff --git a/tegra-uboot-flasher b/tegra-uboot-flasher
index d20e3ad..3a77a8b 100755
--- a/tegra-uboot-flasher
+++ b/tegra-uboot-flasher
@@ -93,7 +93,10 @@ def get_loadaddr():
def gen_tegrarcm_cmd(bootloader, loadaddr):
if type(loadaddr) != str:
loadaddr = "0x%08x" % loadaddr
- return ['tegrarcm', '--bct=' + bct, '--bootloader=' + bootloader , '--loadaddr=' + loadaddr]
+ cmd = ['tegrarcm', '--bct=' + bct, '--bootloader=' + bootloader , '--loadaddr=' + loadaddr]
+ if args.usb_port_path:
+ cmd.extend(['--usb-port-path', args.usb_port_path])
+ return cmd
def find_config_dir():
if not configs.has_key(args.configname):
@@ -326,6 +329,8 @@ parser_exec.add_argument('--loadaddr', type=str,
help='Load address for the bootloader binary')
for p in (parser_flash, parser_exec):
+ p.add_argument('--usb-port-path', metavar='USBPORTPATH', type=str,
+ help='The USB port path of the Tegra device')
p.add_argument('configname', metavar='CONFIG', type=str,
help='The configuration name of the board')