示例#1
0
 def check_item(self):
     rootfs = launch_cfg_lib.get_rootdev_info(self.board_info)
     launch_cfg_lib.args_aval_check(self.args["uos_type"], "uos_type", launch_cfg_lib.UOS_TYPES)
     launch_cfg_lib.args_aval_check(self.args["rtos_type"], "rtos_type", launch_cfg_lib.RTOS_TYPE)
     launch_cfg_lib.args_aval_check(self.args["gvt_args"], "gvt_args", launch_cfg_lib.GVT_ARGS)
     launch_cfg_lib.args_aval_check(self.args["vbootloader"], "vbootloader", launch_cfg_lib.BOOT_TYPE)
     launch_cfg_lib.args_aval_check(self.args["console_type"], "console_type", launch_cfg_lib.REDIRECT_CONSOLE)
     launch_cfg_lib.args_aval_check(self.args["rootfs_dev"], "rootfs_dev", rootfs)
示例#2
0
 def check_item(self):
     rootfs = launch_cfg_lib.get_rootdev_info(self.board_info)
     launch_cfg_lib.args_aval_check(self.args["uos_type"], "uos_type",
                                    launch_cfg_lib.UOS_TYPES)
     launch_cfg_lib.args_aval_check(self.args["rtos_type"], "rtos_type",
                                    launch_cfg_lib.RTOS_TYPE)
     launch_cfg_lib.mem_size_check(self.args["mem_size"], "mem_size")
     launch_cfg_lib.args_aval_check(self.args["vbootloader"], "vbootloader",
                                    launch_cfg_lib.BOOT_TYPE)
     launch_cfg_lib.args_aval_check(self.args["vuart0"], "vuart0",
                                    launch_cfg_lib.DM_VUART0)
示例#3
0
def is_mount_needed(virt_io, vmid):
    rootfs_img = ''
    blk_dev_list = launch_cfg_lib.get_rootdev_info(
        launch_cfg_lib.BOARD_INFO_FILE)
    if virt_io['block'][vmid]:
        if ':' in virt_io['block'][vmid]:
            blk_dev = virt_io['block'][vmid].split(':')[0]
            rootfs_img = virt_io['block'][vmid].split(':')[1]
        else:
            blk_dev = virt_io['block'][vmid]

        if blk_dev in blk_dev_list and rootfs_img:
            return True

    return False
示例#4
0
def get_launch_item_values(board_info):
    """
    Get items which capable multi select for user
    :param board_info: it is a file what contains board information for script to read from
    """
    launch_item_values = {}

    # passthrough devices
    pthru = AvailablePthru(board_info)
    pthru.get_pci_dev()
    pthru.insert_nun()

    # pre passthrough device for ui
    launch_item_values["uos,passthrough_devices,usb_xdci"] = pthru.avl[
        "usb_xdci"]
    launch_item_values["uos,passthrough_devices,ipu"] = pthru.avl["ipu"]
    launch_item_values["uos,passthrough_devices,ipu_i2c"] = pthru.avl[
        "ipu_i2c"]
    launch_item_values["uos,passthrough_devices,cse"] = pthru.avl["cse"]
    launch_item_values["uos,passthrough_devices,audio"] = pthru.avl["audio"]
    launch_item_values["uos,passthrough_devices,audio_codec"] = pthru.avl[
        "audio_codec"]
    launch_item_values["uos,passthrough_devices,sd_card"] = pthru.avl[
        "sd_card"]
    launch_item_values["uos,passthrough_devices,wifi"] = pthru.avl["wifi"]
    launch_item_values["uos,passthrough_devices,ethernet"] = pthru.avl[
        "ethernet"]
    launch_item_values["uos,passthrough_devices,sata"] = pthru.avl["sata"]
    launch_item_values["uos,passthrough_devices,nvme"] = pthru.avl["nvme"]
    launch_item_values["uos,passthrough_devices,bluetooth"] = pthru.avl[
        "bluetooth"]

    # acrn dm available optargs
    launch_item_values['uos,uos_type'] = launch_cfg_lib.UOS_TYPES
    launch_item_values["uos,rtos_type"] = launch_cfg_lib.RTOS_TYPE
    launch_item_values["uos,rootfs_dev"] = launch_cfg_lib.get_rootdev_info(
        board_info)

    launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE
    launch_item_values['uos,console_type'] = launch_cfg_lib.REDIRECT_CONSOLE
    launch_item_values['uos,gvt_args'] = launch_cfg_lib.GVT_ARGS

    return launch_item_values