From fbf0613e700f4db7ea34c1e3f5e5971a06745dda Mon Sep 17 00:00:00 2001 From: kimpaller Date: Thu, 15 Sep 2022 15:47:06 +0800 Subject: [PATCH 01/20] Support updating of bootfiles from existing files on the sd card Signed-off-by: kimpaller --- nebula/helper.py | 167 ++++ nebula/manager.py | 21 +- nebula/network.py | 48 +- nebula/resources/kuiper.json | 1798 ++++++++++++++++++++++++++++++++++ nebula/tasks.py | 6 +- tests/test_helper.py | 52 + tests/test_network.py | 24 +- 7 files changed, 2093 insertions(+), 23 deletions(-) create mode 100755 nebula/resources/kuiper.json create mode 100644 tests/test_helper.py diff --git a/nebula/helper.py b/nebula/helper.py index 137987a7..9770f93e 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,157 @@ 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"), + ("_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"), + ("imageon", "imageon"), + ("ad4630-24", "ad403x"), + ("ad7768$", "ad7768"), + ("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"), + ("ad7768-1-evb", "ad77681_evb"), + ("ad9467-fmc-250ebz", "ad9467-fmc"), + ("otg", "adv7511_without_bitstream"), + ("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-vm4-l8", "ad9082_m4_l8"), + ("ad9083-fmc-ebz", "ad9083"), + ("adrv9008-1", "adrv9008-1"), + ("adrv9008-2", "adrv9008-2"), + ("adrv9002-vcmos", "adrv9002_cmos"), + ("adrv9002-vlvds", "adrv9002_lvds"), + ("adrv9002-rx2tx2-vcmos", "adrv9002_rx2tx2_cmos"), + ("adrv9002-rx2tx2-vlvds", "adrv9002_rx2tx2_lvds"), + ("ad9172-fmc-ebz-mode4", "ad9172_mode4"), + ] + + 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"])) + + return boot_files diff --git a/nebula/manager.py b/nebula/manager.py index ca906f1a..74072fef 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -431,6 +431,7 @@ 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( @@ -475,14 +476,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 @@ -822,6 +826,7 @@ def board_reboot_auto_folder( system_top_bit_path=bit, uimagepath=kernel, devtreepath=dt, + sdcard=sdcard, ) else: self.board_reboot_auto( diff --git a/nebula/network.py b/nebula/network.py index 14f3404b..b880c26c 100644 --- a/nebula/network.py +++ b/nebula/network.py @@ -11,6 +11,7 @@ import fabric from fabric import Connection +import nebula.helper as helper import nebula.errors as ne from nebula.common import utils @@ -272,20 +273,41 @@ 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.helper() + descriptor_path = "nebula/resources/kuiper.json" + try: + self._dl_file("/tmp/sdcard/kuiper.json") + os.replace("kuiper.json", descriptor_path) + 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 00000000..1d269711 --- /dev/null +++ b/nebula/resources/kuiper.json @@ -0,0 +1,1798 @@ +{ + "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" + }, + { + "board" : "ccpackrf" + } + ] + }, + { + "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" + } + ] + }, + { + "name": "ad_fmclidar1_ebz", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_fmclidar1/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_fmclidar1/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_fmclidar1/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_fmclidar1/u-boot.img" + } + ] + }, + { + "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" + } + ] + }, + { + "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" + } + ] + }, + { + "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" + } + ] + }, + { + "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" + } + ] + }, + + { + "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" + } + ] + }, + { + "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" + } + ] + }, + { + "name": "cn0506_mii", + "platform": "intel", + "architecture": "arria10", + "board": "socdk", + "kernel": "/boot/socfpga_arria10_common/zImage", + "preloader": "/boot/socfpga_arria10_socdk_cn0506_mii/u-boot-splx4.sfp", + "files": [ + { + "path": "/boot/socfpga_arria10_socdk_cn0506_mii/fit_spl_fpga.itb" + }, + { + "path": "/boot/socfpga_arria10_socdk_cn0506_mii/socfpga_arria10_socdk_sdmmc.dtb" + }, + { + "path": "/boot/socfpga_arria10_socdk_cn0506_mii/u-boot.img" + } + ] + }, + { + "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" + } + ] + }, + { + "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" + } + ] + }, + { + "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": "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": "ad9265_fmc", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9265-fmc-125ebz/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9265-fmc-125ebz/devicetree.dtb" + } + ] + }, + { + "name": "ad9434_fmc", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9434-fmc-500ebz/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9434-fmc-500ebz/devicetree.dtb" + } + ] + }, + { + "name": "ad9739a_fmc", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9739a-fmc/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9739a-fmc/devicetree.dtb" + } + ] + }, + { + "name": "ad_fmclidar1_ebz", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-fmclidar1/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-fmclidar1/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": "fmcadc2", + "platform": "xilinx", + "architecture": "zynq", + "board": "zc706", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-zc706-adv7511-ad9625-fmcadc2/BOOT.BIN" + }, + { + "path": "/boot/zynq-zc706-adv7511-ad9625-fmcadc2/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": "adrv9361z7035_lvds", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccpackrf", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9361-z7035-packrf/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9361-z7035-packrf/devicetree.dtb" + } + ] + }, + { + "name": "adrv9364z7020_lvds", + "platform": "xilinx", + "architecture": "zynq", + "board": "ccpackrf", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-adrv9364-z7020-packrf/BOOT.BIN" + }, + { + "path": "/boot/zynq-adrv9364-z7020-packrf/devicetree.dtb" + } + ] + }, + { + "name": "cn0501", + "platform": "xilinx", + "architecture": "zynq", + "board": "coraz7s", + "kernel": "/boot/zynq-common/uImage", + "files": [ + { + "path": "/boot/zynq-coraz7s-cn0501/BOOT.BIN" + }, + { + "path": "/boot/zynq-coraz7s-cn0501/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": "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/BOOT.BIN" + }, + { + "path": "/boot/zynq-zed-adv7511-ad7768/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": "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": "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_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": "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": "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": "fmclidar", + "platform": "xilinx", + "architecture": "zynqmp", + "board": "zcu102", + "kernel": "/boot/zynqmp-common/Image", + "files": [ + { + "path": "/boot/zynqmp-zcu102-rev10-fmclidar1/BOOT.BIN" + }, + { + "path": "/boot/zynqmp-zcu102-rev10-fmclidar1/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" + } + ] + } + ] +} diff --git a/nebula/tasks.py b/nebula/tasks.py index f0c71189..16473efe 100644 --- a/nebula/tasks.py +++ b/nebula/tasks.py @@ -785,6 +785,7 @@ def gen_config_netbox( "uimagepath": "Path to kernel image.", "devtreepath": "Path to devicetree.", "folder": "Resource folder containing BOOT.BIN, kernel, device tree, and system_top.bit.\nOverrides other setting", + "sdcard": "Will use bootfiles from sd card if set to true", "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", }, @@ -796,6 +797,7 @@ def update_boot_files_jtag_manager( uimagepath="uImage", devtreepath="devicetree.dtb", folder=None, + sdcard=False, yamlfilename="/etc/default/nebula", board_name=None, ): @@ -881,6 +883,7 @@ def board_diagnostics_manager( "uimagepath": "Path to kernel image.", "devtreepath": "Path to devicetree.", "folder": "Resource folder containing BOOT.BIN, kernel, device tree, and system_top.bit.\nOverrides other setting", + "sdcard": "Get boot files from the sdcard", "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", }, @@ -892,6 +895,7 @@ def update_boot_files_manager( uimagepath="uImage", devtreepath="devicetree.dtb", folder=None, + sdcard=False, yamlfilename="/etc/default/nebula", board_name=None, ): @@ -906,7 +910,7 @@ def update_boot_files_manager( devtreepath=devtreepath, ) 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/tests/test_helper.py b/tests/test_helper.py new file mode 100644 index 00000000..45a25802 --- /dev/null +++ b/tests/test_helper.py @@ -0,0 +1,52 @@ +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 a5a44786..72b39be8 100644 --- a/tests/test_network.py +++ b/tests/test_network.py @@ -3,7 +3,7 @@ import time import pytest - +from nebula import helper as helper from nebula import network, pdu, uart @@ -89,5 +89,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() From 6fcf43918ce2e09b370a5e736e7f3cdec831614f Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Thu, 7 Dec 2023 16:37:40 +0800 Subject: [PATCH 02/20] fix update boot files from sd card Signed-off-by: Trecia Agoylo --- nebula/manager.py | 1 + nebula/tasks.py | 1 + 2 files changed, 2 insertions(+) diff --git a/nebula/manager.py b/nebula/manager.py index 74072fef..2577970f 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -892,6 +892,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/tasks.py b/nebula/tasks.py index 16473efe..d4f53ad1 100644 --- a/nebula/tasks.py +++ b/nebula/tasks.py @@ -908,6 +908,7 @@ def update_boot_files_manager( bootbinpath=bootbinpath, uimagepath=uimagepath, devtreepath=devtreepath, + sdcard=sdcard ) else: m.board_reboot_auto_folder(folder=folder, sdcard=sdcard, design_name=board_name) From 47a27cdadc7bc12033d2e6cda25b728158cbf1d8 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Mon, 15 Apr 2024 12:26:40 +0800 Subject: [PATCH 03/20] Fix lint Signed-off-by: Trecia Agoylo --- nebula/manager.py | 4 ++-- nebula/network.py | 2 +- nebula/tasks.py | 2 +- tests/test_helper.py | 1 + tests/test_network.py | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nebula/manager.py b/nebula/manager.py index 2577970f..7eadd101 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -431,7 +431,7 @@ def board_reboot_uart_net_pdu( extlinux_path=None, scr_path=None, preloader_path=None, - sdcard=False + sdcard=False, ): """Manager when UART, PDU, and Network are available""" self._check_files_exist( @@ -892,7 +892,7 @@ def board_reboot_auto( extlinux_path=extlinux_path, scr_path=scr_path, preloader_path=preloader_path, - sdcard=sdcard + sdcard=sdcard, ) def shutdown_powerdown_board(self): diff --git a/nebula/network.py b/nebula/network.py index b880c26c..e70b5aef 100644 --- a/nebula/network.py +++ b/nebula/network.py @@ -11,8 +11,8 @@ import fabric from fabric import Connection -import nebula.helper as helper import nebula.errors as ne +import nebula.helper as helper from nebula.common import utils log = logging.getLogger(__name__) diff --git a/nebula/tasks.py b/nebula/tasks.py index d4f53ad1..764d7622 100644 --- a/nebula/tasks.py +++ b/nebula/tasks.py @@ -908,7 +908,7 @@ def update_boot_files_manager( bootbinpath=bootbinpath, uimagepath=uimagepath, devtreepath=devtreepath, - sdcard=sdcard + sdcard=sdcard, ) else: m.board_reboot_auto_folder(folder=folder, sdcard=sdcard, design_name=board_name) diff --git a/tests/test_helper.py b/tests/test_helper.py index 45a25802..b3d03eb0 100644 --- a/tests/test_helper.py +++ b/tests/test_helper.py @@ -1,4 +1,5 @@ import pytest + from nebula import helper as helper diff --git a/tests/test_network.py b/tests/test_network.py index 72b39be8..8d31dc86 100644 --- a/tests/test_network.py +++ b/tests/test_network.py @@ -3,6 +3,7 @@ import time import pytest + from nebula import helper as helper from nebula import network, pdu, uart From 7420e107a01a65602d4f31f48e695f37984e401a Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Thu, 7 Dec 2023 17:01:37 +0800 Subject: [PATCH 04/20] remove checking of files when updating from sdcard Signed-off-by: Trecia Agoylo --- nebula/manager.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/nebula/manager.py b/nebula/manager.py index 7eadd101..001fb015 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -434,15 +434,16 @@ def board_reboot_uart_net_pdu( 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 From 812a35ca1582c8f4dca2033541226c944f2a7ca8 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Mon, 15 Apr 2024 13:51:02 +0800 Subject: [PATCH 05/20] Fix helper instantiate Signed-off-by: Trecia Agoylo --- nebula/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nebula/network.py b/nebula/network.py index e70b5aef..779b9ffe 100644 --- a/nebula/network.py +++ b/nebula/network.py @@ -293,7 +293,7 @@ def update_boot_partition_existing_files(self, subfolder=None): self.run_ssh_command("mount /dev/mmcblk0p1 /tmp/sdcard") # extract needed boot files from the kuiper descriptor file - h = helper.helper() + h = helper() descriptor_path = "nebula/resources/kuiper.json" try: self._dl_file("/tmp/sdcard/kuiper.json") From 882c0fa55ca29d246993f44f35b134ba9b2f5e23 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Mon, 15 Apr 2024 16:11:25 +0800 Subject: [PATCH 06/20] update kuiper.json and supported boards Signed-off-by: Trecia Agoylo --- nebula/helper.py | 8 +- nebula/resources/kuiper.json | 392 ++++++++++++++++++++++++----------- 2 files changed, 272 insertions(+), 128 deletions(-) diff --git a/nebula/helper.py b/nebula/helper.py index 9770f93e..b2ed187f 100644 --- a/nebula/helper.py +++ b/nebula/helper.py @@ -417,7 +417,9 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("cn0363", "cn0363"), ("imageon", "imageon"), ("ad4630-24", "ad403x"), - ("ad7768$", "ad7768"), + ("ad7768-axi-adc", "ad7768"), + ("ad7768-1-evb", "ad77681_evb"), + ("ad7768-4-axi-adc", "ad7768-4"), ("socdk_fmclidar1", "ad_fmclidar1_ebz"), ("adv7511-fmclidar1", "ad_fmclidar1_ebz"), ("rev10-fmclidar1", "fmclidar"), @@ -440,7 +442,6 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("z7035-fmc", "adrv9361z7035_lvds"), ("z7035-packrf", "adrv9361z7035_lvds"), ("z7020-packrf", "adrv9364z7020_lvds"), - ("ad7768-1-evb", "ad77681_evb"), ("ad9467-fmc-250ebz", "ad9467-fmc"), ("otg", "adv7511_without_bitstream"), ("adrv2crr-fmc-revb", "adrv9009zu11eg_adrv2crr"), @@ -455,7 +456,8 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("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-vm4-l8", "ad9082_m4_l8"), + ("ad9082-m4-l8", "ad9082_m4_l8"), + ("ad9082$", "ad9082"), ("ad9083-fmc-ebz", "ad9083"), ("adrv9008-1", "adrv9008-1"), ("adrv9008-2", "adrv9008-2"), diff --git a/nebula/resources/kuiper.json b/nebula/resources/kuiper.json index 1d269711..a61bd8bd 100755 --- a/nebula/resources/kuiper.json +++ b/nebula/resources/kuiper.json @@ -1,4 +1,5 @@ { + "version": "0.1.0", "platforms": [ { "platform": "intel", @@ -47,9 +48,6 @@ }, { "board" : "ccfmc" - }, - { - "board" : "ccpackrf" } ] }, @@ -112,25 +110,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_daq2/u-boot.img" - } - ] - }, - { - "name": "ad_fmclidar1_ebz", - "platform": "intel", - "architecture": "arria10", - "board": "socdk", - "kernel": "/boot/socfpga_arria10_common/zImage", - "preloader": "/boot/socfpga_arria10_socdk_fmclidar1/u-boot-splx4.sfp", - "files": [ - { - "path": "/boot/socfpga_arria10_socdk_fmclidar1/fit_spl_fpga.itb" - }, - { - "path": "/boot/socfpga_arria10_socdk_fmclidar1/socfpga_arria10_socdk_sdmmc.dtb" }, { - "path": "/boot/socfpga_arria10_socdk_fmclidar1/u-boot.img" + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -150,6 +132,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_ad9081/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -169,6 +154,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_ad9081/np12/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -188,6 +176,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_adrv9002/socfpga_arria10_socdk_adrv9002_rx2tx2/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -207,10 +198,12 @@ }, { "path": "/boot/socfpga_arria10_socdk_adrv9002/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, - { "name": "adrv9009", "platform": "intel", @@ -227,6 +220,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_adrv9009/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -246,25 +242,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_adrv9371/u-boot.img" - } - ] - }, - { - "name": "cn0506_mii", - "platform": "intel", - "architecture": "arria10", - "board": "socdk", - "kernel": "/boot/socfpga_arria10_common/zImage", - "preloader": "/boot/socfpga_arria10_socdk_cn0506_mii/u-boot-splx4.sfp", - "files": [ - { - "path": "/boot/socfpga_arria10_socdk_cn0506_mii/fit_spl_fpga.itb" - }, - { - "path": "/boot/socfpga_arria10_socdk_cn0506_mii/socfpga_arria10_socdk_sdmmc.dtb" }, { - "path": "/boot/socfpga_arria10_socdk_cn0506_mii/u-boot.img" + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -284,6 +264,9 @@ }, { "path": "/boot/socfpga_arria10_socdk_fmcomms8/u-boot.img" + }, + { + "path": "/boot/socfpga_arria10_common/extlinux.conf" } ] }, @@ -303,111 +286,135 @@ }, { "path": "/boot/socfpga_cyclone5_de10_nano_cn0540/u-boot.scr" + }, + { + "path": "/boot/socfpga_cyclone5_common/extlinux.conf" } ] }, { - "name": "ad6676evb", - "platform": "xilinx", - "architecture": "zynq", - "board": "zc706", - "kernel": "/boot/zynq-common/uImage", + "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/zynq-zc706-adv7511-ad6676-fmc/BOOT.BIN" + "path": "/boot/socfpga_cyclone5_de10_nano_cn0579_i2c/soc_system.rbf" }, { - "path": "/boot/zynq-zc706-adv7511-ad6676-fmc/devicetree.dtb" + "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": "ad9081", - "platform": "xilinx", - "architecture": "zynq", - "board": "zc706", - "kernel": "/boot/zynq-common/uImage", + "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/zynq-zc706-adv7511-ad9081/BOOT.BIN" + "path": "/boot/socfpga_cyclone5_de10_nano_hps/soc_system.rbf" }, { - "path": "/boot/zynq-zc706-adv7511-ad9081/devicetree.dtb" + "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": "ad9081_np12", - "platform": "xilinx", - "architecture": "zynq", - "board": "zc706", - "kernel": "/boot/zynq-common/uImage", + "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/zynq-zc706-adv7511-ad9081/np12/BOOT.BIN" + "path": "/boot/socfpga_cyclone5_sockit_arradio/soc_system.rbf" }, { - "path": "/boot/zynq-zc706-adv7511-ad9081/np12/devicetree.dtb" + "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": "ad9265_fmc", + "name": "ad6676evb", "platform": "xilinx", "architecture": "zynq", "board": "zc706", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-zc706-adv7511-ad9265-fmc-125ebz/BOOT.BIN" + "path": "/boot/zynq-zc706-adv7511-ad6676-fmc/BOOT.BIN" }, { - "path": "/boot/zynq-zc706-adv7511-ad9265-fmc-125ebz/devicetree.dtb" + "path": "/boot/zynq-zc706-adv7511-ad6676-fmc/devicetree.dtb" } ] }, { - "name": "ad9434_fmc", + "name": "ad9081", "platform": "xilinx", "architecture": "zynq", "board": "zc706", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-zc706-adv7511-ad9434-fmc-500ebz/BOOT.BIN" + "path": "/boot/zynq-zc706-adv7511-ad9081/BOOT.BIN" }, { - "path": "/boot/zynq-zc706-adv7511-ad9434-fmc-500ebz/devicetree.dtb" + "path": "/boot/zynq-zc706-adv7511-ad9081/devicetree.dtb" } ] }, { - "name": "ad9739a_fmc", + "name": "ad9082", "platform": "xilinx", "architecture": "zynq", "board": "zc706", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-zc706-adv7511-ad9739a-fmc/BOOT.BIN" + "path": "/boot/zynq-zc706-adv7511-ad9082/BOOT.BIN" }, { - "path": "/boot/zynq-zc706-adv7511-ad9739a-fmc/devicetree.dtb" + "path": "/boot/zynq-zc706-adv7511-ad9082/devicetree.dtb" } ] }, { - "name": "ad_fmclidar1_ebz", + "name": "ad9081_np12", "platform": "xilinx", "architecture": "zynq", "board": "zc706", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-zc706-adv7511-fmclidar1/BOOT.BIN" + "path": "/boot/zynq-zc706-adv7511-ad9081/np12/BOOT.BIN" }, { - "path": "/boot/zynq-zc706-adv7511-fmclidar1/devicetree.dtb" + "path": "/boot/zynq-zc706-adv7511-ad9081/np12/devicetree.dtb" } ] }, @@ -606,21 +613,6 @@ } ] }, - { - "name": "fmcadc2", - "platform": "xilinx", - "architecture": "zynq", - "board": "zc706", - "kernel": "/boot/zynq-common/uImage", - "files": [ - { - "path": "/boot/zynq-zc706-adv7511-ad9625-fmcadc2/BOOT.BIN" - }, - { - "path": "/boot/zynq-zc706-adv7511-ad9625-fmcadc2/devicetree.dtb" - } - ] - }, { "name": "fmcadc3", "platform": "xilinx", @@ -907,122 +899,122 @@ ] }, { - "name": "adrv9361z7035_lvds", + "name": "cn0579", "platform": "xilinx", "architecture": "zynq", - "board": "ccpackrf", + "board": "coraz7s", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-adrv9361-z7035-packrf/BOOT.BIN" + "path": "/boot/zynq-coraz7s-cn0579_i2c/BOOT.BIN" }, { - "path": "/boot/zynq-adrv9361-z7035-packrf/devicetree.dtb" + "path": "/boot/zynq-coraz7s-cn0579_i2c/devicetree.dtb" } ] - }, - { - "name": "adrv9364z7020_lvds", + }, + { + "name": "cn0540", "platform": "xilinx", "architecture": "zynq", - "board": "ccpackrf", + "board": "coraz7s", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-adrv9364-z7020-packrf/BOOT.BIN" + "path": "/boot/zynq-coraz7s-cn0540/BOOT.BIN" }, { - "path": "/boot/zynq-adrv9364-z7020-packrf/devicetree.dtb" + "path": "/boot/zynq-coraz7s-cn0540/devicetree.dtb" } ] }, { - "name": "cn0501", + "name": "ad4020", "platform": "xilinx", "architecture": "zynq", - "board": "coraz7s", + "board": "zed", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-coraz7s-cn0501/BOOT.BIN" + "path": "/boot/zynq-zed-adv7511-ad4020/BOOT.BIN" }, { - "path": "/boot/zynq-coraz7s-cn0501/devicetree.dtb" + "path": "/boot/zynq-zed-adv7511-ad4020/devicetree.dtb" } ] }, { - "name": "cn0540", + "name": "ad4630_fmc", "platform": "xilinx", "architecture": "zynq", - "board": "coraz7s", + "board": "zed", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-coraz7s-cn0540/BOOT.BIN" + "path": "/boot/zynq-zed-adv7511-ad4630-24/BOOT.BIN" }, { - "path": "/boot/zynq-coraz7s-cn0540/devicetree.dtb" + "path": "/boot/zynq-zed-adv7511-ad4630-24/devicetree.dtb" } ] }, { - "name": "ad4020", + "name": "ad403x", "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-ad4630-24/BOOT.BIN" }, { - "path": "/boot/zynq-zed-adv7511-ad4020/devicetree.dtb" + "path": "/boot/zynq-zed-adv7511-ad4630-24/devicetree.dtb" } ] }, { - "name": "ad403x", + "name": "ad77681_evb", "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-ad7768-1-evb/BOOT.BIN" }, { - "path": "/boot/zynq-zed-adv7511-ad4630-24/devicetree.dtb" + "path": "/boot/zynq-zed-adv7511-ad7768-1-evb/devicetree.dtb" } ] }, { - "name": "ad77681_evb", + "name": "ad7768", "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-axi-adc/BOOT.BIN" }, { - "path": "/boot/zynq-zed-adv7511-ad7768-1-evb/devicetree.dtb" + "path": "/boot/zynq-zed-adv7511-ad7768-axi-adc/devicetree.dtb" } ] }, { - "name": "ad7768", + "name": "ad7768-4", "platform": "xilinx", "architecture": "zynq", "board": "zed", "kernel": "/boot/zynq-common/uImage", "files": [ { - "path": "/boot/zynq-zed-adv7511-ad7768/BOOT.BIN" + "path": "/boot/zynq-zed-adv7511-ad7768-4-axi-adc/BOOT.BIN" }, { - "path": "/boot/zynq-zed-adv7511-ad7768/devicetree.dtb" + "path": "/boot/zynq-zed-adv7511-ad7768-4-axi-adc/devicetree.dtb" } ] }, @@ -1041,6 +1033,21 @@ } ] }, + { + "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", @@ -1131,6 +1138,21 @@ } ] }, + { + "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", @@ -1281,6 +1303,51 @@ } ] }, + { + "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", @@ -1327,6 +1394,21 @@ ] }, { + "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", @@ -1402,47 +1484,92 @@ ] }, { - "name": "ad9082_m4_l8", + "name": "stingray", "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-stingray/BOOT.BIN" }, { - "path": "/boot/zynqmp-zcu102-rev10-ad9082-m4-l8/system.dtb" + "path": "/boot/zynqmp-zcu102-rev10-stingray/system.dtb" } ] }, { - "name": "ad9083", + "name": "stingray_vcxo100", "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-stingray/BOOT.BIN" }, { - "path": "/boot/zynqmp-zcu102-rev10-ad9083-fmc-ebz/system.dtb" + "path": "/boot/zynqmp-zcu102-rev10-stingray/vcxo100/system.dtb" } ] }, { - "name": "fmclidar", + "name": "stingray_vcxo100_direct_clk", "platform": "xilinx", "architecture": "zynqmp", "board": "zcu102", "kernel": "/boot/zynqmp-common/Image", "files": [ { - "path": "/boot/zynqmp-zcu102-rev10-fmclidar1/BOOT.BIN" + "path": "/boot/zynqmp-zcu102-rev10-stingray/BOOT.BIN" }, { - "path": "/boot/zynqmp-zcu102-rev10-fmclidar1/system.dtb" + "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" } ] }, @@ -1793,6 +1920,21 @@ "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" + } + ] } ] } From 62d9dfa6e63be7fa4dbfa94e3dbde8c348b4ddf0 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Tue, 16 Apr 2024 11:24:11 +0800 Subject: [PATCH 07/20] Add other boards Signed-off-by: Trecia Agoylo --- nebula/helper.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nebula/helper.py b/nebula/helper.py index b2ed187f..bc670e56 100644 --- a/nebula/helper.py +++ b/nebula/helper.py @@ -400,6 +400,7 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("adrv9371", "adrv9371"), ("adrv9375", "adrv9375"), ("cn0540", "cn0540"), + ("cn0579", "cn0579"), ("_daq2", "daq2"), ("fmcdaq2", "daq2"), ("fmcdaq3", "daq3"), @@ -415,11 +416,13 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("cn0501", "cn0501"), ("ad4020", "ad4020"), ("cn0363", "cn0363"), + ("cn0577", "cn0577"), ("imageon", "imageon"), - ("ad4630-24", "ad403x"), + ("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"), @@ -444,6 +447,7 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("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"), @@ -466,6 +470,8 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("adrv9002-rx2tx2-vcmos", "adrv9002_rx2tx2_cmos"), ("adrv9002-rx2tx2-vlvds", "adrv9002_rx2tx2_lvds"), ("ad9172-fmc-ebz-mode4", "ad9172_mode4"), + ("arradio", "sockit_arradio"), + ("adrv9025", "adrv9025"), ] with open(descriptor_file, "r") as f: From 7047b2561d2e57851a3317fe1e01628fa6c3970d Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Tue, 16 Apr 2024 11:33:08 +0800 Subject: [PATCH 08/20] helper: add checking if project is supported Signed-off-by: Trecia Agoylo --- nebula/helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nebula/helper.py b/nebula/helper.py index bc670e56..ca57964b 100644 --- a/nebula/helper.py +++ b/nebula/helper.py @@ -516,4 +516,8 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): for f in files: boot_files.append((project["name"], f["path"])) + # check if project is supported + if not boot_files: + raise Exception("Project not supported in this nebula version.") + return boot_files From f02d7eb0f6f1f76494ab18845dc5b603e5bfed89 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Tue, 21 May 2024 10:48:20 +0800 Subject: [PATCH 09/20] helper: fix filtering for adrv9002 Signed-off-by: Trecia Agoylo --- nebula/helper.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nebula/helper.py b/nebula/helper.py index ca57964b..27f04795 100644 --- a/nebula/helper.py +++ b/nebula/helper.py @@ -465,10 +465,12 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): ("ad9083-fmc-ebz", "ad9083"), ("adrv9008-1", "adrv9008-1"), ("adrv9008-2", "adrv9008-2"), - ("adrv9002-vcmos", "adrv9002_cmos"), - ("adrv9002-vlvds", "adrv9002_lvds"), - ("adrv9002-rx2tx2-vcmos", "adrv9002_rx2tx2_cmos"), - ("adrv9002-rx2tx2-vlvds", "adrv9002_rx2tx2_lvds"), + ("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"), @@ -517,6 +519,7 @@ def get_boot_files_from_descriptor(self, descriptor_file, project): 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.") From de2bb0fad51e438bb6df2b0c2b63e3d7a54811d4 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Wed, 22 May 2024 16:21:31 +0800 Subject: [PATCH 10/20] usbmux: modify support of updating bootfiles from sdcard Signed-off-by: Trecia Agoylo --- nebula/manager.py | 25 +++++++++++++++---------- nebula/usbmux.py | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/nebula/manager.py b/nebula/manager.py index 001fb015..fce47b55 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -555,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""" @@ -590,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") @@ -879,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") diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 00a37f3f..1d83143d 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -9,6 +9,7 @@ from pathlib import Path import pyudev +import nebula.helper as helper from usbsdmux import usbsdmux from nebula.common import utils @@ -35,6 +36,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) @@ -303,15 +305,43 @@ 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 + if 'self' in args: del args['self'] + args_status = all(loc==None for loc in args.values()) folder, boot_p = self._mount_sd_card() preloader_p = f"{self._target_sdcard}3" + if args_status: + h = helper() + descriptor_path = "nebula/resources/kuiper.json" + try: + kuiperjson_loc = os.path.join("/tmp/", folder, "kuiper.json") + os.path.isfile(kuiperjson_loc) + os.replace("kuiper.json", descriptor_path) + except Exception: + log.warning("Cannot find project descriptor on target") + boot_files_path = h.get_boot_files_from_descriptor(descriptor_path, self.board_name) + mount_path = os.path.join("/tmp/", folder ) + # 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 'tmp' in bootfile_loc: + bootfile_loc = bootfile_loc + else: + bootfile_loc = os.path.join("/tmp/", folder, bootfile_loc) if not os.path.isfile(bootfile_loc): options = os.listdir(f"/tmp/{folder}") options = [ @@ -335,6 +365,7 @@ def update_boot_files_from_sdcard_itself( if field == "extlinux_loc": os.system(f"mkdir -p /tmp/{folder}/extlinux") bootfile_name = "extlinux/" + bootfile_name + log.info(f"Copying {bootfile_loc}") os.system(f"cp {bootfile_loc} /tmp/{folder}/{bootfile_name}") log.info("Updated boot files successfully... unmounting") From 5f647d22eacc3bea45a76ae88e0c64e9c7dfae8a Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Thu, 23 May 2024 09:32:50 +0800 Subject: [PATCH 11/20] fix lint Signed-off-by: Trecia Agoylo --- nebula/manager.py | 2 +- nebula/usbmux.py | 32 +++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/nebula/manager.py b/nebula/manager.py index fce47b55..b5a72f25 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -555,7 +555,7 @@ def board_reboot_sdmux_pdu( extlinux_path=None, scr_path=None, preloader_path=None, - sdcard=False + sdcard=False, ): """Manager when sdcardmux, pdu is available""" diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 1d83143d..60c5f187 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -9,9 +9,9 @@ from pathlib import Path import pyudev -import nebula.helper as helper from usbsdmux import usbsdmux +import nebula.helper as helper from nebula.common import utils log = logging.getLogger(__name__) @@ -305,9 +305,10 @@ 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 - if 'self' in args: del args['self'] - args_status = all(loc==None for loc in args.values()) + # check if if all loc are still None + if "self" in args: + del args["self"] + 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" @@ -321,24 +322,33 @@ def update_boot_files_from_sdcard_itself( os.replace("kuiper.json", descriptor_path) except Exception: log.warning("Cannot find project descriptor on target") - boot_files_path = h.get_boot_files_from_descriptor(descriptor_path, self.board_name) - mount_path = os.path.join("/tmp/", folder ) + boot_files_path = h.get_boot_files_from_descriptor( + descriptor_path, self.board_name + ) + mount_path = os.path.join("/tmp/", folder) # 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'} + 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())) + args_filtered = dict(filter(lambda item: item[1] is not None, args.items())) try: for field, bootfile_loc in args_filtered.items(): if field in ["self"]: continue - if 'tmp' in bootfile_loc: + if "tmp" in bootfile_loc: bootfile_loc = bootfile_loc else: bootfile_loc = os.path.join("/tmp/", folder, bootfile_loc) From c3d9abe5328ea0a3b1b4a2bdd99a32232ca5b9d9 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Tue, 4 Jun 2024 14:19:18 +0800 Subject: [PATCH 12/20] tasks: update argument order Signed-off-by: Trecia Agoylo --- nebula/tasks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nebula/tasks.py b/nebula/tasks.py index 764d7622..4dce9e42 100644 --- a/nebula/tasks.py +++ b/nebula/tasks.py @@ -785,9 +785,9 @@ def gen_config_netbox( "uimagepath": "Path to kernel image.", "devtreepath": "Path to devicetree.", "folder": "Resource folder containing BOOT.BIN, kernel, device tree, and system_top.bit.\nOverrides other setting", - "sdcard": "Will use bootfiles from sd card if set to true", "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( @@ -797,9 +797,9 @@ def update_boot_files_jtag_manager( uimagepath="uImage", devtreepath="devicetree.dtb", folder=None, - sdcard=False, 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,9 +883,9 @@ def board_diagnostics_manager( "uimagepath": "Path to kernel image.", "devtreepath": "Path to devicetree.", "folder": "Resource folder containing BOOT.BIN, kernel, device tree, and system_top.bit.\nOverrides other setting", - "sdcard": "Get boot files from the sdcard", "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( @@ -895,9 +895,9 @@ def update_boot_files_manager( uimagepath="uImage", devtreepath="devicetree.dtb", folder=None, - sdcard=False, 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) From 9f713ea6781181fcc00cc7ceb4c37ef88a04a1b8 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Tue, 4 Jun 2024 14:55:16 +0800 Subject: [PATCH 13/20] usbmux: update checking of path argument Signed-off-by: Trecia Agoylo --- nebula/usbmux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 60c5f187..7560a6f2 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -348,10 +348,10 @@ def update_boot_files_from_sdcard_itself( for field, bootfile_loc in args_filtered.items(): if field in ["self"]: continue - if "tmp" in bootfile_loc: + if mount_path in bootfile_loc: bootfile_loc = bootfile_loc else: - bootfile_loc = os.path.join("/tmp/", folder, bootfile_loc) + bootfile_loc = os.path.join(mount_path, bootfile_loc) if not os.path.isfile(bootfile_loc): options = os.listdir(f"/tmp/{folder}") options = [ From b2bcf5c3d9a712962f8a53388d3b7fe87e022455 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Wed, 5 Jun 2024 12:20:20 +0800 Subject: [PATCH 14/20] update path handling Signed-off-by: Trecia Agoylo --- nebula/network.py | 3 ++- nebula/usbmux.py | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/nebula/network.py b/nebula/network.py index 779b9ffe..ad2e2ef5 100644 --- a/nebula/network.py +++ b/nebula/network.py @@ -294,7 +294,8 @@ def update_boot_partition_existing_files(self, subfolder=None): # extract needed boot files from the kuiper descriptor file h = helper() - descriptor_path = "nebula/resources/kuiper.json" + path = pathlib.Path(__file__).parent.absolute() + descriptor_path = os.path.join(path, "resources", "kuiper.json") try: self._dl_file("/tmp/sdcard/kuiper.json") os.replace("kuiper.json", descriptor_path) diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 7560a6f2..258c98b4 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 @@ -287,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, @@ -297,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. @@ -306,8 +309,8 @@ def update_boot_files_from_sdcard_itself( """ args = locals() # check if if all loc are still None - if "self" in args: - del args["self"] + 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() @@ -315,7 +318,11 @@ def update_boot_files_from_sdcard_itself( if args_status: h = helper() - descriptor_path = "nebula/resources/kuiper.json" + 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("/tmp/", folder, "kuiper.json") os.path.isfile(kuiperjson_loc) From 851530e4210bbd0be018d0c1ac6f19e37221aed3 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Wed, 5 Jun 2024 12:57:08 +0800 Subject: [PATCH 15/20] usbmux: update kuiper.json Signed-off-by: Trecia Agoylo --- nebula/usbmux.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 258c98b4..ea2a8a1a 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -315,24 +315,25 @@ def update_boot_files_from_sdcard_itself( 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 + 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("/tmp/", folder, "kuiper.json") + kuiperjson_loc = os.path.join(mount_path, "kuiper.json") os.path.isfile(kuiperjson_loc) - os.replace("kuiper.json", descriptor_path) + os.replace(kuiperjson_loc, descriptor_path) except Exception: log.warning("Cannot find project descriptor on target") boot_files_path = h.get_boot_files_from_descriptor( descriptor_path, self.board_name ) - mount_path = os.path.join("/tmp/", folder) + # update items to args for boot_file in boot_files_path: file_path = os.path.join(mount_path, boot_file[1].lstrip("/boot")) From ef6efc6b4d7478451b690d7088f4d092d00c3f44 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Wed, 5 Jun 2024 15:47:28 +0800 Subject: [PATCH 16/20] tests: add tests for bootfile update from sdcard Signed-off-by: Trecia Agoylo --- tests/test_usbsdmux.py | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/tests/test_usbsdmux.py b/tests/test_usbsdmux.py index f206a717..c0537f16 100644 --- a/tests/test_usbsdmux.py +++ b/tests/test_usbsdmux.py @@ -96,44 +96,48 @@ 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" - ), - "files": { - "bootbin_loc": os.path.join( - "socfpga_cyclone5_de10_nano_cn0540", "soc_system.rbf" + "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( + "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( + "extlinux_loc": os.path.join( "socfpga_cyclone5_de10_nano_cn0540", "extlinux.conf" ), - "scr_loc": os.path.join( + "scr_loc": os.path.join( "socfpga_cyclone5_de10_nano_cn0540", "u-boot.scr" ), - "preloader_loc": os.path.join( + "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") From 93e5225de82398bd082f0718aa30ba27cd482e85 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Wed, 5 Jun 2024 15:52:21 +0800 Subject: [PATCH 17/20] fix lint Signed-off-by: Trecia Agoylo --- tests/test_usbsdmux.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/tests/test_usbsdmux.py b/tests/test_usbsdmux.py index c0537f16..f1799b1d 100644 --- a/tests/test_usbsdmux.py +++ b/tests/test_usbsdmux.py @@ -97,27 +97,32 @@ 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( + "config", + [ + os.path.join( + os.path.dirname(__file__), "nebula_config", "nebula-manager-usbmux.yml" + ) + ], +) @pytest.mark.parametrize( "param", [ { "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" - ), + "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" - ), + "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" - ), + "socfpga_cyclone5_de10_nano_cn0540", "u-boot-with-spl.sfp" + ), }, { "bootbin_loc": None, @@ -126,7 +131,7 @@ def test_backup_files_to_external(power_off_dut, param): "extlinux_loc": None, "scr_loc": None, "preloader_loc": None, - } + }, ], ) def test_update_boot_files_from_sdcard_itself(power_off_dut, board, config, param): From ddb80c6d2bebaca83b5ab5d1b1054172fca64a19 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Thu, 6 Jun 2024 11:07:48 +0800 Subject: [PATCH 18/20] usbmux: add delay when copying files Signed-off-by: Trecia Agoylo --- nebula/usbmux.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nebula/usbmux.py b/nebula/usbmux.py index ea2a8a1a..4b822462 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -383,8 +383,10 @@ def update_boot_files_from_sdcard_itself( if field == "extlinux_loc": os.system(f"mkdir -p /tmp/{folder}/extlinux") bootfile_name = "extlinux/" + bootfile_name - log.info(f"Copying {bootfile_loc}") - 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}") + os.system(f"sync") + time.sleep(0.5) log.info("Updated boot files successfully... unmounting") finally: From c9bd53e0e247ae1168ec10b85e8c040b9b8f284d Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Thu, 6 Jun 2024 14:05:58 +0800 Subject: [PATCH 19/20] Set descriptor_path directly to kuiper.json path Signed-off-by: Trecia Agoylo --- nebula/network.py | 2 +- nebula/usbmux.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nebula/network.py b/nebula/network.py index ad2e2ef5..d0afc3c7 100644 --- a/nebula/network.py +++ b/nebula/network.py @@ -298,7 +298,7 @@ def update_boot_partition_existing_files(self, subfolder=None): descriptor_path = os.path.join(path, "resources", "kuiper.json") try: self._dl_file("/tmp/sdcard/kuiper.json") - os.replace("kuiper.json", descriptor_path) + descriptor_path = "kuiper.json" except Exception: log.warning("Cannot find project descriptor on target") diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 4b822462..2e0e3c43 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -327,7 +327,7 @@ def update_boot_files_from_sdcard_itself( try: kuiperjson_loc = os.path.join(mount_path, "kuiper.json") os.path.isfile(kuiperjson_loc) - os.replace(kuiperjson_loc, descriptor_path) + descriptor_path = kuiperjson_loc except Exception: log.warning("Cannot find project descriptor on target") boot_files_path = h.get_boot_files_from_descriptor( @@ -385,7 +385,7 @@ def update_boot_files_from_sdcard_itself( bootfile_name = "extlinux/" + 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}") - os.system(f"sync") + os.system("sync") time.sleep(0.5) log.info("Updated boot files successfully... unmounting") From 3de55cc7687431438258d68d9539785591a8de07 Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Mon, 15 Jul 2024 09:16:41 +0800 Subject: [PATCH 20/20] usbmux: remove sync command Signed-off-by: Trecia Agoylo --- nebula/usbmux.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nebula/usbmux.py b/nebula/usbmux.py index 2e0e3c43..ca02050b 100644 --- a/nebula/usbmux.py +++ b/nebula/usbmux.py @@ -385,7 +385,6 @@ def update_boot_files_from_sdcard_itself( bootfile_name = "extlinux/" + 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}") - os.system("sync") time.sleep(0.5) log.info("Updated boot files successfully... unmounting")