Lines Matching +full:mali +full:- +full:fw
3 # Use of this source code is governed by a BSD-style license that can be
10 # pylint: disable=missing-docstring
75 if magic.guess_type(file) == 'application/x-bzip2':
77 elif magic.guess_type(file) == 'application/x-gzip':
88 the top level of a tarball is - useful for versioned directory names, etc
104 extracted = cat_file_to_cmd(tarball, 'tar xvf - 2>/dev/null',
140 return not utils.system('egrep -q "' + pattern + '" ' + file,
157 if os.path.isfile('/etc/SuSE-release'):
191 vmlinux = '/boot/vmlinux-%s' % utils.system_output('uname -r')
194 vmlinux = '/lib/modules/%s/build/vmlinux' % utils.system_output('uname -r')
205 map = '/boot/System.map-%s' % utils.system_output('uname -r')
208 map = '/lib/modules/%s/build/System.map' % utils.system_output('uname -r')
216 kernel_version = utils.system_output('uname -r')
245 # Using 'uname -m' should be a very portable way to do this since the
247 machine_name = utils.system_output('uname -m').strip()
251 # - On most of our arm devices we'll actually see the string armv7l.
252 # - In theory the machine name could include a suffix for endianness.
336 '06_3F': 'Haswell-E',
340 '06_3E': 'Ivy Bridge-E',
378 'Sandy Bridge', 'Ivy Bridge', 'Ivy Bridge-E', 'Haswell', 'Haswell-E',
388 underscore-separated hex (per Intel manual convention) if the uarch is not
412 raise error.TestError("Doing Intel test for non-Intel hardware.")
460 with open('/sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj') as fd:
465 """Get the machine architecture, now just a wrap of 'uname -m'."""
466 return os.popen('uname -m').read().rstrip()
519 # to next small multiple of a big power-of-two
520 # eg 12GB - 5.1% gets rounded back up to 12GB
531 min_kbytes = int(usable_kbytes / (1.0 - mindeduct))
533 round_kbytes = int(usable_kbytes / (1.0 - maxdeduct)) - min_kbytes
534 # find least binary roundup 2**n that covers worst-cast roundKb
538 phys_kbytes = min_kbytes + mod2n - 1
539 phys_kbytes = phys_kbytes - (phys_kbytes % mod2n) # clear low bits
562 name = m.group(1) + '_' + m.group(2)[1:-1]
575 @return The single-line sysctl value as a string.
598 Gets this information by parsing /proc/sys/fs/file-nr.
602 with _open_file('/proc/sys/fs/file-nr') as f:
666 version = utils.system_output('uname -r')
668 '/boot/config-%s' % version,
681 if magic.guess_type(config) == 'application/x-gzip':
693 glibc_ver = subprocess.check_output("ldd --version", shell=True)
700 if utils.compare_versions(glibc_ver, ver) == -1:
705 kernel_ver = utils.system_output('uname -r')
706 kv_tmp = re.split(r'[-]', kernel_ver)[0:3]
707 # In compare_versions, if v1 < v2, return value == -1
708 if utils.compare_versions(kv_tmp[0], ver) == -1:
735 _DISK_PARTITION_3_RE = re.compile(r'^(/dev/hd[a-z]+)3', re.M)
772 cmd1 = 'udevadm info --query=property --name=%s' % disk_name
773 cmd2 = 'grep -E "ID_(NAME|MODEL)="'
774 cmd3 = 'cut -f 2 -d"="'
779 _DISK_DEV_RE = re.compile(r'/dev/sd[a-z]|'
780 r'/dev/mmcblk[0-9]+|'
781 r'/dev/nvme[0-9]+n[0-9]+')
804 cmd = 'rootdev -d -s'
812 elif dmsetup_output[2] in ['thin', 'thin-pool', 'linear']:
816 cmd = 'losetup -O BACK-FILE "%s" | tail -1' % filename
818 cmd = 'df "%s" | tail -1 | cut -f 1 -d" "' % filename
830 cmd1 = 'udevadm info --query=property --name=%s' % disk_name
831 cmd2 = 'grep -E "ID_REVISION="'
832 cmd3 = 'cut -f 2 -d"="'
843 return re.match('/dev/nvme[0-9]+n[0-9]+', disk_name)
852 return re.match('/dev/sd[a-z]+', disk_name)
861 cmd1 = 'udevadm info --query=property --name=%s' % disk_name
862 cmd2 = 'grep -E "ID_ATA_ROTATION_RATE_RPM="'
863 cmd3 = 'cut -f 2 -d"="'
876 sda, 3 --> sda3
877 mmcblk0, 3 --> mmcblk0p3
895 cmd = 'hdparm -I %s | grep -q "%s"' % (disk_name, feature)
906 Return feature value for NVMe disk using nvme id-ns
911 cmd = "nvme id-ns -n 1 %s | grep %s" % (disk_name, feature)
934 fw = get_disk_firmware_version(disk_name)
935 msg += ' firmware: %s' % fw
960 cmd = 'iostat -d -k -g ALL -H %s' % device
987 module_name = module_name.replace('-', '_')
996 utils.system("/sbin/modprobe -r %s" % module_name)
1003 module_name = module_name.replace('-', '_')
1019 cmd = 'ping %s -c 5 > /dev/null' % gw
1040 to be passed to the --date argument of hwclock.
1042 @param rtc: String to be passed to the --rtc arg of hwclock.
1043 @param noadjfile: Boolean of whether to use --noadjfile flag with hwclock.
1048 cmd += ' --systohc'
1050 cmd += ' --set --date "{}"'.format(time)
1052 cmd += ' --utc'
1054 cmd += ' --localtime'
1056 cmd += ' --rtc={}'.format(rtc)
1058 cmd += ' --noadjfile'
1063 Set the hardware RTC-based wake alarm to 'alarm_time'.
1078 "dpkg-query -W -f='${Status}\n' %s | head -n1 | awk '{print $3;}' | "
1079 "grep -q '^installed$'")
1128 8602 ? 00:00:00 chrome-sandbox
1131 chrome-sandbox would not be matched.
1143 str_pid = utils.system_output('pgrep -o ^%s$' % name,
1159 command_line = utils.system_output('ps -p %i -o command=' % pid,
1171 matches = re.search('--remote-debugging-port=([0-9]+)', command)
1186 31475 ? 0:06 /opt/google/chrome/chrome --allow-webui-compositing -
1187 31478 ? 0:00 /opt/google/chrome/chrome-sandbox /opt/google/chrome/
1188 31485 ? 0:00 /opt/google/chrome/chrome --type=zygote --log-level=1
1189 31532 ? 1:05 /opt/google/chrome/chrome --type=renderer
1194 get_process_list('chrome', '--type=renderer')
1209 flag = '-x' if not command_line else '-f'
1261 checkpoint - Name used to identify this state
1350 """Parse delimiter-separated key-val output into a set of tuples.
1353 Stuffs the key-vals into tuples in a set to be later compared.
1359 @param out: multiple lines of space-separated key-val pairs.
1362 @return set of key-val tuples.
1408 """Computes the fraction of CPU time spent non-idling.
1429 return ((float(time_active_end) - time_active_start) /
1430 (total_time_end - total_time_start))
1483 cmd = 'top -b -n1 -c'
1515 # critical - 10'C).
1543 _TEMP_SENSOR_RE = 'Reading temperature...([0-9]*)'
1610 cdev_type.startswith('thermal-devfreq') or
1611 cdev_type.startswith('thermal-cpufreq')):
1632 cmd = 'find /sys/class /sys/devices -name "' + file_pattern + '"'
1683 temperature = int(matched.group(1)) - 273
1704 temperature = -1
1716 max_frequency = -1
1736 Get a specific property from /etc/lsb-release.
1742 with open('/etc/lsb-release') as f:
1752 Get the ChromeOS release board name from /etc/lsb-release.
1759 Get the ChromeOS board type from /etc/lsb-release.
1768 Get the ChromeOS build version from /etc/lsb-release.
1777 Get the Android SDK version from /etc/lsb-release.
1795 For unibuild this should be equal to model name. For non-unibuild
1814 return cros_config.call_cros_config_get_output('/identity sku-id',
1823 command = 'mosys ec info -s fw_version'
1863 return utils.run('uname -r').stdout.strip()
1873 if os.path.exists("/proc/device-tree/compatible"):
1874 command = "sed -e 's/\\x0/\\n/g' /proc/device-tree/compatible | tail -1"
1878 # Get cpu name from uname -p
1879 command = "uname -p"
1882 # 'uname -p' return variant of unknown or amd64 or x86_64 or i686
1884 if re.match("unknown|amd64|[ix][0-9]?86(_64)?", ret, re.IGNORECASE):
1885 command = "grep model.name /proc/cpuinfo | cut -f 2 -d: | head -1"
1889 # 'Intel(R) Core(TM) i5-7Y57 CPU @ 1.20GHz' -> 'Intel Core i5-7Y57'
1890 # 'Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz' -> 'Intel Xeon E5-2690 v4'
1891 # 'AMD A10-7850K APU with Radeon(TM) R7 Graphics' -> 'AMD A10-7850K'
1892 # 'AMD GX-212JC SOC with Radeon(TM) R2E Graphics' -> 'AMD GX-212JC'
1904 command = 'for f in /sys/class/drm/*/*/modes; do head -1 $f; done'
1916 link -> link_1.8GHz_4GB.
1925 frequency = int(round(get_cpu_max_frequency() * 1e-8)) * 0.1
2000 return 'wflinfo -p %s -a %s' % (graphics_platform(), graphics_api())
2004 """ @return: True if system has a Mali GPU enabled."""
2018 m = re.findall(r'OpenGL renderer string: (Mali-\w+)', wflinfo)
2021 return 'mali-unrecognized'
2053 # TODO(ihf): Consider using /etc/lsb-release DEVICETYPE != CHROMEBOOK/CHROMEBASE
2055 # src/third_party/chromiumos-overlay/eclass/appid.eclass
2063 """Returns whether a machine doesn't have a built-in monitor."""
2077 '. /usr/share/misc/chromeos-common.sh;',
2086 Will return correct disk device even system boot from /dev/dm-0
2089 return utils.system_output('rootdev -s -d')
2098 cmd = 'lsblk -dpn -o NAME | grep -v -E "(loop|zram|boot|rpmb)"'
2102 if not re.match(r'/dev/(sd[a-z]|mmcblk[0-9]+|nvme[0-9]+)p?[0-9]*', dev):
2114 return utils.system_output('rootdev -s')
2127 return root_part[:-1] + spare_root_map[root_part[-1]]
2140 return root_part[:-1] + current_kernel_map[root_part[-1]]
2152 return kernel_part[:-1] + spare_kernel_map[kernel_part[-1]]
2229 cmd = ('mysql -u%s -p%s --host %s %s -e "%s"' %
2250 This function traverses recursively through any sequence-like and
2251 dict-like elements in obj.
2321 Most of the string-like types could be traced to basestring and bytearray
2331 class for string-like types.
2415 bytearray) and decode the bytes to str. For unknown encoding, try UTF-8.
2430 guessed_encoding = 'utf-8'