wlauto.devices.android.tc2 package

Module contents

class wlauto.devices.android.tc2.TC2Device(**kwargs)[source]

Bases: wlauto.common.android.device.BigLittleDevice

a15_governor_tunables
a15_only_modes = ['mp_a15_only', 'iks_a15']
a7_governor_tunables
a7_only_modes = ['mp_a7_only', 'iks_a7', 'iks_cpu']
aliases = AC([])
artifacts = AC([])
boot(**kwargs)[source]
connect()[source]
core_clusters
core_modules = []
core_names
cpu_cores
description = "\n TC2 is a development board, which has three A7 cores and two A15 cores.\n\n TC2 has a number of boot parameters which are:\n\n :root_mount: Defaults to '/media/VEMSD'\n :boot_firmware: It has only two boot firmware options, which are\n uefi and bootmon. Defaults to 'uefi'.\n :fs_medium: Defaults to 'usb'.\n :device_working_directory: The direcitory that WA will be using to copy\n files to. Defaults to 'data/local/usecase'\n :serial_device: The serial device which TC2 is connected to. Defaults to\n '/dev/ttyS0'.\n :serial_baud: Defaults to 38400.\n :serial_max_timeout: Serial timeout value in seconds. Defaults to 600.\n :serial_log: Defaults to standard output.\n :init_timeout: The timeout in seconds to init the device. Defaults set\n to 30.\n :always_delete_uefi_entry: If true, it will delete the ufi entry.\n Defaults to True.\n :psci_enable: Enabling the psci. Defaults to True.\n :host_working_directory: The host working directory. Defaults to None.\n :disable_boot_configuration: Disables boot configuration through images.txt and board.txt. When\n this is ``True``, those two files will not be overwritten in VEMSD.\n This option may be necessary if the firmware version in the ``TC2``\n is not compatible with the templates in WA. Please note that enabling\n this will prevent you form being able to set ``boot_firmware`` and\n ``mode`` parameters. Defaults to ``False``.\n\n TC2 can also have a number of different booting mode, which are:\n\n :mp_a7_only: Only the A7 cluster.\n :mp_a7_bootcluster: Both A7 and A15 clusters, but it boots on A7\n cluster.\n :mp_a15_only: Only the A15 cluster.\n :mp_a15_bootcluster: Both A7 and A15 clusters, but it boots on A15\n clusters.\n :iks_cpu: Only A7 cluster with only 2 cpus.\n :iks_a15: Only A15 cluster.\n :iks_a7: Same as iks_cpu\n :iks_ns_a15: Both A7 and A15 clusters.\n :iks_ns_a7: Both A7 and A15 clusters.\n\n The difference between mp and iks is the scheduling policy.\n\n TC2 takes the following runtime parameters\n\n :a7_cores: Number of active A7 cores.\n :a15_cores: Number of active A15 cores.\n :a7_governor: CPUFreq governor for the A7 cluster.\n :a15_governor: CPUFreq governor for the A15 cluster.\n :a7_min_frequency: Minimum CPU frequency for the A7 cluster.\n :a15_min_frequency: Minimum CPU frequency for the A15 cluster.\n :a7_max_frequency: Maximum CPU frequency for the A7 cluster.\n :a15_max_frequency: Maximum CPU frequency for the A7 cluster.\n :irq_affinity: lambda x: Which cluster will receive IRQs.\n :cpuidle: Whether idle states should be enabled.\n :sysfile_values: A dict mapping a complete file path to the value that\n should be echo'd into it. By default, the file will be\n subsequently read to verify that the value was written\n into it with DeviceError raised otherwise. For write-only\n files, this check can be disabled by appending a ``!`` to\n the end of the file path.\n\n "
disable_idle_states()[source]

Disable idle states on TC2. See http://wiki.arm.com/Research/TC2SetupAndUsage (“Enabling Idle Modes” section) and http://wiki.arm.com/ASD/ControllingPowerManagementInLinaroKernels

disconnect()[source]
dynamic_modules = AC(["{'devcpufreq': {}}", "{'cpuidle': {}}"])
enable_idle_states()[source]

Fully enables idle states on TC2. See http://wiki.arm.com/Research/TC2SetupAndUsage (“Enabling Idle Modes” section) and http://wiki.arm.com/ASD/ControllingPowerManagementInLinaroKernels

finalize(*args, **kwargs)
get_cpuidle()[source]
get_mode()[source]
has_gpu = False
initialize(*args, **kwargs)
kind = 'device'
max_a15_cores
max_a7_cores
mode
name = 'TC2'
not_configurable_modes = ['iks_a7', 'iks_cpu', 'iks_a15']
parameters = AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'_overridden': 'TC2Device', 'kind': <class 'wlauto.utils.types.list_of_caseless_strings'>, 'mandatory': False, 'name': 'core_names', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': True})", "Param({'_overridden': 'TC2Device', 'kind': <function list_of_ints>, 'mandatory': False, 'name': 'core_clusters', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': True})", "Param({'_overridden': 'BigLittleDevice', 'kind': <type 'str'>, 'mandatory': None, 'name': 'scheduler', 'constraint': None, 'default': 'hmp', 'allowed_values': ['unknown', 'smp', 'hmp', 'iks', 'ea', 'other'], 'global_alias': None, 'override': True})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'iks_switch_frequency', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function list_of_strs>, 'mandatory': None, 'name': 'property_files', 'constraint': None, 'default': ['/etc/arch-release', '/etc/debian_version', '/etc/lsb-release', '/proc/config.gz', '/proc/cmdline', '/proc/cpuinfo', '/proc/version', '/proc/zconfig', '/sys/kernel/debug/sched_features', '/sys/kernel/hmp'], 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'_overridden': 'AndroidDevice', 'kind': <type 'str'>, 'mandatory': None, 'name': 'binaries_directory', 'constraint': None, 'default': '/data/local/tmp/wa-bin', 'allowed_values': None, 'global_alias': None, 'override': True})", "Param({'_overridden': 'AndroidDevice', 'kind': <type 'str'>, 'mandatory': None, 'name': 'working_directory', 'constraint': None, 'default': '/sdcard/wa-working', 'allowed_values': None, 'global_alias': None, 'override': True})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'adb_name', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function regex>, 'mandatory': None, 'name': 'android_prompt', 'constraint': None, 'default': <_sre.SRE_Pattern object>, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'package_data_directory', 'constraint': None, 'default': '/data/data', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'external_storage_directory', 'constraint': None, 'default': '/sdcard', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'connection', 'constraint': None, 'default': 'usb', 'allowed_values': ['usb', 'ethernet'], 'global_alias': None, 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'logcat_poll_period', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'enable_screen_check', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'swipe_to_unlock', 'constraint': None, 'default': None, 'allowed_values': [None, 'horizontal', 'vertical'], 'global_alias': None, 'override': False})"])
runtime_parameters = AC(['sysfile_values', '${core}_cores', '${core}_min_frequency', '${core}_max_frequency', '${core}_frequency', '${core}_governor', '${core}_governor_tunables', 'irq_affinity', 'cpuidle'])
set_irq_affinity(cluster)[source]

Set’s IRQ affinity to the specified cluster.

This method will only work if the device mode is mp_a7_bootcluster or mp_a15_bootcluster. This operation does not make sense if there is only one cluster active (all IRQs will obviously go to that), and it will not work for IKS kernel because clusters are not exposed to sysfs.

Parameters:cluster – must be either ‘a15’ or ‘a7’.
set_mode(mode)[source]
validate(*args, **kwargs)