| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "Service to mount camera libs" |
| author "chromium-os-dev@chromium.org" |
| |
| start on starting cros-camera \ |
| or starting cros-camera-algo \ |
| or starting cros-camera-gpu-algo \ |
| or starting ml-service TASK=mojo_service |
| |
| # Make the camera jobs killable, because if it has a leak it's better to restart |
| # it than to OOM-panic. |
| oom score 0 |
| |
| env CAMERA_LIBS_IMAGE=/usr/share/cros-camera/g3_libs.squash |
| env CAMERA_LIBS_DIR=/usr/share/cros-camera/libfs |
| |
| pre-start script |
| # Mount the camera libs. |
| if ! mountpoint -q "${CAMERA_LIBS_DIR}"; then |
| mount -o ro,nosuid,nodev "${CAMERA_LIBS_IMAGE}" "${CAMERA_LIBS_DIR}" |
| fi |
| end script |