Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
35e38f5
mici ui: show lock in network panel (#37345)
sshane Feb 23, 2026
2ecdd28
mici ui: disable forget on tethering and show full strength (#37344)
sshane Feb 23, 2026
8d0cb9c
Unified label fix scroll fade (#37346)
sshane Feb 23, 2026
c16879f
mici ui: fix missing home show event (#37347)
sshane Feb 23, 2026
0a14e19
CI: use setup action on macOS (#37352)
adeebshihadeh Feb 23, 2026
7cc237a
[bot] Update Python packages (#37351)
commaci-public Feb 23, 2026
b32227e
BigCircleButton: remove press_state_enabled
sshane Feb 23, 2026
90a9ef2
ui: remove multiple option dialog (#37356)
sshane Feb 23, 2026
76d084d
switch to system compilers (GCC on Linux, Apple Clang on macOS) (#37355)
adeebshihadeh Feb 24, 2026
16dda06
Reapply chunker (#37292)
haraschax Feb 24, 2026
5af3f32
simplify setup (#37358)
adeebshihadeh Feb 24, 2026
19459d2
feat(lpa): at client + list profiles (#37337)
greatgitsby Feb 24, 2026
91930c2
UnifiedLabel: add set_line_height
sshane Feb 24, 2026
ed8d1a6
BigCircleButton: new pressed image
sshane Feb 24, 2026
c5b65d0
no more xset
adeebshihadeh Feb 24, 2026
0e127cf
WifiManager: guard init wifi state (#37366)
sshane Feb 24, 2026
12f9234
Slider: call confirm callback after set state
sshane Feb 24, 2026
8543afc
Slider: add pressed state (#37365)
sshane Feb 24, 2026
bd3b7a1
Scroller: preserve original touch valid callback (#37363)
sshane Feb 24, 2026
76a5527
ui: move shake into BigButton (#37364)
sshane Feb 24, 2026
21b8189
ui: support asset flip (#37367)
sshane Feb 24, 2026
ded5e5c
BigButton: normal draw order if not scrolling (#37368)
sshane Feb 24, 2026
44cf6b3
ffmpeg: pipe (#37359)
haraschax Feb 24, 2026
8bd8066
rm libjpeg (#37371)
adeebshihadeh Feb 24, 2026
2ddf95d
rm libgles2-mesa-dev (#37373)
adeebshihadeh Feb 24, 2026
a1e9cf9
translations: replace gettext apt dependency with pure Python tools (…
adeebshihadeh Feb 24, 2026
8952c94
only build installer on device
adeebshihadeh Feb 24, 2026
79bc6c3
replace python3-dev apt install with vendored package (#37374)
adeebshihadeh Feb 24, 2026
96c0fb7
vendor zstd and ncurses, remove from apt
adeebshihadeh Feb 24, 2026
0dc073d
update uv.lock for ncurses build fix
adeebshihadeh Feb 24, 2026
15f1693
update uv.lock for ncurses build fix (drop --disable-database)
adeebshihadeh Feb 24, 2026
78d761e
lock
adeebshihadeh Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prebuilt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: selfdrive/test/docker_build.sh prebuilt
BUILD: selfdrive/test/docker_build.sh

jobs:
build_prebuilt:
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ on:
jobs:
build_masterci:
name: build master-ci
env:
ImageOS: ubuntu24
container:
image: ghcr.io/commaai/openpilot-base:latest
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
permissions:
checks: read
contents: write
steps:
- name: Install wait-on-check-action dependencies
run: |
sudo apt-get update
sudo apt-get install -y libyaml-dev
- name: Wait for green check mark
if: ${{ github.event_name == 'schedule' }}
uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
Expand All @@ -34,9 +26,6 @@ jobs:
with:
submodules: true
fetch-depth: 0
- name: Pull LFS
run: |
git config --global --add safe.directory '*'
git lfs pull
- uses: ./.github/workflows/setup-with-retry
- name: Push master-ci
run: BRANCH=__nightly release/build_stripped.sh
14 changes: 11 additions & 3 deletions .github/workflows/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ runs:
uses: ./.github/workflows/auto-cache
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
key: scons-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.arch }}
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.os }}-${{ runner.arch }}
# venv cache
- id: venv-cache
uses: ./.github/workflows/auto-cache
with:
path: ${{ github.workspace }}/.venv
key: venv-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('uv.lock') }}
restore-keys: |
venv-${{ runner.os }}-${{ runner.arch }}
- shell: bash
name: Run setup
run: ./tools/op.sh setup
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,9 @@ jobs:
- uses: actions/checkout@v6
with:
submodules: true
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
- name: Install dependencies
run: ./tools/mac_setup.sh
env:
HOMEBREW_DISPLAY_INSTALL_TIMES: 1
- run: git lfs pull
- name: Getting scons cache
uses: ./.github/workflows/auto-cache
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.arch }}-macos
- uses: ./.github/workflows/setup-with-retry
- name: Building openpilot
run: . .venv/bin/activate && scons
run: scons

static_analysis:
name: static analysis
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ flycheck_*
cppcheck_report.txt
comma*.sh

selfdrive/modeld/models/*.pkl
selfdrive/modeld/models/*.pkl.*
selfdrive/modeld/models/*.pkl*

# openpilot log files
*.bz2
Expand Down
36 changes: 30 additions & 6 deletions Dockerfile.openpilot
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
FROM ghcr.io/commaai/openpilot-base:latest
FROM ubuntu:24.04

ENV PYTHONUNBUFFERED=1

ENV OPENPILOT_PATH=/home/batman/openpilot
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends sudo tzdata locales && \
rm -rf /var/lib/apt/lists/*

RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute

ARG USER=batman
ARG USER_UID=1001
RUN useradd -m -s /bin/bash -u $USER_UID $USER
RUN usermod -aG sudo $USER
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USER

ENV OPENPILOT_PATH=/home/$USER/openpilot
RUN mkdir -p ${OPENPILOT_PATH}
WORKDIR ${OPENPILOT_PATH}

COPY . ${OPENPILOT_PATH}/
COPY --chown=$USER . ${OPENPILOT_PATH}/

ENV UV_BIN="/home/$USER/.local/bin/"
ENV VIRTUAL_ENV=${OPENPILOT_PATH}/.venv
ENV PATH="$UV_BIN:$VIRTUAL_ENV/bin:$PATH"
RUN tools/setup_dependencies.sh && \
sudo rm -rf /var/lib/apt/lists/*

ENV UV_BIN="/home/batman/.local/bin/"
ENV PATH="$UV_BIN:$PATH"
RUN UV_PROJECT_ENVIRONMENT=$VIRTUAL_ENV uv run scons --cache-readonly -j$(nproc)
USER root
RUN git config --global --add safe.directory '*'
42 changes: 0 additions & 42 deletions Dockerfile.openpilot_base

This file was deleted.

16 changes: 10 additions & 6 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ if arch != "larch64":
import capnproto
import eigen
import ffmpeg as ffmpeg_pkg
import ncurses
import python3_dev
import zeromq
pkgs = [capnproto, eigen, ffmpeg_pkg, zeromq]
import zstd
pkgs = [capnproto, eigen, ffmpeg_pkg, ncurses, zeromq, zstd]
py_include = python3_dev.INCLUDE_DIR
else:
# TODO: remove when AGNOS has our new vendor pkgs
pkgs = []
py_include = sysconfig.get_paths()['include']

env = Environment(
ENV={
Expand All @@ -56,15 +61,13 @@ env = Environment(
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#third_party/acados/acados_template").abspath,
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
},
CC='clang',
CXX='clang++',
CCFLAGS=[
"-g",
"-fPIC",
"-O2",
"-Wunused",
"-Werror",
"-Wshadow",
"-Wshadow" if arch in ("Darwin", "larch64") else "-Wshadow=local",
"-Wno-unknown-warning-option",
"-Wno-inconsistent-missing-override",
"-Wno-c99-designator",
Expand Down Expand Up @@ -106,6 +109,8 @@ env = Environment(

# Arch-specific flags and paths
if arch == "larch64":
env["CC"] = "clang"
env["CXX"] = "clang++"
env.Append(LIBPATH=[
"/usr/local/lib",
"/system/vendor/lib64",
Expand Down Expand Up @@ -159,10 +164,9 @@ if os.environ.get('SCONS_PROGRESS'):
Progress(progress_function, interval=node_interval)

# ********** Cython build environment **********
py_include = sysconfig.get_paths()['include']
envCython = env.Clone()
envCython["CPPPATH"] += [py_include, np.get_include()]
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CCFLAGS"].remove("-Werror")

envCython["LIBS"] = []
Expand Down
37 changes: 37 additions & 0 deletions common/file_chunker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import math
import os
from pathlib import Path

CHUNK_SIZE = 45 * 1024 * 1024 # 45MB, under GitHub's 50MB limit

def get_chunk_name(name, idx, num_chunks):
return f"{name}.chunk{idx+1:02d}of{num_chunks:02d}"

def get_manifest_path(name):
return f"{name}.chunkmanifest"

def get_chunk_paths(path, file_size):
num_chunks = math.ceil(file_size / CHUNK_SIZE)
return [get_manifest_path(path)] + [get_chunk_name(path, i, num_chunks) for i in range(num_chunks)]

def chunk_file(path, targets):
manifest_path, *chunk_paths = targets
with open(path, 'rb') as f:
data = f.read()
actual_num_chunks = max(1, math.ceil(len(data) / CHUNK_SIZE))
assert len(chunk_paths) >= actual_num_chunks, f"Allowed {len(chunk_paths)} chunks but needs at least {actual_num_chunks}, for path {path}"
for i, chunk_path in enumerate(chunk_paths):
with open(chunk_path, 'wb') as f:
f.write(data[i * CHUNK_SIZE:(i + 1) * CHUNK_SIZE])
Path(manifest_path).write_text(str(len(chunk_paths)))
os.remove(path)


def read_file_chunked(path):
manifest_path = get_manifest_path(path)
if os.path.isfile(manifest_path):
num_chunks = int(Path(manifest_path).read_text().strip())
return b''.join(Path(get_chunk_name(path, i, num_chunks)).read_bytes() for i in range(num_chunks))
if os.path.isfile(path):
return Path(path).read_bytes()
raise FileNotFoundError(path)
8 changes: 4 additions & 4 deletions common/prefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class OpenpilotPrefix {
auto param_path = Params().getParamPath();
if (util::file_exists(param_path)) {
std::string real_path = util::readlink(param_path);
system(util::string_format("rm %s -rf", real_path.c_str()).c_str());
util::check_system(util::string_format("rm %s -rf", real_path.c_str()));
unlink(param_path.c_str());
}
if (getenv("COMMA_CACHE") == nullptr) {
system(util::string_format("rm %s -rf", Path::download_cache_root().c_str()).c_str());
util::check_system(util::string_format("rm %s -rf", Path::download_cache_root().c_str()));
}
system(util::string_format("rm %s -rf", Path::comma_home().c_str()).c_str());
system(util::string_format("rm %s -rf", msgq_path.c_str()).c_str());
util::check_system(util::string_format("rm %s -rf", Path::comma_home().c_str()));
util::check_system(util::string_format("rm %s -rf", msgq_path.c_str()));
unsetenv("OPENPILOT_PREFIX");
}

Expand Down
6 changes: 3 additions & 3 deletions common/ratekeeper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include "common/timing.h"
#include "common/util.h"

RateKeeper::RateKeeper(const std::string &name, float rate, float print_delay_threshold)
: name(name),
print_delay_threshold(std::max(0.f, print_delay_threshold)) {
RateKeeper::RateKeeper(const std::string &name_, float rate, float print_delay_threshold_)
: name(name_),
print_delay_threshold(std::max(0.f, print_delay_threshold_)) {
interval = 1 / rate;
last_monitor_time = seconds_since_boot();
next_frame_time = last_monitor_time + interval;
Expand Down
10 changes: 5 additions & 5 deletions common/tests/test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST_CASE("util::read_file") {
REQUIRE(util::read_file(filename).empty());

std::string content = random_bytes(64 * 1024);
write(fd, content.c_str(), content.size());
REQUIRE(write(fd, content.c_str(), content.size()) == (ssize_t)content.size());
std::string ret = util::read_file(filename);
bool equal = (ret == content);
REQUIRE(equal);
Expand Down Expand Up @@ -114,12 +114,12 @@ TEST_CASE("util::safe_fwrite") {
}

TEST_CASE("util::create_directories") {
system("rm /tmp/test_create_directories -rf");
REQUIRE(system("rm /tmp/test_create_directories -rf") == 0);
std::string dir = "/tmp/test_create_directories/a/b/c/d/e/f";

auto check_dir_permissions = [](const std::string &dir, mode_t mode) -> bool {
auto check_dir_permissions = [](const std::string &path, mode_t mode) -> bool {
struct stat st = {};
return stat(dir.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR && (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) == mode;
return stat(path.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR && (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) == mode;
};

SECTION("create_directories") {
Expand All @@ -132,7 +132,7 @@ TEST_CASE("util::create_directories") {
}
SECTION("a file exists with the same name") {
REQUIRE(util::create_directories(dir, 0755));
int f = open((dir + "/file").c_str(), O_RDWR | O_CREAT);
int f = open((dir + "/file").c_str(), O_RDWR | O_CREAT, 0644);
REQUIRE(f != -1);
close(f);
REQUIRE(util::create_directories(dir + "/file", 0755) == false);
Expand Down
8 changes: 4 additions & 4 deletions common/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ bool file_exists(const std::string& fn) {
}

static bool createDirectory(std::string dir, mode_t mode) {
auto verify_dir = [](const std::string& dir) -> bool {
auto verify_dir = [](const std::string& path) -> bool {
struct stat st = {};
return (stat(dir.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR);
return (stat(path.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR);
};
// remove trailing /'s
while (dir.size() > 1 && dir.back() == '/') {
Expand Down Expand Up @@ -288,7 +288,7 @@ std::string strip(const std::string &str) {
std::string check_output(const std::string& command) {
char buffer[128];
std::string result;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);
std::unique_ptr<FILE, int(*)(FILE*)> pipe(popen(command.c_str(), "r"), pclose);

if (!pipe) {
return "";
Expand All @@ -303,7 +303,7 @@ std::string check_output(const std::string& command) {

bool system_time_valid() {
// Default to August 26, 2024
tm min_tm = {.tm_year = 2024 - 1900, .tm_mon = 7, .tm_mday = 26};
tm min_tm = {.tm_mday = 26, .tm_mon = 7, .tm_year = 2024 - 1900};
time_t min_date = mktime(&min_tm);

struct stat st;
Expand Down
7 changes: 7 additions & 0 deletions common/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ bool create_directories(const std::string &dir, mode_t mode);

std::string check_output(const std::string& command);

inline void check_system(const std::string& cmd) {
int ret = std::system(cmd.c_str());
if (ret != 0) {
fprintf(stderr, "system command failed (%d): %s\n", ret, cmd.c_str());
}
}

bool system_time_valid();

inline void sleep_for(const int milliseconds) {
Expand Down
Loading
Loading