Skip to content

Commit

Permalink
boot-jtag.py: Remove stale imports
Browse files Browse the repository at this point in the history
Based on github Pull Request #61.

1. `yaml` is imported but not used. This may cause issues as `yaml`
  is not a standard library module.
2. Remove trailing newlines.

Signed-off-by: Alain Péteut <[email protected]>

Update commit message and added PR number in commit message.

Also update import list order.

Signed-off-by: Sandeep Gundlupet Raju <[email protected]>
Signed-off-by: Mark Hatle <[email protected]>
  • Loading branch information
peteut authored and mhatle committed Jun 20, 2024
1 parent f2d63bc commit f42c4f6
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions meta-xilinx-core/lib/devtool/boot-jtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
# 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
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 @@ -258,19 +255,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 f42c4f6

Please sign in to comment.