on-device building fixups (#34642)

* on-device building fixups

* fix
This commit is contained in:
Adeeb Shihadeh
2025-02-20 16:16:57 -08:00
committed by GitHub
parent d9a8fab3e6
commit 2e374cd962
2 changed files with 12 additions and 2 deletions
+5 -1
View File
@@ -7,7 +7,7 @@ from pathlib import Path
from openpilot.common.basedir import BASEDIR
from openpilot.common.spinner import Spinner
from openpilot.common.text_window import TextWindow
from openpilot.system.hardware import AGNOS
from openpilot.system.hardware import HARDWARE, AGNOS
from openpilot.common.swaglog import cloudlog, add_file_handler
from openpilot.system.version import get_build_metadata
@@ -26,6 +26,10 @@ def build(spinner: Spinner, dirty: bool = False, minimal: bool = False) -> None:
extra_args = ["--minimal"] if minimal else []
if AGNOS:
HARDWARE.set_power_save(False)
os.sched_setaffinity(0, range(8)) # ensure we can use the isolcpus cores
# building with all cores can result in using too
# much memory, so retry with less parallelism
compile_output: list[bytes] = []
+7 -1
View File
@@ -283,7 +283,13 @@ function op_build() {
CDIR=$(pwd)
op_before_cmd
cd "$CDIR"
op_run_command scons $@
if [[ -f "/AGNOS" ]]; then
# needed on AGNOS to not run out of memory
op_run_command system/manager/build.py
else
# scons is fine on PC
op_run_command scons $@
fi
}
function op_juggle() {