# Lima-шаблон Штурмана: ARM64 Ubuntu, нативно к таргету RK3588 (dev-environment). # Подъём: just vm-up. Сборка/деплой/E2E — just run / just e2e (внутри VM). Валидируется в части 2 Плана 5. vmType: vz cpus: 4 memory: "6GiB" disk: "20GiB" images: - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img" arch: "aarch64" mounts: # репозиторий (writable). location — под свою раскладку; в гостье — /shturman. - location: "~/GitHub/shturman" mountPoint: "/shturman" writable: true provision: # OS-база (root). Бинари/юниты-старт — в just run/e2e (бинарей ещё нет на этом шаге). - mode: system script: | #!/bin/bash set -eux export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y \ dbus pipewire wireplumber weston \ can-utils python3 python3-venv \ systemd-zram-generator fake-hwclock \ fonts-dejavu-core fonts-noto-core \ build-essential pkg-config curl # vcan (для Vehicle Simulator, v2 — поднимаем заранее для воспроизводимости) modprobe vcan || true ip link add dev vcan0 type vcan 2>/dev/null || true ip link set up vcan0 || true # loopback /data (ext4, power-safe) + data.mount mkdir -p /var/lib/shturman if [ ! -f /var/lib/shturman/data.img ]; then truncate -s 1G /var/lib/shturman/data.img mkfs.ext4 -q -L shturman-data /var/lib/shturman/data.img fi # systemd-юниты + конфиги из репозитория install -m644 /shturman/systemd/shturman.target /etc/systemd/system/ install -m644 /shturman/systemd/data.mount /etc/systemd/system/ install -m644 /shturman/systemd/shturman-*.service /etc/systemd/system/ install -d /etc/dbus-1/system.d install -m644 /shturman/systemd/dbus/ru.shturman.conf /etc/dbus-1/system.d/ install -d /etc/systemd/journald.conf.d install -m644 /shturman/systemd/journald-shturman.conf /etc/systemd/journald.conf.d/shturman.conf install -m644 /shturman/systemd/zram-generator.conf /etc/systemd/zram-generator.conf install -d /etc/systemd/oomd.conf.d install -m644 /shturman/systemd/oomd-shturman.conf /etc/systemd/oomd.conf.d/shturman.conf # fake-hwclock → /data (не на rootfs; A07/A11) echo 'FILE=/data/state/fake-hwclock.data' > /etc/default/fake-hwclock || true systemctl daemon-reload systemctl enable systemd-oomd.service || true # shturman.target включаем, но НЕ стартуем здесь — бинарей ещё нет (just run/e2e). systemctl enable shturman.target || true # Rust-тулчейн (user) - mode: user script: | #!/bin/bash set -eux command -v cargo >/dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y