Skip to content

Commit

Permalink
fpgasupdate: fix PR on boards without BMC interface.
Browse files Browse the repository at this point in the history
Refactor code so that Partial Reconfiguration (PR) can be done
with the fpgasupdate command on boards without an interface
to an on-board Board Management Controller (BMC).

Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
  • Loading branch information
matthew-gerlach authored and fpgamatt committed Feb 13, 2024
1 parent f3e8c18 commit 71ac166
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/opae.admin/opae/admin/tools/fpgasupdate.py
Expand Up @@ -813,11 +813,6 @@ def main():
LOG.error('PR interface uuid mismatch.')
sys.exit(1)

# Check for 'update/filename' to determine if we use sysfs or ioctl
if (pac.upload_dev.find_one(os.path.join('update', 'filename')) or
pac.upload_dev.find_one('loading')):
use_ioctl = False

# The BMC disallows updating the factory image if the current boot-page is also 'factory'.
# The idea is to always have at least one known-good image in the flash so that
# you can recover from subsequent bad images.
Expand Down Expand Up @@ -863,6 +858,11 @@ def main():
stat, mesg = do_partial_reconf(pac.pci_node.pci_address,
args.file.name)
elif blk0 is not None:
# Check for 'update/filename' to determine if we use sysfs or ioctl
if (pac.upload_dev.find_one(os.path.join('update', 'filename')) or
pac.upload_dev.find_one('loading')):
use_ioctl = False

sec_dev = pac.upload_dev
if not sec_dev:
LOG.error('Failed to find secure '
Expand Down

0 comments on commit 71ac166

Please sign in to comment.