diff options
-rw-r--r-- | meta-xilinx-core/lib/devtool/boot-jtag.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/meta-xilinx-core/lib/devtool/boot-jtag.py b/meta-xilinx-core/lib/devtool/boot-jtag.py index 247851ec..f9c298e8 100644 --- a/meta-xilinx-core/lib/devtool/boot-jtag.py +++ b/meta-xilinx-core/lib/devtool/boot-jtag.py | |||
@@ -8,12 +8,9 @@ | |||
8 | # yocto generated images on HW via jtag boot mode. | 8 | # yocto generated images on HW via jtag boot mode. |
9 | 9 | ||
10 | import os | 10 | import os |
11 | import logging | ||
12 | import argparse | ||
13 | from devtool import setup_tinfoil, parse_recipe, DevtoolError | ||
14 | import yaml | ||
15 | import sys | ||
16 | import glob | 11 | import glob |
12 | import logging | ||
13 | from devtool import setup_tinfoil | ||
17 | 14 | ||
18 | logger = logging.getLogger('devtool') | 15 | logger = logging.getLogger('devtool') |
19 | 16 | ||
@@ -24,8 +21,8 @@ def bootjtag(args, config, basepath, workspace): | |||
24 | print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal') | 21 | print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal') |
25 | return | 22 | return |
26 | 23 | ||
27 | # Get required boot variables | ||
28 | tinfoil = setup_tinfoil(basepath=basepath) | 24 | tinfoil = setup_tinfoil(basepath=basepath) |
25 | # Get required boot variables | ||
29 | try: | 26 | try: |
30 | rd = tinfoil.parse_recipe('u-boot-xlnx-scr') | 27 | rd = tinfoil.parse_recipe('u-boot-xlnx-scr') |
31 | deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE') | 28 | deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE') |
@@ -258,19 +255,19 @@ def bootjtag(args, config, basepath, workspace): | |||
258 | 255 | ||
259 | def register_commands(subparsers, context): | 256 | def register_commands(subparsers, context): |
260 | """Register devtool subcommands from this plugin""" | 257 | """Register devtool subcommands from this plugin""" |
261 | parser_bootjtag = subparsers.add_parser('boot-jtag', | 258 | parser_bootjtag = subparsers.add_parser('boot-jtag', |
262 | help='Script to deploy target images on HW via JTAG boot mode.', | 259 | help='Script to deploy target images on HW via JTAG boot mode.', |
263 | description='Script to deploy target images on HW via JTAG boot mode. \ | 260 | description='Script to deploy target images on HW via JTAG boot mode. \ |
264 | Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}') | 261 | Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}') |
265 | required = parser_bootjtag.add_argument_group('required arguments') | 262 | required = parser_bootjtag.add_argument_group('required arguments') |
266 | required.add_argument('--image', | 263 | required.add_argument('--image', |
267 | help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal') | 264 | help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal') |
268 | parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121', | 265 | parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121', |
269 | help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \ | 266 | help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \ |
270 | Example: --hw_server TCP:puffball12:3121') | 267 | Example: --hw_server TCP:puffball12:3121') |
271 | 268 | ||
272 | parser_bootjtag.add_argument('-v', '--verbose', | 269 | parser_bootjtag.add_argument('-v', '--verbose', |
273 | help='verbose mode', action="store_true") | 270 | help='verbose mode', action="store_true") |
274 | parser_bootjtag.add_argument('-n', '--norootfs', | 271 | parser_bootjtag.add_argument('-n', '--norootfs', |
275 | help='Don\'t include rootfs', action='store_true') | 272 | help='Don\'t include rootfs', action='store_true') |
276 | parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True) | 273 | parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True) |