* updates for agnos 0.6

* timezone

* bump version
pull/20114/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent a0cdacbb2a
commit d169914674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      common/params_pyx.pyx
  2. 2
      launch_env.sh
  3. 14
      selfdrive/hardware/tici/agnos.json
  4. 12
      selfdrive/timezoned.py
  5. 7
      selfdrive/ui/qt/offroad/networking.cc
  6. 10
      selfdrive/ui/qt/setup/installer.cc

@ -58,6 +58,7 @@ keys = {
b"ReleaseNotes": [TxType.PERSISTENT], b"ReleaseNotes": [TxType.PERSISTENT],
b"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START], b"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START],
b"SubscriberInfo": [TxType.PERSISTENT], b"SubscriberInfo": [TxType.PERSISTENT],
b"SshEnabled": [TxType.PERSISTENT],
b"TermsVersion": [TxType.PERSISTENT], b"TermsVersion": [TxType.PERSISTENT],
b"Timezone": [TxType.PERSISTENT], b"Timezone": [TxType.PERSISTENT],
b"TrainingVersion": [TxType.PERSISTENT], b"TrainingVersion": [TxType.PERSISTENT],

@ -11,7 +11,7 @@ if [ -z "$REQUIRED_NEOS_VERSION" ]; then
fi fi
if [ -z "$AGNOS_VERSION" ]; then if [ -z "$AGNOS_VERSION" ]; then
export AGNOS_VERSION="0.5" export AGNOS_VERSION="0.6"
fi fi
if [ -z "$PASSIVE" ]; then if [ -z "$PASSIVE" ]; then

@ -1,18 +1,18 @@
[ [
{ {
"name": "system", "name": "system",
"url": "https://commadist.azureedge.net/agnosupdate-staging/system-c74abe031e98073efca757f07903ad356e4ccf583a8c54c643d060bafddcd874.img.xz", "url": "https://commadist.azureedge.net/agnosupdate-staging/system-f6c3e2b5b26e070a0b99afb004c2d48bba27ab1b85a48fcf87b43ca302faf614.img.xz",
"hash": "6313b8f6cfaecfe8d37bd1f25ff7781a2b312eac85db817bda08dd0268dc471b", "hash": "d51aedd84defed389eede52d2fa871846cc8d639bbf69215e0fb38ba25a47e42",
"hash_raw": "c74abe031e98073efca757f07903ad356e4ccf583a8c54c643d060bafddcd874", "hash_raw": "f6c3e2b5b26e070a0b99afb004c2d48bba27ab1b85a48fcf87b43ca302faf614",
"size": 10737418240, "size": 10737418240,
"sparse": true "sparse": true
}, },
{ {
"name": "boot", "name": "boot",
"url": "https://commadist.azureedge.net/agnosupdate-staging/boot-cf067c059a5c037c17659c97ec897f4e79271be67b1c9e6a602207a5a9e6f8a5.img.xz", "url": "https://commadist.azureedge.net/agnosupdate-staging/boot-d292aacf2f760e85c60c1a25adcecae9df2c80ee3f3240ea8592bbac369db038.img.xz",
"hash": "cf067c059a5c037c17659c97ec897f4e79271be67b1c9e6a602207a5a9e6f8a5", "hash": "d292aacf2f760e85c60c1a25adcecae9df2c80ee3f3240ea8592bbac369db038",
"hash_raw": "cf067c059a5c037c17659c97ec897f4e79271be67b1c9e6a602207a5a9e6f8a5", "hash_raw": "d292aacf2f760e85c60c1a25adcecae9df2c80ee3f3240ea8592bbac369db038",
"size": 14673920, "size": 14768128,
"sparse": false "sparse": false
} }
] ]

@ -1,12 +1,14 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import time
import json import json
import os
import time
import subprocess import subprocess
import requests import requests
from timezonefinder import TimezoneFinder from timezonefinder import TimezoneFinder
from common.params import Params from common.params import Params
from selfdrive.hardware import TICI
from selfdrive.swaglog import cloudlog from selfdrive.swaglog import cloudlog
@ -17,7 +19,13 @@ def set_timezone(valid_timezones, timezone):
cloudlog.info(f"Setting timezone to {timezone}") cloudlog.info(f"Setting timezone to {timezone}")
try: try:
subprocess.check_call(f'sudo timedatectl set-timezone {timezone}', shell=True) if TICI:
tzpath = os.path.join("/usr/share/zoneinfo/", timezone)
os.symlink(tzpath, "/data/etc/localtime")
with open("/data/etc/timezone", "w") as f:
f.write(timezone)
else:
subprocess.check_call(f'sudo timedatectl set-timezone {timezone}', shell=True)
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
cloudlog.exception(f"Error setting timezone to {timezone}") cloudlog.exception(f"Error setting timezone to {timezone}")

@ -7,6 +7,7 @@
#include <QRandomGenerator> #include <QRandomGenerator>
#include <QtConcurrent> #include <QtConcurrent>
#include "common/params.h"
#include "networking.hpp" #include "networking.hpp"
#include "util.h" #include "util.h"
@ -280,14 +281,12 @@ void AdvancedNetworking::toggleTethering(int enable) {
} }
void enableSSH(Toggle* toggle_switch_SSH){ void enableSSH(Toggle* toggle_switch_SSH){
system("sudo systemctl enable ssh"); Params().write_db_value("SshEnabled", "1");
system("sudo systemctl start ssh");
toggle_switch_SSH->setEnabled(true); toggle_switch_SSH->setEnabled(true);
} }
void disableSSH(Toggle* toggle_switch_SSH){ void disableSSH(Toggle* toggle_switch_SSH){
system("sudo systemctl stop ssh"); Params().write_db_value("SshEnabled", "0");
system("sudo systemctl disable ssh");
toggle_switch_SSH->setEnabled(true); toggle_switch_SSH->setEnabled(true);
} }

@ -25,18 +25,16 @@ int fresh_clone() {
int err; int err;
// Cleanup // Cleanup
err = std::system("rm -rf /tmp/openpilot /data/openpilot"); err = std::system("rm -rf /data/tmppilot /data/openpilot");
if (err) return 1; if (err) return 1;
// Clone // Clone
err = std::system("git clone " GIT_URL " -b " BRANCH " --depth=1 /tmp/openpilot"); err = std::system("git clone " GIT_URL " -b " BRANCH " --depth=1 --recurse-submodules /data/tmppilot");
if (err) return 1; if (err) return 1;
err = std::system("cd /tmp/openpilot && git submodule update --init"); err = std::system("cd /data/tmppilot && git remote set-url origin --push " GIT_SSH_URL);
if (err) return 1;
err = std::system("cd /tmp/openpilot && git remote set-url origin --push " GIT_SSH_URL);
if (err) return 1; if (err) return 1;
err = std::system("mv /tmp/openpilot /data"); err = std::system("mv /data/tmppilot /data/openpilot");
if (err) return 1; if (err) return 1;
#ifdef SSH_KEYS #ifdef SSH_KEYS

Loading…
Cancel
Save