parent
66fbce638f
commit
b16e612102
7 changed files with 0 additions and 127 deletions
Binary file not shown.
@ -1,2 +0,0 @@ |
|||||||
#!/usr/bin/bash |
|
||||||
echo "restart" > /sys/kernel/debug/msm_subsys/modem |
|
@ -1,16 +0,0 @@ |
|||||||
#!/data/data/com.termux/files/usr/bin/bash |
|
||||||
watch -n1 ' |
|
||||||
cat /sys/kernel/debug/clk/pwrcl_clk/measure |
|
||||||
cat /sys/kernel/debug/clk/perfcl_clk/measure |
|
||||||
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq |
|
||||||
cat /sys/class/kgsl/kgsl-3d0/gpuclk |
|
||||||
echo |
|
||||||
echo -n "CPU0 " ; cat /sys/devices/virtual/thermal/thermal_zone5/temp |
|
||||||
echo -n "CPU1 " ; cat /sys/devices/virtual/thermal/thermal_zone7/temp |
|
||||||
echo -n "CPU2 " ; cat /sys/devices/virtual/thermal/thermal_zone10/temp |
|
||||||
echo -n "CPU3 " ; cat /sys/devices/virtual/thermal/thermal_zone12/temp |
|
||||||
echo -n "MEM " ; cat /sys/devices/virtual/thermal/thermal_zone2/temp |
|
||||||
echo -n "GPU " ; cat /sys/devices/virtual/thermal/thermal_zone16/temp |
|
||||||
echo -n "BAT " ; cat /sys/devices/virtual/thermal/thermal_zone29/temp |
|
||||||
' |
|
||||||
|
|
Binary file not shown.
@ -1,19 +0,0 @@ |
|||||||
#!/usr/bin/env python3 |
|
||||||
# flake8: noqa |
|
||||||
|
|
||||||
# put 2 fingeprints and print the diffs |
|
||||||
f1 = { |
|
||||||
168: 8, 257: 5, 258: 8, 264: 8, 268: 8, 270: 8, 274: 2, 280: 8, 284: 8, 288: 7, 290: 6, 291: 8, 292: 8, 294: 8, 300: 8, 308: 8, 320: 8, 324: 8, 331: 8, 332: 8, 344: 8, 368: 8, 376: 3, 384: 8, 388: 4, 448: 6, 456: 4, 464: 8, 469: 8, 480: 8, 500: 8, 501: 8, 512: 8, 514: 8, 520: 8, 528: 8, 532: 8, 544: 8, 557: 8, 559: 8, 560: 8, 564: 8, 571: 3, 579: 8, 584: 8, 608: 8, 624: 8, 625: 8, 632: 8, 639: 8, 653: 8, 654: 8, 655: 8, 658: 6, 660: 8, 669: 3, 671: 8, 672: 8, 678: 8, 680: 8, 701: 8, 703: 8, 704: 8, 705: 8, 706: 8, 709: 8, 710: 8, 719: 8, 720: 6, 729: 5, 736: 8, 737: 8, 746: 5, 752: 2, 754: 8, 760: 8, 764: 8, 766: 8, 770: 8, 773: 8, 779: 8, 782: 8, 784: 8, 792: 8, 799: 8, 800: 8, 804: 8, 816: 8, 817: 8, 820: 8, 825: 2, 826: 8, 832: 8, 838: 2, 848: 8, 853: 8, 856: 4, 860: 6, 863: 8, 878: 8, 882: 8, 897: 8, 906: 8, 908: 8, 924: 8, 926: 3, 929: 8, 937: 8, 938: 8, 939: 8, 940: 8, 941: 8, 942: 8, 943: 8, 947: 8, 948: 8, 958: 8, 959: 8, 962: 8, 969: 4, 973: 8, 974: 5, 979: 8, 980: 8, 981: 8, 982: 8, 983: 8, 984: 8, 992: 8, 993: 7, 995: 8, 996: 8, 1000: 8, 1001: 8, 1002: 8, 1003: 8, 1008: 8, 1009: 8, 1010: 8, 1011: 8, 1012: 8, 1013: 8, 1014: 8, 1015: 8, 1024: 8, 1025: 8, 1026: 8, 1031: 8, 1033: 8, 1050: 8, 1059: 8, 1082: 8, 1083: 8, 1098: 8, 1100: 8, 1537: 8, 1538: 8, 1562: 8 |
|
||||||
} |
|
||||||
|
|
||||||
f2 = { |
|
||||||
168: 8, 257: 5, 258: 8, 264: 8, 268: 8, 270: 8, 274: 2, 280: 8, 284: 8, 288: 7, 290: 6, 291: 8, 292: 8, 294: 8, 300: 8, 308: 8, 320: 8, 324: 8, 331: 8, 332: 8, 344: 8, 368: 8, 376: 3, 384: 8, 388: 4, 448: 6, 456: 4, 464: 8, 469: 8, 480: 8, 500: 8, 501: 8, 512: 8, 514: 8, 515: 7, 516: 7, 517: 7, 518: 7, 520: 8, 528: 8, 532: 8, 542: 8, 544: 8, 557: 8, 559: 8, 560: 8, 564: 8, 571: 3, 579: 8, 584: 8, 608: 8, 624: 8, 625: 8, 632: 8, 639: 8, 653: 8, 654: 8, 655: 8, 658: 6, 660: 8, 669: 3, 671: 8, 672: 8, 678: 8, 680: 8, 701: 8, 703: 8, 704: 8, 705: 8, 706: 8, 709: 8, 710: 8, 719: 8, 720: 6, 729: 5, 736: 8, 737: 8, 746: 5, 752: 2, 754: 8, 760: 8, 764: 8, 766: 8, 770: 8, 773: 8, 779: 8, 782: 8, 784: 8, 792: 8, 799: 8, 800: 8, 804: 8, 816: 8, 817: 8, 820: 8, 825: 2, 826: 8, 832: 8, 838: 2, 848: 8, 853: 8, 856: 4, 860: 6, 863: 8, 878: 8, 882: 8, 897: 8, 906: 8, 908: 8, 924: 8, 926: 3, 929: 8, 937: 8, 938: 8, 939: 8, 940: 8, 941: 8, 942: 8, 943: 8, 947: 8, 948: 8, 958: 8, 959: 8, 962: 8, 969: 4, 973: 8, 974: 5, 979: 8, 980: 8, 981: 8, 982: 8, 983: 8, 984: 8, 992: 8, 993: 7, 995: 8, 996: 8, 1000: 8, 1001: 8, 1002: 8, 1003: 8, 1008: 8, 1009: 8, 1010: 8, 1011: 8, 1012: 8, 1013: 8, 1014: 8, 1015: 8, 1024: 8, 1025: 8, 1026: 8, 1031: 8, 1033: 8, 1050: 8, 1059: 8, 1082: 8, 1083: 8, 1098: 8, 1100: 8 |
|
||||||
} |
|
||||||
|
|
||||||
for k in f1: |
|
||||||
if k not in f2 or f1[k] != f2[k]: |
|
||||||
print(k, "not in f2") |
|
||||||
|
|
||||||
for k in f2: |
|
||||||
if k not in f1 or f2[k] != f1[k]: |
|
||||||
print(k, "not in f1") |
|
@ -1,23 +0,0 @@ |
|||||||
#!/usr/bin/env python3 |
|
||||||
import os |
|
||||||
import sys |
|
||||||
import time |
|
||||||
|
|
||||||
print("starting at") |
|
||||||
os.system("cat /sys/kernel/debug/regulator/pm8994_s11/voltage") |
|
||||||
print("volts") |
|
||||||
|
|
||||||
os.system("echo 99e8000.cpr3-ctrl > /sys/devices/soc/spm-regulator-10/regulator/regulator.56/99e8000.cpr3-ctrl-vdd/driver/unbind") |
|
||||||
os.system("echo 1 > /sys/kernel/debug/regulator/pm8994_s11/enable") |
|
||||||
|
|
||||||
if len(sys.argv) > 1: |
|
||||||
i = int(sys.argv[1]) |
|
||||||
os.system("echo %d %d > /sys/kernel/debug/regulator/pm8994_s11/voltage" % (i,i)) |
|
||||||
os.system("cat /sys/kernel/debug/regulator/pm8994_s11/voltage") |
|
||||||
else: |
|
||||||
for i in range(900000, 465000, -10000): |
|
||||||
print("setting voltage to",i) |
|
||||||
os.system("echo %d %d > /sys/kernel/debug/regulator/pm8994_s11/voltage" % (i,i)) |
|
||||||
os.system("cat /sys/kernel/debug/regulator/pm8994_s11/voltage") |
|
||||||
time.sleep(1) |
|
||||||
|
|
@ -1,67 +0,0 @@ |
|||||||
#!/usr/bin/python3 |
|
||||||
import sys |
|
||||||
import os |
|
||||||
import stat |
|
||||||
import subprocess |
|
||||||
import json |
|
||||||
from common.text_window import TextWindow |
|
||||||
import time |
|
||||||
|
|
||||||
# Required for sensord not to bus-error on startup |
|
||||||
# commaai/cereal#22 |
|
||||||
try: |
|
||||||
os.mkdir("/dev/shm") |
|
||||||
except FileExistsError: |
|
||||||
pass |
|
||||||
except PermissionError: |
|
||||||
print("WARNING: failed to make /dev/shm") |
|
||||||
|
|
||||||
try: |
|
||||||
with open('/tmp/sensor-test-results.json') as infile: |
|
||||||
data = json.load(infile) |
|
||||||
except Exception: |
|
||||||
data = {'sensor-pass': 0, 'sensor-fail': 0} |
|
||||||
|
|
||||||
STARTUP_SCRIPT = "/data/data/com.termux/files/continue.sh" |
|
||||||
try: |
|
||||||
with open(STARTUP_SCRIPT, 'w') as startup_script: |
|
||||||
startup_script.write("#!/usr/bin/bash\n\n/data/openpilot/selfdrive/debug/internal/sensor_test_bootloop.py\n") |
|
||||||
os.chmod(STARTUP_SCRIPT, stat.S_IRWXU) |
|
||||||
except Exception: |
|
||||||
print("Failed to install new startup script -- aborting") |
|
||||||
sys.exit(-1) |
|
||||||
|
|
||||||
sensord_env = {**os.environ, 'SENSOR_TEST': '1'} |
|
||||||
process = subprocess.run("./sensord", cwd="/data/openpilot/selfdrive/sensord", env=sensord_env) # pylint: disable=subprocess-run-check |
|
||||||
|
|
||||||
if process.returncode == 40: |
|
||||||
text = "Current run: SUCCESS\n" |
|
||||||
data['sensor-pass'] += 1 |
|
||||||
else: |
|
||||||
text = "Current run: FAIL\n" |
|
||||||
data['sensor-fail'] += 1 |
|
||||||
|
|
||||||
timestr = str(int(time.time())) |
|
||||||
with open('/tmp/dmesg-' + timestr + '.log', 'w') as dmesg_out: |
|
||||||
subprocess.call('dmesg', stdout=dmesg_out, shell=False) |
|
||||||
with open("/tmp/logcat-" + timestr + '.log', 'w') as logcat_out: |
|
||||||
subprocess.call(['logcat', '-d'], stdout=logcat_out, shell=False) |
|
||||||
|
|
||||||
text += "Sensor pass history: " + str(data['sensor-pass']) + "\n" |
|
||||||
text += "Sensor fail history: " + str(data['sensor-fail']) + "\n" |
|
||||||
|
|
||||||
print(text) |
|
||||||
|
|
||||||
with open('/tmp/sensor-test-results.json', 'w') as outfile: |
|
||||||
json.dump(data, outfile, indent=4) |
|
||||||
|
|
||||||
with TextWindow(text) as status: |
|
||||||
for _ in range(100): |
|
||||||
if status.get_status() == 1: |
|
||||||
with open(STARTUP_SCRIPT, 'w') as startup_script: |
|
||||||
startup_script.write("#!/usr/bin/bash\n\ncd /data/openpilot\nexec ./launch_openpilot.sh\n") |
|
||||||
os.chmod(STARTUP_SCRIPT, stat.S_IRWXU) |
|
||||||
break |
|
||||||
time.sleep(0.1) |
|
||||||
|
|
||||||
subprocess.Popen("reboot") |
|
Loading…
Reference in new issue