Tici updated (#2126)

* run updated on tici

* do this for now

* two didn't like empty string

* fix permissions
old-commit-hash: 38ded9b1e7
This commit is contained in:
Adeeb Shihadeh
2020-10-02 16:36:20 -07:00
committed by GitHub
parent 0184a43999
commit d05c8e2a08
2 changed files with 13 additions and 8 deletions

View File

@@ -221,15 +221,11 @@ persistent_processes = [
if not PC:
persistent_processes += [
'updated',
'logcatd',
'tombstoned',
]
if ANDROID:
persistent_processes += [
'updated',
]
car_started_processes = [
'controlsd',
'plannerd',

View File

@@ -34,7 +34,7 @@ import threading
from pathlib import Path
from typing import List, Tuple, Optional
from common.hardware import ANDROID
from common.hardware import ANDROID, TICI
from common.basedir import BASEDIR
from common.params import Params
from selfdrive.swaglog import cloudlog
@@ -142,7 +142,10 @@ def setup_git_options(cwd: str) -> None:
def dismount_overlay() -> None:
if os.path.ismount(OVERLAY_MERGED):
cloudlog.info("unmounting existing overlay")
run(["umount", "-l", OVERLAY_MERGED])
args = ["umount", "-l", OVERLAY_MERGED]
if TICI:
args = ["sudo"] + args
run(args)
def init_overlay() -> None:
@@ -185,7 +188,13 @@ def init_overlay() -> None:
os.sync()
overlay_opts = f"lowerdir={BASEDIR},upperdir={OVERLAY_UPPER},workdir={OVERLAY_METADATA}"
run(["mount", "-t", "overlay", "-o", overlay_opts, "none", OVERLAY_MERGED])
mount_cmd = ["mount", "-t", "overlay", "-o", overlay_opts, "none", OVERLAY_MERGED]
if TICI:
run(["sudo"] + mount_cmd)
run(["sudo", "chmod", "755", os.path.join(OVERLAY_METADATA, "work")])
else:
run(mount_cmd)
def finalize_update() -> None: