Skip to content

Commit

Permalink
devtool: remove stale imports, cleanup.
Browse files Browse the repository at this point in the history
* `yaml` is imported but not used. This may cause issues as `yaml`
  is not a standard library module.
* Remove trailing newlines.
  • Loading branch information
peteut committed Jun 18, 2024
1 parent 62523c2 commit 351e15b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions meta-xilinx-core/lib/devtool/boot-jtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
# ${DEPLOY_DIR_IMAGE} directory. This script is executed by xsdb tool to boot
# yocto generated images on HW via jtag boot mode.

import os
import logging
import argparse
from devtool import setup_tinfoil, parse_recipe, DevtoolError
import yaml
import sys
import glob
import logging
import os
from devtool import setup_tinfoil

logger = logging.getLogger('devtool')

Expand All @@ -24,8 +21,8 @@ def bootjtag(args, config, basepath, workspace):
print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal')
return

# Get required boot variables
tinfoil = setup_tinfoil(basepath=basepath)
# Get required boot variables
try:
rd = tinfoil.parse_recipe('u-boot-xlnx-scr')
deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE')
Expand Down Expand Up @@ -254,19 +251,19 @@ def bootjtag(args, config, basepath, workspace):

def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
parser_bootjtag = subparsers.add_parser('boot-jtag',
parser_bootjtag = subparsers.add_parser('boot-jtag',
help='Script to deploy target images on HW via JTAG boot mode.',
description='Script to deploy target images on HW via JTAG boot mode. \
Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}')
required = parser_bootjtag.add_argument_group('required arguments')
required.add_argument('--image',
required.add_argument('--image',
help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal')
parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121',
help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \
Example: --hw_server TCP:puffball12:3121')

parser_bootjtag.add_argument('-v', '--verbose',
parser_bootjtag.add_argument('-v', '--verbose',
help='verbose mode', action="store_true")
parser_bootjtag.add_argument('-n', '--norootfs',
parser_bootjtag.add_argument('-n', '--norootfs',
help='Don\'t include rootfs', action='store_true')
parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True)

0 comments on commit 351e15b

Please sign in to comment.