diff --git a/Dockerfile.agnos b/Dockerfile.agnos index f3ee290..456aa8e 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -150,15 +150,6 @@ COPY ./userspace/usr/share/fonts/* /usr/share/fonts/ COPY ./userspace/libs/* /usr/lib/aarch64-linux-gnu/ COPY ./userspace/libs32/* /usr/lib/arm-linux-gnueabihf/ -# copy of panda python lib -RUN cd /tmp/ && \ - git clone https://github.com/commaai/panda.git && \ - cd panda && \ - git fetch --all && \ - git checkout dd78b2bf6c9d63ef59e81d0c400e85c8b477a8be && \ - mkdir /usr/comma/panda/ && \ - mv __init__.py python/ /usr/comma/panda/ - # kernel headers for the AGNOS kernel (built on device) COPY ./userspace/files/linux-headers-4.9.103+_4.9.103+-1_arm64.deb /tmp/ RUN dpkg -i /tmp/linux-headers-4.9.103+_4.9.103+-1_arm64.deb diff --git a/userspace/files/set_time.service b/userspace/files/set_time.service deleted file mode 100644 index ecaff3c..0000000 --- a/userspace/files/set_time.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] - -[Service] -Type=oneshot -ExecStart=/usr/local/pyenv/shims/python -u /usr/comma/set_time.py - -[Install] -WantedBy=multi-user.target diff --git a/userspace/services.sh b/userspace/services.sh index 9f89013..61947ce 100755 --- a/userspace/services.sh +++ b/userspace/services.sh @@ -23,7 +23,6 @@ systemctl enable ssh-param-watcher.path systemctl enable ssh-param-watcher.service systemctl enable home.mount systemctl enable logrotate-hourly.timer -systemctl enable set_time.service systemctl enable phantom_touch_logger.service # Disable some of our services diff --git a/userspace/usr/comma/set_time.py b/userspace/usr/comma/set_time.py deleted file mode 100755 index 3b2de9c..0000000 --- a/userspace/usr/comma/set_time.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python3 -import datetime -import os -import sys -from pathlib import Path - -here = os.path.dirname(os.path.realpath(__file__)) -sys.path.insert(0, here) -from panda import Panda - -# Systemd pushes the system time to the systemd build time if no time is set -MIN_DATE = datetime.datetime.fromtimestamp(Path("/lib/systemd/systemd").stat().st_mtime) -MIN_DATE += datetime.timedelta(days=1) - -if __name__ == "__main__": - sys_time = datetime.datetime.today() - print(f"System time: {sys_time}") - if sys_time > MIN_DATE: - print("System time valid") - exit() - - ps = Panda.list() - if len(ps) == 0: - print("Failed to set time, no pandas found") - exit() - - for s in ps: - with Panda(serial=s) as p: - if not p.is_internal(): - continue - - # Set system time from panda RTC time - panda_time = p.get_datetime() - print(f"panda time: {panda_time}") - if panda_time > MIN_DATE: - print(f"adjusting time from '{sys_time}' to '{panda_time}'") - os.system(f"TZ=UTC date -s '{panda_time}'") - else: - print("panda time invalid") - break - else: - print("No internal pandas found") diff --git a/userspace/usr/comma/tests/test_agnos.py b/userspace/usr/comma/tests/test_agnos.py index 4150367..1db914e 100755 --- a/userspace/usr/comma/tests/test_agnos.py +++ b/userspace/usr/comma/tests/test_agnos.py @@ -51,10 +51,6 @@ def test_color_calibration(): def test_python_shims(): subprocess.check_call("cd /data/openpilot && scons -h", shell=True, stdout=subprocess.DEVNULL) -def test_set_time(): - # TODO: ensure time is set from panda RTC - pass - def test_dmesg(): # TODO: ensure no new errors in dmesg. would catch things like the brightness setting bug pass