mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-26 19:58:25 +08:00
frontend: make coremgmt flash zynq-compatible
This commit is contained in:
parent
2b73d5a4c6
commit
5c21649d10
@ -208,6 +208,7 @@ class CommMgmt:
|
||||
for filename in bin_paths:
|
||||
with open(filename, "rb") as fi:
|
||||
bin_ = fi.read()
|
||||
if (len(bin_paths) > 1):
|
||||
image_buf.write(struct.pack(self.endian + "I", len(bin_)))
|
||||
image_buf.write(bin_)
|
||||
|
||||
|
@ -94,6 +94,9 @@ def get_argparser():
|
||||
t_flash = tools.add_parser("flash",
|
||||
help="flash the running system")
|
||||
|
||||
p_zynq = t_flash.add_argument("-z", "--zynq", default=False,
|
||||
help="target zynq device", action="store_true")
|
||||
|
||||
p_directory = t_flash.add_argument("directory", metavar="DIRECTORY", type=str,
|
||||
help="directory that contains the binaries")
|
||||
|
||||
@ -160,6 +163,10 @@ def main():
|
||||
mgmt.config_erase()
|
||||
|
||||
if args.tool == "flash":
|
||||
if args.zynq:
|
||||
boot = os.path.join(args.directory, "boot.bin")
|
||||
bins = [ boot ]
|
||||
else:
|
||||
def artifact_path(this_binary_dir, *path_filename):
|
||||
if args.srcbuild:
|
||||
# source tree - use path elements to locate file
|
||||
@ -194,6 +201,7 @@ def main():
|
||||
firmware = firmwares[0]
|
||||
|
||||
bins = [ gateware, bootloader, firmware ]
|
||||
|
||||
mgmt.flash(bins)
|
||||
|
||||
if args.tool == "reboot":
|
||||
|
Loading…
Reference in New Issue
Block a user