diff --git a/nebula/helper.py b/nebula/helper.py index 137987a..27f0479 100644 --- a/nebula/helper.py +++ b/nebula/helper.py @@ -1,7 +1,10 @@ import glob +import json import logging import os import pathlib +import re +from functools import partial import click import netifaces @@ -77,6 +80,16 @@ def get_nics(): return (str, default) +def project_filter(project_dict, filters): + match = True + for k, v in filters.items(): + if k in project_dict.keys(): + if not project_dict[k] == v: + match = False + break + return match + + class helper: def __init__(self): pass @@ -342,3 +355,172 @@ def _write_config_file(self, filename, outconfig): file1 = open(filename, "w") file1.writelines(lines) file1.close() + + def get_boot_files_from_descriptor(self, descriptor_file, project): + """ + Extracts the project bootfiles defined on the kuiper desctriptor file. + i.e kuiper.json + """ + + boot_files = ( + list() + ) # contains all files needed to be moved to the boot partition + + common_architectures = [ + ("arria10_", "arria10"), + ("cyclone5_", "cyclone5"), + ("zynq-", "zynq"), + ("zynq-", "zynq"), + ("zynqmp-", "zynqmp"), + ("versal-", "versal"), + ] + common_boards = [ + ("socdk_", "socdk"), + ("de10_nano_", "de10nano"), + ("sockit_", "sockit"), + ("coraz7s-", "coraz7s"), + ("zc702-", "zc702"), + ("zc706-", "zc706"), + ("zed-", "zed"), + ("zcu102-", "zcu102"), + ("adrv9009-zu11eg-", "adrv9009zu11eg_adrv2crr"), + ("vck190-", "vck190"), + ("-bob", "ccbob"), + ("z7035-fmc", "ccfmc"), + ("z7035-packrf", "ccpackrf"), + ("z7020-packrf", "ccpackrf"), + ] + common_names = [ + ("ad9081$", "ad9081"), + ("adv7511$", "adv7511"), + ("ad9695", "ad9695"), + ("ad9783", "ad9783"), + ("adrv9002$", "adrv9002"), + ("adrv9009", "adrv9009"), + ("adrv9371", "adrv9371"), + ("adrv9375", "adrv9375"), + ("cn0540", "cn0540"), + ("cn0579", "cn0579"), + ("_daq2", "daq2"), + ("fmcdaq2", "daq2"), + ("fmcdaq3", "daq3"), + ("fmcadc2", "fmcadc2"), + ("fmcadc3", "fmcadc3"), + ("fmcjesdadc1", "fmcjesdadc1"), + ("fmcomms11", "fmcomms11"), + ("fmcomms2", "fmcomms2"), + ("fmcomms3", "fmcomms3"), + ("fmcomms4", "fmcomms4"), + ("fmcomms5", "fmcomms5"), + ("fmcomms8", "fmcomms8"), + ("cn0501", "cn0501"), + ("ad4020", "ad4020"), + ("cn0363", "cn0363"), + ("cn0577", "cn0577"), + ("imageon", "imageon"), + ("ad4630-24", "ad4630_fmc"), + ("ad7768-axi-adc", "ad7768"), + ("ad7768-1-evb", "ad77681_evb"), + ("ad7768-4-axi-adc", "ad7768-4"), + ("adaq8092", "adaq8092"), + ("socdk_fmclidar1", "ad_fmclidar1_ebz"), + ("adv7511-fmclidar1", "ad_fmclidar1_ebz"), + ("rev10-fmclidar1", "fmclidar"), + ("adrv9002[-_]rx2tx2", "adrv9002_rx2tx2"), + ("cn0506[-_]mii", "cn0506_mii"), + ("cn0506[-_]rgmii", "cn0506_rgmii"), + ("cn0506[-_]rmii", "cn0506_rmii"), + ("ad6676-fmc", "ad6676evb"), + ("ad9265-fmc-125ebz", "ad9265_fmc"), + ("ad9434-fmc", "ad9434_fmc"), + ("ad9739a-fmc", "ad9739a_fmc"), + ("adrv9008-1", "adrv9008-1"), + ("adrv9008-2", "adrv9008-2"), + ("ad9172-fmc-ebz", "ad9172_fmc"), + ("fmcomms5-ext-lo-adf5355", "fmcomms5-ext-lo-adf5355"), + ("z7035-bob-vcmos", "adrv9361z7035_cmos"), + ("z7035-bob-vlvds", "adrv9361z7035_lvds"), + ("z7020-bob-vcmos", "adrv9364z7020_cmos"), + ("z7020-bob-vlvds", "adrv9364z7020_lvds"), + ("z7035-fmc", "adrv9361z7035_lvds"), + ("z7035-packrf", "adrv9361z7035_lvds"), + ("z7020-packrf", "adrv9364z7020_lvds"), + ("ad9467-fmc-250ebz", "ad9467-fmc"), + ("otg", "adv7511_without_bitstream"), + ("hps", "de10nano_without_bitfile"), + ("adrv2crr-fmc-revb", "adrv9009zu11eg_adrv2crr"), + ("multisom-primary", "multisom-primary"), + ("multisom-secondary", "multisom-secondary"), + ("fmcomms8-multisom-primary", "fmcomms8_multisom_primary"), + ("fmcomms8-multisom-secondary", "fmcomms8_multisom_secondary"), + ("xmicrowave", "xmicrowave"), + ("ad9081-vm8-l4", "ad9081_m8_l4"), + ("ad9081-vm4-l8", "ad9081_m4_l8"), + ("ad9081[-_]vnp12", "ad9081_np12"), + ("ad9081-vm8-l4-vcxo122p88", "ad9081_m8_l4_vcxo122p88"), + ("ad9081-v204b-txmode9-rxmode4", "ad9081_204b_txmode9_rxmode4"), + ("ad9081-v204c-txmode0-rxmode1", "ad9081_204c_txmode0_rxmode1"), + ("ad9082-m4-l8", "ad9082_m4_l8"), + ("ad9082$", "ad9082"), + ("ad9083-fmc-ebz", "ad9083"), + ("adrv9008-1", "adrv9008-1"), + ("adrv9008-2", "adrv9008-2"), + ("adv7511-adrv9002-vcmos", "adrv9002"), + ("rev10-adrv9002-vcmos", "adrv9002_cmos"), + ("rev10-adrv9002-vlvds", "adrv9002_lvds"), + ("adv7511-adrv9002-rx2tx2-vcmos", "adrv9002_rx2tx2"), + ("rev10-adrv9002-rx2tx2-vcmos", "adrv9002_rx2tx2_cmos"), + ("rev10-adrv9002-rx2tx2-vlvds", "adrv9002_rx2tx2_lvds"), + ("ad9172-fmc-ebz-mode4", "ad9172_mode4"), + ("arradio", "sockit_arradio"), + ("adrv9025", "adrv9025"), + ] + + with open(descriptor_file, "r") as f: + descriptor = json.load(f) + + assert descriptor + + # for platform in + + p_architecture = None + p_board = None + p_name = None + + for ar in common_architectures: + if re.search(ar[0], project): + p_architecture = ar[1] + + for br in common_boards: + if re.search(br[0], project): + p_board = br[1] + + for pn in common_names: + if re.search(pn[0], project): + p_name = pn[1] + + projects = descriptor["projects"] + + # filter project + if project: + filter_dict = dict( + {"architecture": p_architecture, "board": p_board, "name": p_name} + ) + projects = filter(partial(project_filter, filters=filter_dict), projects) + + for project in projects: + # if not project['kernel'] in [ bt[1] for bt in boot_files]: + # boot_files.append((project['name'],project['kernel'])) + boot_files.append((project["name"], project["kernel"])) + if "preloader" in project: + boot_files.append((project["name"], project["preloader"])) + files = project["files"] + for f in files: + boot_files.append((project["name"], f["path"])) + + # check if project is supported + log.info("path:" + str(boot_files)) + if not boot_files: + raise Exception("Project not supported in this nebula version.") + + return boot_files diff --git a/nebula/manager.py b/nebula/manager.py index ca906f1..b5a72f2 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -431,17 +431,19 @@ def board_reboot_uart_net_pdu( extlinux_path=None, scr_path=None, preloader_path=None, + sdcard=False, ): """Manager when UART, PDU, and Network are available""" - self._check_files_exist( - system_top_bit_path, - bootbinpath, - uimagepath, - devtreepath, - extlinux_path, - scr_path, - preloader_path, - ) + if not sdcard: + self._check_files_exist( + system_top_bit_path, + bootbinpath, + uimagepath, + devtreepath, + extlinux_path, + scr_path, + preloader_path, + ) try: # Flush UART self.monitor[0]._read_until_stop() # Flush @@ -475,14 +477,17 @@ def board_reboot_uart_net_pdu( # Update board over SSH and reboot log.info("Update board over SSH and reboot") - self.net.update_boot_partition( - bootbinpath=bootbinpath, - uimagepath=uimagepath, - devtreepath=devtreepath, - extlinux_path=extlinux_path, - scr_path=scr_path, - preloader_path=preloader_path, - ) + if sdcard: + self.net.update_boot_partition_existing_files(self.board_name) + else: + self.net.update_boot_partition( + bootbinpath=bootbinpath, + uimagepath=uimagepath, + devtreepath=devtreepath, + extlinux_path=extlinux_path, + scr_path=scr_path, + preloader_path=preloader_path, + ) log.info("Waiting for reboot to complete") # Verify uboot anad linux are reached @@ -550,6 +555,7 @@ def board_reboot_sdmux_pdu( extlinux_path=None, scr_path=None, preloader_path=None, + sdcard=False, ): """Manager when sdcardmux, pdu is available""" @@ -585,16 +591,19 @@ def board_reboot_sdmux_pdu( ) log.info("Update board over usb-sd-mux") - self.usbsdmux.update_boot_files_from_external( - bootbin_loc=bootbinpath, - kernel_loc=uimagepath, - devicetree_loc=devtreepath, - devicetree_overlay_loc=devtree_overlay_path, - devicetree_overlay_config_loc=devtree_overlay_config_path, - extlinux_loc=extlinux_path, - scr_loc=scr_path, - preloader_loc=preloader_path, - ) + if sdcard: + self.usbsdmux.update_boot_files_from_sdcard_itself() + else: + self.usbsdmux.update_boot_files_from_external( + bootbin_loc=bootbinpath, + kernel_loc=uimagepath, + devicetree_loc=devtreepath, + devicetree_overlay_loc=devtree_overlay_path, + devicetree_overlay_config_loc=devtree_overlay_config_path, + extlinux_loc=extlinux_path, + scr_loc=scr_path, + preloader_loc=preloader_path, + ) # if devtreepath: # self.usbsdmux.update_devicetree_for_mux(devtreepath) self.usbsdmux.set_mux_mode("dut") @@ -822,6 +831,7 @@ def board_reboot_auto_folder( system_top_bit_path=bit, uimagepath=kernel, devtreepath=dt, + sdcard=sdcard, ) else: self.board_reboot_auto( @@ -873,6 +883,7 @@ def board_reboot_auto( extlinux_path=extlinux_path, scr_path=scr_path, preloader_path=preloader_path, + sdcard=sdcard, ) else: raise Exception("SD Card Mux not Supported") @@ -887,6 +898,7 @@ def board_reboot_auto( extlinux_path=extlinux_path, scr_path=scr_path, preloader_path=preloader_path, + sdcard=sdcard, ) def shutdown_powerdown_board(self): diff --git a/nebula/network.py b/nebula/network.py index 14f3404..d0afc3c 100644 --- a/nebula/network.py +++ b/nebula/network.py @@ -12,6 +12,7 @@ from fabric import Connection import nebula.errors as ne +import nebula.helper as helper from nebula.common import utils log = logging.getLogger(__name__) @@ -272,20 +273,42 @@ def update_boot_partition_existing_files(self, subfolder=None): log.info("Updating boot files over SSH from SD card itself") if not subfolder: raise Exception("Must provide a subfolder") - self.run_ssh_command("mkdir /tmp/sdcard") - self.run_ssh_command("mount /dev/mmcblk0p1 /tmp/sdcard") - self.run_ssh_command("cp /tmp/sdcard/" + subfolder + "/BOOT.BIN /tmp/sdcard/") - if "zynqmp" in subfolder: - self.run_ssh_command("cp /tmp/sdcard/zynqmp-common/Image /tmp/sdcard/") - self.run_ssh_command( - "cp /tmp/sdcard/" + subfolder + "/system.dtb /tmp/sdcard/" - ) + log.info("Updating boot files over SSH") + try: + self.run_ssh_command("ls /tmp/sdcard", retries=1) + dir_exists = True + except Exception: + log.info("Existing /tmp/sdcard directory not found. Will need to create it") + dir_exists = False + if dir_exists: + try: + log.info("Trying to unmounting directory") + self.run_ssh_command("umount /tmp/sdcard", retries=1) + except Exception: + log.info("Unmount failed... Likely not mounted") + pass else: - self.run_ssh_command("cp /tmp/sdcard/zynq-common/uImage /tmp/sdcard/") - self.run_ssh_command( - "cp /tmp/sdcard/" + subfolder + "/devicetree.dtb /tmp/sdcard/" - ) - self.run_ssh_command("sudo reboot") + self.run_ssh_command("mkdir /tmp/sdcard", retries=1) + + self.run_ssh_command("mount /dev/mmcblk0p1 /tmp/sdcard") + + # extract needed boot files from the kuiper descriptor file + h = helper() + path = pathlib.Path(__file__).parent.absolute() + descriptor_path = os.path.join(path, "resources", "kuiper.json") + try: + self._dl_file("/tmp/sdcard/kuiper.json") + descriptor_path = "kuiper.json" + except Exception: + log.warning("Cannot find project descriptor on target") + + boot_files_path = h.get_boot_files_from_descriptor(descriptor_path, subfolder) + + for boot_file in boot_files_path: + log.info(f"Copying {boot_file[1]}") + self.run_ssh_command(f"cp {boot_file[1]} /tmp/sdcard/") + + self.run_ssh_command("sudo reboot", ignore_exceptions=True) def _dl_file(self, filename): fabric.Connection( diff --git a/nebula/resources/kuiper.json b/nebula/resources/kuiper.json new file mode 100755 index 0000000..a61bd8b --- /dev/null +++ b/nebula/resources/kuiper.json @@ -0,0 +1,1940 @@ +{ + "version": "0.1.0", + "platforms": [ + { + "platform": "intel", + "architectures": [ + { + "architecture": "arria10", + "boards": [ + { + "board" : "socdk" + } + ] + }, + { + "architecture": "cyclone5", + "boards": [ + { + "board" : "de10nano" + }, + { + "board" : "sockit" + } + ] + } + ] + }, + { + "platform": "xilinx", + "architectures": [ + { + "architecture": "zynq", + "boards": [ + { + "board" : "coraz7s" + }, + { + "board" : "zc702" + }, + { + "board" : "zc706" + }, + { + "board" : "zed" + }, + { + "board" : "ccbob" + }, + { + "board" : "ccfmc" + } + ] + }, + { + "architecture": "zynqmp", + "boards": [ + { + "board" : "zcu102" + }, + { + "board" : "adrv9009zu11eg_adrv2crr" + } + ] + }, + { + "architecture": "versal", + "boards": [ + { + "board" : "vck190" + } + ] + } + ] + }, + { + "platform": "rpi", + "architectures": [ + { + "architecture": "arm64", + "boards": [ + { + "board": "rpi3" + }, + { + "board": "rpi3b" + }, + { + "board": "rpi4" + } + ] + } + ] + } + ], + + "projects": [ + { + "name": "daq2", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_daq2/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_daq2/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_daq2/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_daq2/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "ad9081", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_ad9081/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_ad9081/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_ad9081/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_ad9081/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "ad9081_np12", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_ad9081/np12/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_ad9081/np12/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_ad9081/np12/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_ad9081/np12/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "adrv9002_rx2tx2", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_adrv9002/socfpga_arria10_socdk_adrv9002_rx2tx2/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_adrv9002/socfpga_arria10_socdk_adrv9002_rx2tx2/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9002/socfpga_arria10_socdk_adrv9002_rx2tx2/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9002/socfpga_arria10_socdk_adrv9002_rx2tx2/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "adrv9002", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_adrv9002/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_adrv9002/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9002/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9002/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "adrv9009", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_adrv9009/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_adrv9009/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9009/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9009/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "adrv9371", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_adrv9371/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_adrv9371/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9371/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_adrv9371/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "fmcomms8", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_fmcomms8/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_fmcomms8/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_fmcomms8/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_fmcomms8/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" + } + ] + }, + { + "name": "cn0540", + "platform": "intel", + "architecture": "cyclone5", + "board": "de10nano", + "kernel": "/boot/socfpga_cyclone5_common/zImage", + "preloader": "/boot/socfpga_cyclone5_de10_nano_cn0540/u-boot-with-spl.sfp", + "files": [ + { + "path": "/boot/socfpga_cyclone5_de10_nano_cn0540/soc_system.rbf" + }, + { + "path": "/boot/socfpga_cyclone5_de10_nano_cn0540/socfpga.dtb" + }, + { + "path": "/boot/socfpga_cyclone5_de10_nano_cn0540/u-boot.scr" + }, + { + "path": "/boot/socfpga_cyclone5_common/extlinux.conf" + } + ] + }, + { + "name": "cn0579", + "platform": "intel", + "architecture": "cyclone5", + "board": "de10nano", + "kernel": "/boot/socfpga_cyclone5_common/zImage", + "preloader": "/boot/socfpga_cyclone5_de10_nano_cn0579_i2c/u-boot-with-spl.sfp", + "files": [ + { + "path": "/boot/socfpga_cyclone5_de10_nano_cn0579_i2c/soc_system.rbf" + }, + { + "path": "/boot/socfpga_cyclone5_de10_nano_cn0579_i2c/socfpga.dtb" + }, + { + "path": "/boot/socfpga_cyclone5_de10_nano_cn0579_i2c/u-boot.scr" + }, + { + "path": "/boot/socfpga_cyclone5_common/extlinux.conf" + } + ] + }, + { + "name": "de10nano_without_bitfile", + "platform": "intel", + "architecture": "cyclone5", + "board": "de10nano", + "kernel": "/boot/socfpga_cyclone5_common/zImage", + "preloader": "/boot/socfpga_cyclone5_de10_nano_hps/u-boot-with-spl.sfp", + "files": [ + { + "path": "/boot/socfpga_cyclone5_de10_nano_hps/soc_system.rbf" + }, + { + "path": "/boot/socfpga_cyclone5_de10_nano_hps/socfpga.dtb" + }, + { + "path": "/boot/socfpga_cyclone5_de10_nano_hps/u-boot.scr" + }, + { + "path": "/boot/socfpga_cyclone5_common/extlinux.conf" + } + ] + }, + { + "name": "sockit_arradio", + "platform": "intel", + "architecture": "cyclone5", + "board": "sockit", + "kernel": "/boot/socfpga_cyclone5_common/zImage", + "preloader": "/boot/socfpga_cyclone5_sockit_arradio/u-boot-with-spl.sfp", + "files": [ + { + "path": "/boot/socfpga_cyclone5_sockit_arradio/soc_system.rbf" + }, + { + "path": "/boot/socfpga_cyclone5_sockit_arradio/socfpga.dtb" + }, + { + "path": "/boot/socfpga_cyclone5_sockit_arradio/u-boot.scr" + }, + { + "path": "/boot/socfpga_cyclone5_common/extlinux.conf" + } + ] + }, + { + "name": "ad6676evb", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad6676-fmc/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad6676-fmc/devicetree.dtb" + } + ] + }, + { + "name": "ad9081", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9081/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9081/devicetree.dtb" + } + ] + }, + { + "name": "ad9082", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9082/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9082/devicetree.dtb" + } + ] + }, + { + "name": "ad9081_np12", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9081/np12/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9081/np12/devicetree.dtb" + } + ] + }, + { + "name": "adrv9002", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv9002/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv9002/zynq-zc706-adv7511-adrv9002/devicetree.dtb" + } + ] + }, + { + "name": "adrv9002_rx2tx2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv9002/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv9002/zynq-zc706-adv7511-adrv9002-rx2tx2/devicetree.dtb" + } + ] + }, + { + "name": "adrv9009", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv9009/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv9009/devicetree.dtb" + } + ] + }, + { + "name": "adrv9008-1", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv9008-1-2/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv9008-1-2/zynq-zc706-adv7511-adrv9008-1/devicetree.dtb" + } + ] + }, + { + "name": "adrv9008-2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv9008-1-2/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv9008-1-2/zynq-zc706-adv7511-adrv9008-2/devicetree.dtb" + } + ] + }, + { + "name": "adrv9371", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv937x/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv937x/zynq-zc706-adv7511-adrv9371/devicetree.dtb" + } + ] + }, + { + "name": "adrv9375", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-adrv937x/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-adrv937x/zynq-zc706-adv7511-adrv9375/devicetree.dtb" + } + ] + }, + { + "name": "cn0506_mii", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-cn0506-mii/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-cn0506-mii/devicetree.dtb" + } + ] + }, + { + "name": "cn0506_rgmii", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-cn0506-rgmii/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-cn0506-rgmii/devicetree.dtb" + } + ] + }, + { + "name": "cn0506_rmii", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-cn0506-rmii/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-cn0506-rmii/devicetree.dtb" + } + ] + }, + { + "name": "ad9172_fmc", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9172-fmc-ebz/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9172-fmc-ebz/devicetree.dtb" + } + ] + }, + { + "name": "daq2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-fmcdaq2/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-fmcdaq2/devicetree.dtb" + } + ] + }, + { + "name": "daq3", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-fmcdaq3-revC/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-fmcdaq3-revC/devicetree.dtb" + } + ] + }, + { + "name": "fmcadc3", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9625-fmcadc3/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9625-fmcadc3/devicetree.dtb" + } + ] + }, + { + "name": "fmcjesdadc1", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-fmcjesdadc1/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-fmcjesdadc1/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms11", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-fmcomms11/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-fmcomms11/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad936x-fmcomms2-3-4/zynq-zc706-adv7511-ad9361-fmcomms2-3/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms3", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad936x-fmcomms2-3-4/zynq-zc706-adv7511-ad9361-fmcomms2-3/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms4", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad936x-fmcomms2-3-4/zynq-zc706-adv7511-ad9364-fmcomms4/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms5", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9361-fmcomms5/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9361-fmcomms5/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms5-ext-lo-adf5355", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9361-fmcomms5-ext-lo-adf5355/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9361-fmcomms5-ext-lo-adf5355/devicetree.dtb" + } + ] + }, + { + "name": "adv7511", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511/devicetree.dtb" + } + ] + }, + { + "name": "adv7511", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc702", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc702-adv7511/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc702-adv7511/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc702", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc702-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc702-adv7511-ad936x-fmcomms2-3-4/zynq-zc702-adv7511-ad9361-fmcomms2-3/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms3", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc702", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc702-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc702-adv7511-ad936x-fmcomms2-3-4/zynq-zc702-adv7511-ad9361-fmcomms2-3/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms4", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc702", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc702-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc702-adv7511-ad936x-fmcomms2-3-4/zynq-zc702-adv7511-ad9364-fmcomms4/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms5", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc702", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc702-adv7511-ad9361-fmcomms5/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc702-adv7511-ad9361-fmcomms5/devicetree.dtb" + } + ] + }, + { + "name": "adrv9361z7035_cmos", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccbob", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9361-z7035-bob/cmos/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9361-z7035-bob/cmos/devicetree.dtb" + } + ] + }, + { + "name": "adrv9361z7035_lvds", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccbob", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9361-z7035-bob/lvds/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9361-z7035-bob/lvds/devicetree.dtb" + } + ] + }, + { + "name": "adrv9364z7020_cmos", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccbob", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9364-z7020-bob/cmos/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9364-z7020-bob/cmos/devicetree.dtb" + } + ] + }, + { + "name": "adrv9364z7020_lvds", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccbob", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9364-z7020-bob/lvds/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9364-z7020-bob/lvds/devicetree.dtb" + } + ] + }, + { + "name": "adrv9361z7035_lvds", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccfmc", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9361-z7035-fmc/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9361-z7035-fmc/devicetree.dtb" + } + ] + }, + { + "name": "cn0579", + "platform": "xilinx", + "architecture": "zynq", + "board": "coraz7s", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-coraz7s-cn0579_i2c/BOOT.BIN" + }, + { + "path": "/boot/zynq-coraz7s-cn0579_i2c/devicetree.dtb" + } + ] + }, + { + "name": "cn0540", + "platform": "xilinx", + "architecture": "zynq", + "board": "coraz7s", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-coraz7s-cn0540/BOOT.BIN" + }, + { + "path": "/boot/zynq-coraz7s-cn0540/devicetree.dtb" + } + ] + }, + { + "name": "ad4020", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad4020/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad4020/devicetree.dtb" + } + ] + }, + { + "name": "ad4630_fmc", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad4630-24/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad4630-24/devicetree.dtb" + } + ] + }, + { + "name": "ad403x", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad4630-24/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad4630-24/devicetree.dtb" + } + ] + }, + { + "name": "ad77681_evb", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad7768-1-evb/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad7768-1-evb/devicetree.dtb" + } + ] + }, + { + "name": "ad7768", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad7768-axi-adc/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad7768-axi-adc/devicetree.dtb" + } + ] + }, + { + "name": "ad7768-4", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad7768-4-axi-adc/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad7768-4-axi-adc/devicetree.dtb" + } + ] + }, + { + "name": "ad9467-fmc", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad9467-fmc-250ebz/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad9467-fmc-250ebz/devicetree.dtb" + } + ] + }, + { + "name": "adaq8092", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-adaq8092/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-adaq8092/devicetree.dtb" + } + ] + }, + { + "name": "adrv9002", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-adrv9002/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-adrv9002/zynq-zed-adv7511-adrv9002/devicetree.dtb" + } + ] + }, + { + "name": "adrv9002_rx2tx2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-adrv9002/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-adrv9002/zynq-zed-adv7511-adrv9002-rx2tx2/devicetree.dtb" + } + ] + }, + { + "name": "cn0363", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-cn0363/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-cn0363/devicetree.dtb" + } + ] + }, + { + "name": "cn0506_mii", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-cn0506-mii/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-cn0506-mii/devicetree.dtb" + } + ] + }, + { + "name": "cn0506_rgmii", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-cn0506-rgmii/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-cn0506-rgmii/devicetree.dtb" + } + ] + }, + { + "name": "cn0506_rmii", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-cn0506-rmii/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-cn0506-rmii/devicetree.dtb" + } + ] + }, + { + "name": "cn0577", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-cn0577/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-cn0577/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad936x-fmcomms2-3-4/zynq-zed-adv7511-ad9361-fmcomms2-3/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms3", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad936x-fmcomms2-3-4/zynq-zed-adv7511-ad9361-fmcomms2-3/devicetree.dtb" + } + ] + }, + { + "name": "fmcomms4", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad936x-fmcomms2-3-4/zynq-zed-adv7511-ad9364-fmcomms4/devicetree.dtb" + } + ] + }, + { + "name": "imageon", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-imageon/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-imageon/devicetree.dtb" + } + ] + }, + { + "name": "adv7511", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-adv7511/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511/devicetree.dtb" + } + ] + }, + { + "name": "adv7511_without_bitstream", + "platform": "xilinx", + "architecture": "zynq", + "board": "zed", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zed-otg/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-otg/devicetree.dtb" + } + ] + }, + { + "name": "adrv9009zu11eg_adrv2crr", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb/system.dtb" + } + ] + }, + { + "name": "multisom-primary", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-multisom-primary/system.dtb" + } + ] + }, + { + "name": "multisom-secondary", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-multisom-secondary/system.dtb" + } + ] + }, + { + "name": "fmcomms8", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/system.dtb" + } + ] + }, + { + "name": "fmcomms8_using_clockdist", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8-using-clockdist/system.dtb" + } + ] + }, + { + "name": "fmcomms8_using_clockdist_primary", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8-multisom-primary-clockdist/system.dtb" + } + ] + }, + { + "name": "fmcomms8_using_clockdist_secondary", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8-multisom-secondary-clockdist/system.dtb" + } + ] + }, + { + "name": "fmcomms8_multisom_primary", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8-multisom-primary/system.dtb" + } + ] + }, + { + "name": "fmcomms8_multisom_secondary", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-sync-fmcomms8-multisom-secondary/system.dtb" + } + ] + }, + { + "name": "xmicrowave", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-xmicrowave/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-xmicrowave/system.dtb" + } + ] + }, + { + "name": "fmcbridge", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "adrv9009zu11eg_adrv2crr", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-fmcbridge/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-adrv9009-zu11eg-revb-adrv2crr-fmc-revb-fmcbridge/system.dtb" + } + ] + }, + { + "name": "ad9081_m8_l4", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/m8_l4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/m8_l4/system.dtb" + } + ] + }, + { + "name": "ad9081_m8_l4_vcxo122p88", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/m8_l4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/m8_l4/m8_l4_vcxo122p88/system.dtb" + } + ] + }, + { + "name": "ad9081_m4_l8", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/m4_l8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/m4_l8/system.dtb" + } + ] + }, + { + "name": "ad9081_204b_txmode9_rxmode4", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/204b_txmode9_rxmode4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/204b_txmode9_rxmode4/system.dtb" + } + ] + }, + { + "name": "ad9081_204c_txmode0_rxmode1", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/204c_txmode0_rxmode1/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9081/204c_txmode0_rxmode1/system.dtb" + } + ] + }, + { + "name": "stingray", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/system.dtb" + } + ] + }, + { + "name": "stingray_vcxo100", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/vcxo100/system.dtb" + } + ] + }, + { + "name": "stingray_vcxo100_direct_clk", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/vcxo100-direct-clk/system.dtb" + } + ] + }, + { + "name": "stingray_direct_clk", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-stingray/direct-clk/system.dtb" + } + ] + }, + { + "name": "ad9082_m4_l8", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9082-m4-l8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9082-m4-l8/system.dtb" + } + ] + }, + { + "name": "ad9083", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9083-fmc-ebz/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9083-fmc-ebz/system.dtb" + } + ] + }, + { + "name": "adrv9009", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9009/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9009/system.dtb" + } + ] + }, + { + "name": "fmcomms8", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9009-fmcomms8/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9009-fmcomms8/system.dtb" + } + ] + }, + { + "name": "ad9695", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9695/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9695/system.dtb" + } + ] + }, + { + "name": "ad9783", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9783/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9783/system.dtb" + } + ] + }, + { + "name": "adrv9008-1", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9008-1-2/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9008-1-2/zynqmp-zcu102-rev10-adrv9008-1/system.dtb" + } + ] + }, + { + "name": "adrv9008-2", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9008-1-2/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9008-1-2/zynqmp-zcu102-rev10-adrv9008-2/system.dtb" + } + ] + }, + { + "name": "adrv9371", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv937x/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv937x/zynqmp-zcu102-rev10-adrv9371/system.dtb" + } + ] + }, + { + "name": "adrv9375", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv937x/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv937x/zynqmp-zcu102-rev10-adrv9375/system.dtb" + } + ] + }, + { + "name": "cn0506_mii", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-cn0506-mii/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-cn0506-mii/system.dtb" + } + ] + }, + { + "name": "cn0506_rmii", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-cn0506-rmii/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-cn0506-rmii/system.dtb" + } + ] + }, + { + "name": "cn0506_rgmii", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-cn0506-rgmii/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-cn0506-rgmii/system.dtb" + } + ] + }, + { + "name": "daq2", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-fmcdaq2/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-fmcdaq2/system.dtb" + } + ] + }, + { + "name": "daq3", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-fmcdaq3/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-fmcdaq3/system.dtb" + } + ] + }, + { + "name": "fmcomms2", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad936x-fmcomms2-3-4/zynqmp-zcu102-rev10-ad9361-fmcomms2-3/system.dtb" + } + ] + }, + { + "name": "fmcomms3", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad936x-fmcomms2-3-4/zynqmp-zcu102-rev10-ad9361-fmcomms2-3/system.dtb" + } + ] + }, + { + "name": "fmcomms4", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad936x-fmcomms2-3-4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad936x-fmcomms2-3-4/zynqmp-zcu102-rev10-ad9364-fmcomms4/system.dtb" + } + ] + }, + { + "name": "fmcomms5", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9361-fmcomms5/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9361-fmcomms5/system.dtb" + } + ] + }, + { + "name": "adrv9002_cmos", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/boot_bin_CMOS/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/zynqmp-zcu102-rev10-adrv9002/system.dtb" + } + ] + }, + { + "name": "adrv9002_lvds", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/boot_bin_LVDS/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/zynqmp-zcu102-rev10-adrv9002/system.dtb" + } + ] + }, + { + "name": "adrv9002_rx2tx2_cmos", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/boot_bin_CMOS/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/zynqmp-zcu102-rev10-adrv9002-rx2tx2/system.dtb" + } + ] + }, + { + "name": "adrv9002_rx2tx2_lvds", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/boot_bin_LVDS/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9002/zynqmp-zcu102-rev10-adrv9002-rx2tx2/system.dtb" + } + ] + }, + { + "name": "ad9172_mode4", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-ad9172-fmc-ebz-mode4/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-ad9172-fmc-ebz-mode4/system.dtb" + } + ] + }, + { + "name": "ad9081", + "platform": "xilinx", + "architecture": "versal", + "board": "vck190", + "kernel": "/boot/versal-common/Image", + "files": [ + { + "path": "/boot/versal-vck190-reva-ad9081/BOOT.BIN" + }, + { + "path": "/boot/versal-vck190-reva-ad9081/boot.scr" + }, + { + "path": "/boot/versal-vck190-reva-ad9081/system.dtb" + } + ] + }, + { + "name": "adrv9025", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9025/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-adrv9025/system.dtb" + } + ] + } + ] +} diff --git a/nebula/tasks.py b/nebula/tasks.py index f0c7118..4dce9e4 100644 --- a/nebula/tasks.py +++ b/nebula/tasks.py @@ -787,6 +787,7 @@ def gen_config_netbox( "folder": "Resource folder containing BOOT.BIN, kernel, device tree, and system_top.bit.\nOverrides other setting", "yamlfilename": "Path to yaml config file. Default: /etc/default/nebula", "board_name": "Name of DUT design (Ex: zynq-zc706-adv7511-fmcdaq2). Require for multi-device config files", + "sdcard": "Will use bootfiles from sd card if set to true", }, ) def update_boot_files_jtag_manager( @@ -798,6 +799,7 @@ def update_boot_files_jtag_manager( folder=None, yamlfilename="/etc/default/nebula", board_name=None, + sdcard=False, ): """Update boot files through JTAG (Assuming board is running)""" m = nebula.manager(configfilename=yamlfilename, board_name=board_name) @@ -883,6 +885,7 @@ def board_diagnostics_manager( "folder": "Resource folder containing BOOT.BIN, kernel, device tree, and system_top.bit.\nOverrides other setting", "yamlfilename": "Path to yaml config file. Default: /etc/default/nebula", "board_name": "Name of DUT design (Ex: zynq-zc706-adv7511-fmcdaq2). Require for multi-device config files", + "sdcard": "Get boot files from the sdcard", }, ) def update_boot_files_manager( @@ -894,6 +897,7 @@ def update_boot_files_manager( folder=None, yamlfilename="/etc/default/nebula", board_name=None, + sdcard=False, ): """Update boot files through u-boot menu (Assuming board is running)""" m = nebula.manager(configfilename=yamlfilename, board_name=board_name) @@ -904,9 +908,10 @@ def update_boot_files_manager( bootbinpath=bootbinpath, uimagepath=uimagepath, devtreepath=devtreepath, + sdcard=sdcard, ) else: - m.board_reboot_auto_folder(folder, design_name=board_name) + m.board_reboot_auto_folder(folder=folder, sdcard=sdcard, design_name=board_name) manager = Collection("manager") diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 00a37f3..ca02050 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -2,6 +2,7 @@ import glob import logging import os +import pathlib import random import re import string @@ -11,6 +12,7 @@ import pyudev from usbsdmux import usbsdmux +import nebula.helper as helper from nebula.common import utils log = logging.getLogger(__name__) @@ -35,6 +37,7 @@ def __init__( self.update_defaults_from_yaml( yamlfilename, __class__.__name__, board_name=board_name ) + self.board_name = board_name self.find_mux_device() self._mux = usbsdmux.UsbSdMux(self._mux_in_use) @@ -285,6 +288,7 @@ def update_rootfs_files_from_external(self, target, destination): def update_boot_files_from_sdcard_itself( self, + descriptor_path=None, bootbin_loc=None, kernel_loc=None, devicetree_loc=None, @@ -295,6 +299,7 @@ def update_boot_files_from_sdcard_itself( """Update the boot files from the SD card itself. Args: + descriptor_path (str): The path to the kuiper.json. bootbin_loc (str): The path to the boot.bin file on the SD card. kernel_loc (str): The path to the kernel file on the SD card. devicetree_loc (str): The path to the devicetree file on the SD card. @@ -303,15 +308,58 @@ def update_boot_files_from_sdcard_itself( preloader_loc (str): The path to the preloader file (.sfp) on the SD card (Intel boards). """ args = locals() + # check if if all loc are still None + del args["self"] + del args["descriptor_path"] + args_status = all(loc is None for loc in args.values()) folder, boot_p = self._mount_sd_card() preloader_p = f"{self._target_sdcard}3" + mount_path = os.path.join("/tmp/", folder) + + if args_status: + h = helper() + if descriptor_path: + descriptor_path = descriptor_path + else: + path = pathlib.Path(__file__).parent.absolute() + descriptor_path = os.path.join(path, "resources", "kuiper.json") + try: + kuiperjson_loc = os.path.join(mount_path, "kuiper.json") + os.path.isfile(kuiperjson_loc) + descriptor_path = kuiperjson_loc + except Exception: + log.warning("Cannot find project descriptor on target") + boot_files_path = h.get_boot_files_from_descriptor( + descriptor_path, self.board_name + ) + + # update items to args + for boot_file in boot_files_path: + file_path = os.path.join(mount_path, boot_file[1].lstrip("/boot")) + loc_map = { + "bootbin_loc": "BIN", + "kernel_loc": "Image", + "devicetree_loc": "dtb", + "extlinux_loc": "conf", + "scr_loc": "scr", + "preloader_loc": "sfp", + } + for key, val in loc_map.items(): + if val in file_path: + args.update({key: file_path}) + + # filter: remove None loc + args_filtered = dict(filter(lambda item: item[1] is not None, args.items())) try: - for field, bootfile_loc in args.items(): + for field, bootfile_loc in args_filtered.items(): if field in ["self"]: continue - bootfile_loc = os.path.join("/tmp/", folder, bootfile_loc) + if mount_path in bootfile_loc: + bootfile_loc = bootfile_loc + else: + bootfile_loc = os.path.join(mount_path, bootfile_loc) if not os.path.isfile(bootfile_loc): options = os.listdir(f"/tmp/{folder}") options = [ @@ -335,7 +383,9 @@ def update_boot_files_from_sdcard_itself( if field == "extlinux_loc": os.system(f"mkdir -p /tmp/{folder}/extlinux") bootfile_name = "extlinux/" + bootfile_name - os.system(f"cp {bootfile_loc} /tmp/{folder}/{bootfile_name}") + log.info(f"Copying {bootfile_name} from {bootfile_loc} to {mount_path}") + os.system(f"cp -f {bootfile_loc} /tmp/{folder}/{bootfile_name}") + time.sleep(0.5) log.info("Updated boot files successfully... unmounting") finally: diff --git a/tests/test_helper.py b/tests/test_helper.py new file mode 100644 index 0000000..b3d03eb --- /dev/null +++ b/tests/test_helper.py @@ -0,0 +1,53 @@ +import pytest + +from nebula import helper as helper + + +@pytest.mark.parametrize( + "project, bootfiles", + [ + ( + "socfpga_arria10_socdk_daq2", + [ + "/boot/socfpga_arria10_common/zImage", + "/boot/socfpga_arria10_socdk_daq2/u-boot-splx4.sfp", + "/boot/socfpga_arria10_socdk_daq2/fit_spl_fpga.itb", + "/boot/socfpga_arria10_socdk_daq2/socfpga_arria10_socdk_sdmmc.dtb", + "/boot/socfpga_arria10_socdk_daq2/u-boot.img", + ], + ), + ( + "socfpga_arria10_socdk_ad9081-vnp12", + [ + "/boot/socfpga_arria10_common/zImage", + "/boot/socfpga_arria10_socdk_ad9081/np12/u-boot-splx4.sfp", + "/boot/socfpga_arria10_socdk_ad9081/np12/fit_spl_fpga.itb", + "/boot/socfpga_arria10_socdk_ad9081/np12/socfpga_arria10_socdk_sdmmc.dtb", + "/boot/socfpga_arria10_socdk_ad9081/np12/u-boot.img", + ], + ), + ( + "zynqmp-zcu102-rev10-adrv9002-rx2tx2-vcmos", + [ + "/boot/zynqmp-common/Image", + "/boot/zynqmp-zcu102-rev10-adrv9002/boot_bin_CMOS/BOOT.BIN", + "/boot/zynqmp-zcu102-rev10-adrv9002/zynqmp-zcu102-rev10-adrv9002-rx2tx2/system.dtb", + ], + ), + ( + "zynq-adrv9361-z7035-bob-vcmos", + [ + "/boot/zynq-common/uImage", + "/boot/zynq-adrv9361-z7035-bob/cmos/BOOT.BIN", + "/boot/zynq-adrv9361-z7035-bob/cmos/devicetree.dtb", + ], + ), + ], +) +def test_get_boot_files_from_descriptor(project, bootfiles): + h = helper() + descriptor_file = "nebula/resources/kuiper.json" + bts = [bt[1] for bt in h.get_boot_files_from_descriptor(descriptor_file, project)] + assert len(bootfiles) == len(bts) + for bootfile in bootfiles: + assert bootfile in bts diff --git a/tests/test_network.py b/tests/test_network.py index a5a4478..8d31dc8 100644 --- a/tests/test_network.py +++ b/tests/test_network.py @@ -4,6 +4,7 @@ import pytest +from nebula import helper as helper from nebula import network, pdu, uart @@ -89,5 +90,27 @@ def test_dmesg_read(): assert os.path.isfile("dmesg_err.log") +def test_update_boot_partition_existing_files(): + # generate nebula config for zynq-adrv9361-z7035-fmc + outfile = "resources/nebula-zynq-adrv9361-z7035-fmc.yml" + board_name = "zynq-adrv9361-z7035-fmc" + h = helper() + h.create_config_from_netbox( + outfile=outfile, + netbox_ip="192.168.10.11", + netbox_port="8000", + netbox_baseurl="netbox", + netbox_token="0123456789abcdef0123456789abcdef01234567", + board_name=board_name, + ) + + # initialize network object + n = network(yamlfilename=outfile, board_name=board_name) + n.check_board_booted() + n.update_boot_partition_existing_files(subfolder=board_name) + time.sleep(60) + n.check_board_booted() + + if __name__ == "__main__": test_adrv9361_fmc_network_update() diff --git a/tests/test_usbsdmux.py b/tests/test_usbsdmux.py index f206a71..f1799b1 100644 --- a/tests/test_usbsdmux.py +++ b/tests/test_usbsdmux.py @@ -96,44 +96,53 @@ def test_backup_files_to_external(power_off_dut, param): @pytest.mark.hardware +@pytest.mark.parametrize("board", ["socfpga_cyclone5_de10_nano_cn0540"]) +@pytest.mark.parametrize( + "config", + [ + os.path.join( + os.path.dirname(__file__), "nebula_config", "nebula-manager-usbmux.yml" + ) + ], +) @pytest.mark.parametrize( "param", [ { - "board": "socfpga_cyclone5_de10_nano_cn0540", - "config": os.path.join( - os.path.dirname(__file__), "nebula_config", "nebula-manager-usbmux.yml" + "bootbin_loc": os.path.join( + "socfpga_cyclone5_de10_nano_cn0540", "soc_system.rbf" + ), + "kernel_loc": os.path.join("socfpga_cyclone5_common", "zImage"), + "devicetree_loc": os.path.join( + "socfpga_cyclone5_de10_nano_cn0540", "socfpga.dtb" + ), + "extlinux_loc": os.path.join( + "socfpga_cyclone5_de10_nano_cn0540", "extlinux.conf" + ), + "scr_loc": os.path.join("socfpga_cyclone5_de10_nano_cn0540", "u-boot.scr"), + "preloader_loc": os.path.join( + "socfpga_cyclone5_de10_nano_cn0540", "u-boot-with-spl.sfp" ), - "files": { - "bootbin_loc": os.path.join( - "socfpga_cyclone5_de10_nano_cn0540", "soc_system.rbf" - ), - "kernel_loc": os.path.join("socfpga_cyclone5_common", "zImage"), - "devicetree_loc": os.path.join( - "socfpga_cyclone5_de10_nano_cn0540", "socfpga.dtb" - ), - "extlinux_loc": os.path.join( - "socfpga_cyclone5_de10_nano_cn0540", "extlinux.conf" - ), - "scr_loc": os.path.join( - "socfpga_cyclone5_de10_nano_cn0540", "u-boot.scr" - ), - "preloader_loc": os.path.join( - "socfpga_cyclone5_de10_nano_cn0540", "u-boot-with-spl.sfp" - ), - }, + }, + { + "bootbin_loc": None, + "kernel_loc": None, + "devicetree_loc": None, + "extlinux_loc": None, + "scr_loc": None, + "preloader_loc": None, }, ], ) -def test_update_boot_files_from_sdcard_itself(power_off_dut, param): +def test_update_boot_files_from_sdcard_itself(power_off_dut, board, config, param): sd = usbmux( - board_name=param["board"], - yamlfilename=param["config"], + board_name=board, + yamlfilename=config, ) try: sd.find_muxed_sdcard() assert sd._target_sdcard - sd.update_boot_files_from_sdcard_itself(**param["files"]) + sd.update_boot_files_from_sdcard_itself(**param) finally: sd.set_mux_mode("off")