Fast boot using prebuilt file

Added prebuilt functionality that removes itself whenever the user installs updates to prevent installation failures.
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent b72f5748c4
commit 64b7f5b401
2 changed files with 7 additions and 0 deletions

View File

@@ -195,6 +195,10 @@ def main() -> None:
manager_init() manager_init()
# Remove the prebuilt file to prevent boot failures
if os.path.exists("/data/openpilot/prebuilt"):
os.remove("/data/openpilot/prebuilt")
# Start UI early so prepare can happen in the background # Start UI early so prepare can happen in the background
if not prepare_only: if not prepare_only:
managed_processes['ui'].start() managed_processes['ui'].start()

View File

@@ -457,6 +457,9 @@ def thermald_thread(end_event, hw_queue) -> None:
count += 1 count += 1
should_start_prev = should_start should_start_prev = should_start
# Create the prebuilt file if it doesn't exist
if not os.path.isfile('/data/openpilot/prebuilt'):
os.system(f"touch {'/data/openpilot/prebuilt'}")
def main(): def main():
hw_queue = queue.Queue(maxsize=1) hw_queue = queue.Queue(maxsize=1)