Compare commits

...
Author SHA1 Message Date
upstream-sync-bot a8ec3710ac Merge upstream/dev (2 commits) [upstream-sync]
pub-release / release (push) Successful in 29m35s
2026-12-01 05:06:43 +00:00
Liam Cottle 4891a799bb Merge pull request #4005 from Blake-Latchford/docs/room-post
Document the room server room.post command
2026-12-01 16:02:40 +13:00
lock-refresh-bot ddc5ab4bd7 All nodes: 5 libraries updated (platformio.lock)
Adafruit GFX Library 1.12.6, 2.0.0 -> 1.13.0, 2.0.0
Adafruit INA260 Library 1.5.3, 1.5.4 -> 1.5.4
Adafruit MLX90614 Library 2.1.6, 2.1.7 -> 2.1.7
Adafruit NeoPixel 1.15.5, 1.15.6 -> 1.15.6
Adafruit SSD1306 2.5.17, 2.5.18 -> 2.5.18

Docs: - platformio.lock is generated (tools/pio_lock.py, tth-lock-refresh)
2026-11-30 21:29:12 +00:00
tthandClaude Opus 5.5 0eef523201 CI: lock refresh resolves in the project's .pio/libdeps; PR checks no longer cancelled by pushes
Changelog: -
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:13:54 +01:00
tthandClaude Opus 5.5 b6c251d406 All nRF52 images: platform nordicnrf52 11.1.0 (latest) instead of 10.12.0
Changelog: All nRF52 images build on platform nordicnrf52 11.1.0; the masts move to it from 10.12.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:38:15 +01:00
tthandClaude Opus 5.5 5ad3c606cc CI: latest platform without waiting; one growing PlatformIO store as the cache
Changelog: -
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:23:48 +01:00
tthandClaude Opus 5.5 03d17d8863 All nRF52 images: platform 10.12.0, toolchain and every library pinned
Changelog: All nRF52 images build on a pinned platform (nordicnrf52 10.12.0, as the masts and the bench) and exact library versions from platformio.lock, so a build no longer depends on the day it ran
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 21:19:24 +01:00
tthandClaude Opus 5.5 77f4af1bbb CI: public release fetches each env's libraries inside its first build
Changelog: -
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:08:30 +01:00
tthandClaude Opus 5.5 de9c860081 CI: firmware builds run on the image's python3, not setup-python
Changelog: -
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:54:58 +01:00
tthandClaude Opus 5.5 ca4c8e6206 CI: public release installs shared platforms once, libraries in parallel
Changelog: -
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:43:36 +01:00
tthandClaude Opus 5.5 e5e56f4372 CI: public release builds its 33 images six at a time
Changelog: -
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:15:04 +01:00
tthandClaude Opus 5.5 c32ba219dd CI: release notes link direct upstream commits to their real GitHub id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:09:43 +01:00
Blake LatchfordandClaude Opus 5.5 7b2135412a Document the room server room.post command
room.post was added to the room server CLI in #2688 but not to
docs/cli_commands.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 08:40:24 -05:00
8 changed files with 946 additions and 81 deletions

No files matched your search

@@ -11,25 +11,20 @@ runs:
~/.platformio/.cache
key: ${{ runner.os }}-pio
# CUSTOM (TeTeHacko): no actions/setup-python (upstream: '3.13'). Its
# Python for Ubuntu 26.04, the runner image, is built for x86-64-v3 and
# grg-runner (Xeon E5-2630L v2) has only v2: "CPU ISA level is lower than
# required" on every run. The image's own python3 runs anywhere and the
# build needs no particular 3.x, so the build runs in a venv of it.
- name: Install Python
id: python
continue-on-error: true
uses: actions/setup-python@v6
with:
python-version: '3.13'
# CUSTOM (TeTeHacko): setup-python's build for the runner OS can need a
# newer CPU than the runner host has ("CPU ISA level is lower than
# required"); fall back to the image's own python3 in a venv
- name: Python fallback
if: steps.python.outcome == 'failure'
shell: bash
run: |
set -euo pipefail
SUDO="$(command -v sudo || true)"
venv="$RUNNER_TEMP/pyenv"
if ! python3 -m venv "$venv"; then
apt-get update -qq
apt-get install -y -qq python3 python3-venv
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq python3 python3-venv
python3 -m venv --clear "$venv"
fi
# The image's python is often newer than the wheels on PyPI (detools
@@ -37,8 +32,8 @@ runs:
# headers, which the image does not ship.
inc="$("$venv/bin/python" -c 'import sysconfig; print(sysconfig.get_paths()["include"])')"
if [ ! -e "$inc/Python.h" ]; then
apt-get update -qq
apt-get install -y -qq python3-dev
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq python3-dev
fi
echo "$venv/bin" >>"$GITHUB_PATH"
"$venv/bin/python" --version
+170 -23
View File
@@ -36,10 +36,29 @@
#
# dry_run: the same build anywhere (the private repo too), no release -- the
# result goes up as a workflow artifact. Delta bases always come from the
# public repo's releases.
# public repo's releases. A pull request that changes a dependency pin
# (platformio.ini, platformio.lock -- Renovate's) runs as a dry run too, and is
# what Renovate waits for before it merges.
#
# Libraries come from platformio.lock (tools/pio_lock.py): installed before
# each env's first build, and the build fails when anything else resolved.
# Platform and toolchain are pinned in platformio.ini. ~/.platformio keeps
# every version it ever installed side by side (platforms/<name>@<version>,
# packages likewise) and a build takes the pinned one, so the cache is one
# growing store: the newest is restored, new versions are added and saved
# under a new key only when a pin changed. Libraries are not cached: small,
# and an old version in .pio/libdeps/<env> would fail the lock check.
name: pub-release
"on":
pull_request:
branches: [main]
paths:
- "platformio.ini"
- "platformio.lock"
- "variants/**/platformio.ini"
- ".github/workflows/pub-release.yml"
- ".github/fw-flags.sh"
push:
branches: [main]
paths-ignore:
@@ -70,8 +89,14 @@ name: pub-release
required: false
default: ""
# Releases queue one after another (tag numbering); a pull request's check
# and a dry run each in their own group: Gitea keeps ONE pending run per
# group, so a push to main (twice a day) would cancel a waiting PR check and
# Renovate's automerge would never come.
concurrency:
group: pub-release
group: >-
pub-release-${{ github.event_name == 'pull_request' && github.ref
|| (github.event.inputs.dry_run == 'true' && 'dry' || 'release') }}
cancel-in-progress: false
env:
@@ -86,6 +111,9 @@ env:
Xiao_nrf52_repeater Xiao_nrf52_room_server Xiao_nrf52_sensor SenseCap_Solar_repeater
RAK_4631_repeater RAK_4631_room_server t1000e_repeater Heltec_t114_repeater
PUB_REPO: tth-pub/meshcore-tth # where delta bases come from, dry run or not
# grg-runner: 24 cores, up to 8 jobs of its own; 6 builds x 6 compilers
PARALLEL: 6
PIO_JOBS: 6
ENVS: >-
Xiao_nrf52_repeater Xiao_nrf52_companion_radio_ble Xiao_nrf52_room_server Xiao_nrf52_sensor
SenseCap_Solar_repeater SenseCap_Solar_companion_radio_ble
@@ -96,8 +124,12 @@ env:
jobs:
release:
if: github.repository == 'tth-pub/meshcore-tth' || github.event.inputs.dry_run == 'true'
if: >-
github.repository == 'tth-pub/meshcore-tth' || github.event.inputs.dry_run == 'true'
|| github.event_name == 'pull_request'
runs-on: ubuntu-latest
env:
DRY: ${{ github.event.inputs.dry_run == 'true' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
with:
@@ -109,7 +141,6 @@ jobs:
env:
TOKEN: ${{ secrets.GITEA_TOKEN || github.token }}
REPLACE: ${{ github.event.inputs.replace }}
DRY: ${{ github.event.inputs.dry_run }}
run: |
set -euo pipefail
git fetch -q --tags
@@ -157,6 +188,16 @@ jobs:
echo "title=$title"
} >>"$GITHUB_OUTPUT"
# one store of every platform/toolchain version (see the header)
- name: PlatformIO platforms and packages
uses: actions/cache@v5
with:
path: |
~/.platformio/platforms
~/.platformio/packages
key: pio-store-${{ hashFiles('platformio.ini', 'variants/**/platformio.ini') }}
restore-keys: pio-store-
- name: Setup Build Environment
uses: ./.github/actions/setup-build-environment
@@ -166,7 +207,6 @@ jobs:
TAG: ${{ steps.src.outputs.tag }}
OTA_SIGNING_KEY: ${{ secrets.OTA_SIGNING_KEY }}
TOKEN: ${{ secrets.GITEA_TOKEN || github.token }}
DRY: ${{ github.event.inputs.dry_run }}
BASES_REPO: ${{ github.event.inputs.bases_repo }}
ONLY: ${{ github.event.inputs.only }}
run: |
@@ -224,14 +264,107 @@ jobs:
fi
done <"$bases/releases.jsonl"
}
# build <env> <extra flags> <name suffix> [ota variant]; PlatformIO
# appends PLATFORMIO_BUILD_FLAGS after each env's flags: last -D wins
build() {
local env=$1 suffix=$3 variant=${4:-} b v
if [ -n "$ONLY" ] && [[ " $ONLY " != *" $env$suffix "* ]]; then return 0; fi
echo "::group::$env$suffix"
FW_OTA_VARIANT=$variant PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS $2" pio run -e "$env"
b=".pio/build/$env"
# The artifacts: <env>|<extra flags>|<name suffix>|<ota variant>.
# PlatformIO appends PLATFORMIO_BUILD_FLAGS after each env's flags:
# last -D wins.
arts=()
declare -A spec=()
add() {
if [ -n "$ONLY" ] && [[ " $ONLY " != *" $1$3 "* ]]; then return 0; fi
arts+=("$1$3")
spec[$1$3]="$1|$2|$3|${4:-}"
}
for env in $ENVS; do add "$env" "" ""; done
for env in $OBS_ENVS; do add "$env" "$OBS_FLAGS" "-observer"; done
for env in $OTA_ENVS; do add "$env" "-D FW_OTA=1" "-ota" ota; done
for env in $OBS_ENVS; do add "$env" "$OBS_FLAGS -D FW_OTA=1" "-observer-ota" observer-ota; done
# Builds run PARALLEL at a time: one by one they took 38 of the run's
# 40 minutes on a 24-core runner that sat mostly idle.
bdir="$RUNNER_TEMP/build" logs="$RUNNER_TEMP/logs"
mkdir -p "$bdir" "$logs"
# par <function> <name>...: `<function> <name>` PARALLEL at a time,
# output to $logs/<name>.log, exit code to $logs/<name>.rc
par() {
local fn=$1 n running=0
shift
for n in "$@"; do
if [ "$running" -ge "$PARALLEL" ]; then wait -n || :; running=$((running - 1)); fi
(set +e; "$fn" "$n"; echo $? >"$logs/$n.rc") >"$logs/$n.log" 2>&1 &
running=$((running + 1))
done
wait
}
# report <title> <name>...: each log as a group, in this order; fails
# the step, with the tails of the failed ones, if any failed
report() {
local title=$1 n rc failed=()
shift
for n in "$@"; do
rc=$(cat "$logs/$n.rc" 2>/dev/null || echo "?")
echo "::group::$n (rc $rc)"
cat "$logs/$n.log"
echo "::endgroup::"
[ "$rc" = 0 ] || failed+=("$n")
done
[ ${#failed[@]} -eq 0 ] && return 0
for n in "${failed[@]}"; do echo "== $n"; tail -n 30 "$logs/$n.log"; done
echo "::error::$title failed: ${failed[*]}"
exit 1
}
# 1) install the platforms. Nothing is cached here (reproducible),
# so each run downloads platforms, toolchains and libraries: 8 min
# env by env up front. One env per distinct platform (+
# platform_packages) installs those first, one at a time -- they
# are shared in ~/.platformio, concurrent installs would race.
envs=$(printf '%s\n' "${arts[@]}" | while read -r a; do echo "${spec[$a]%%|*}"; done | sort -u)
mapfile -t first < <(pio project config --json-output | python3 -c '
import json, sys
want, seen = set(sys.argv[1].split()), set()
for name, opts in json.load(sys.stdin):
o = dict(opts)
key = (o.get("platform"), str(o.get("platform_packages")))
if name[4:] in want and name.startswith("env:") and key not in seen:
seen.add(key)
print(name[4:])' "$envs")
# deps <env>: the locked libraries first, then whatever lib_deps still
# miss (platform, toolchain, git/file pins), then the lock check --
# once per env: the flock keeps its other flag sets waiting
locks="$RUNNER_TEMP/locks"
mkdir -p "$locks"
deps() {
flock "$locks/$1" sh -c "python3 tools/pio_lock.py install -e '$1' && pio pkg install -e '$1' -s &&
python3 tools/pio_lock.py check -e '$1'"
}
install() { deps "${1#install-}"; }
t0=$SECONDS
for env in "${first[@]}"; do par install "install-$env"; done
report "install" "${first[@]/#/install-}"
echo "installed ${#first[@]} platforms in $((SECONDS - t0)) s"
# 2) compile, each artifact into its own build dir (one env comes in
# up to four flag sets). An env's libraries come with its first
# build (deps), into its own .pio/libdeps/<env>, while other envs
# compile; the check fails the build when anything is not exactly
# platformio.lock.
compile() {
local env flags suffix variant
IFS='|' read -r env flags suffix variant <<<"${spec[$1]}"
deps "$env" || return 1
export FW_OTA_VARIANT=$variant PLATFORMIO_BUILD_DIR="$bdir/$1" PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS $flags"
pio run -j "$PIO_JOBS" -e "$env" || return 1
[ -f "$bdir/$1/$env/firmware.zip" ] || pio run -j "$PIO_JOBS" -t mergebin -e "$env" # ESP32
}
t1=$SECONDS
par compile "${arts[@]}"
echo "compiled ${#arts[@]} artifacts in $((SECONDS - t1)) s ($PARALLEL at a time)"
report "build" "${arts[@]}"
# 3) package in order: manifest.json, deltas and the version are
# written one artifact at a time. The OTA tools read .pio/build/<env>,
# so that points at the artifact being packaged.
mkdir -p .pio/build
for a in "${arts[@]}"; do
IFS='|' read -r env flags suffix variant <<<"${spec[$a]}"
b="$bdir/$a/$env"
echo "::group::package $env$suffix"
if [ -f "$b/firmware.zip" ]; then # nRF52
python3 bin/uf2conv/uf2conv.py "$b/firmware.hex" -c -o "$b/firmware.uf2" -f 0xADA52840
cp "$b/firmware.uf2" "$dist/$env$suffix-$TAG.uf2"
@@ -239,18 +372,19 @@ jobs:
v=$(grep -m1 -aoE 'v[0-9]+\.[0-9]+\.[0-9]+-tth[0-9a-f]+\+?' "$b/firmware.elf" || true)
case "$v" in *+) echo "::error::$env is dirty ($v)"; exit 1 ;; esac
[ -n "$version" ] || version="$v"
[ -z "$variant" ] || { unzip -p "$b/firmware.zip" firmware.bin >"$b/firmware.bin"; ota_package "$env" "$env$suffix"; }
if [ -n "$variant" ]; then
rm -rf ".pio/build/$env"
ln -s "$b" ".pio/build/$env"
unzip -p "$b/firmware.zip" firmware.bin >"$b/firmware.bin"
ota_package "$env" "$env$suffix"
fi
else # ESP32
PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS $2" pio run -t mergebin -e "$env"
cp "$b/firmware.bin" "$dist/$env$suffix-$TAG.bin"
cp "$b/firmware-merged.bin" "$dist/$env$suffix-$TAG-merged.bin"
fi
echo "::endgroup::"
}
for env in $ENVS; do build "$env" "" ""; done
for env in $OBS_ENVS; do build "$env" "$OBS_FLAGS" "-observer"; done
for env in $OTA_ENVS; do build "$env" "-D FW_OTA=1" "-ota" ota; done
for env in $OBS_ENVS; do build "$env" "$OBS_FLAGS -D FW_OTA=1" "-observer-ota" observer-ota; done
done
echo "installed, built and packaged in $((SECONDS - t0)) s"
jq --arg c "$(git rev-parse HEAD)" --arg t "$TAG" '.commit = $c | .tag = $t' \
"$dist/manifest.json" >"$dist/m.tmp" && mv "$dist/m.tmp" "$dist/manifest.json"
cd "$dist"
@@ -262,14 +396,14 @@ jobs:
echo "version=${version:-tth-$sha}" >>"$GITHUB_OUTPUT"
- name: Dry run artifact
if: github.event.inputs.dry_run == 'true'
if: env.DRY == 'true'
uses: actions/upload-artifact@v4
with:
name: pub-release-dry-run
path: dist/
- name: Release
if: github.event.inputs.dry_run != 'true'
if: env.DRY != 'true'
env:
TOKEN: ${{ secrets.GITEA_TOKEN || github.token }}
SHA: ${{ steps.src.outputs.sha }}
@@ -372,6 +506,14 @@ jobs:
# upstream: the first-parent line of each merged upstream branch,
# PR merges as their title, direct commits as their subject
declare -A seen=()
# A direct upstream commit (no PR) links to GitHub by its ORIGINAL
# id: the public export (filter-repo) gives every upstream commit a
# new one, which GitHub does not know (30. 11. 2026: "* sec patch"
# linked to a 404). Author email + author time survive the rewrite.
declare -A upid=()
if git fetch -q --no-tags "$gh.git" '+refs/heads/main:refs/upstream/main' '+refs/heads/dev:refs/upstream/dev'; then
while read -r h k; do upid[$k]=$h; done < <(git log --format='%H %ae/%at' refs/upstream/main refs/upstream/dev)
fi
ups=()
for m in $(git log --first-parent --merges --grep='^Merge upstream' --format=%H "$base..$SHA"); do
for c in $(git log --first-parent --format=%H "$m^1..$m^2"); do
@@ -385,7 +527,12 @@ jobs:
elif [[ $s != Merge* ]]; then
[ -z "${seen[$c]:-}" ] || continue
seen[$c]=1
ups+=("- $s ([${c:0:7}]($gh/commit/$c))")
u=${upid[$(git log -1 --format='%ae/%at' "$c")]:-}
if [ -n "$u" ]; then
ups+=("- $s ([${u:0:7}]($gh/commit/$u))")
else
ups+=("- $s ([${c:0:7}]($web/commit/$c))")
fi
fi
done
done
+14
View File
@@ -6,6 +6,7 @@ This document provides an overview of CLI commands that can be sent to MeshCore
- [Operational](#operational)
- [Neighbors](#neighbors-repeater-only)
- [Posts](#posts-room-server-only)
- [Statistics](#statistics)
- [Logging](#logging)
- [Information](#info)
@@ -164,6 +165,19 @@ in order of preference:
---
## Posts (Room Server Only)
### Post a message as the room server
**Usage:**
- `room.post <message>`
**Parameters:**
- `message`: The text of the post
**Note:** The post is stored and pushed to logged-in clients like a client's post, with the room server as its author.
---
## Statistics
### Clear Stats
+8 -2
View File
@@ -124,10 +124,16 @@ pkg = https://github.com/meshcore-dev/Adafruit_nRF52_Arduino#d541301665b40959682
[nrf52_base]
extends = arduino_base
platform = nordicnrf52
; CUSTOM (TeTeHacko): exact platform and toolchain (upstream: `nordicnrf52`,
; `^1.140201.0`). Unpinned, every build took the newest: on 30. 11. 2026 the
; public release went to platform 11.1.0, released that same day, while the
; bench and the masts built on 10.12.0. Latest, but by a commit: Renovate
; moves these two (.github/renovate.json), its PR builds every public image.
; Libraries: platformio.lock (tools/pio_lock.py, moved by tth-lock-refresh).
platform = platformio/nordicnrf52@11.1.0
platform_packages =
framework-arduinoadafruitnrf52 @ ${nrf52_fw.pkg}
platformio/toolchain-gccarmnoneeabi@^1.140201.0
platformio/toolchain-gccarmnoneeabi@1.140201.0
; Stamping verze pro KAŽDÝ nRF52 env, ne po jednom: 19. 8. 2026 se ukázalo, že
; z 585 envů v repu stampovaly DVA, takže `ver` na lavičních deskách hlásil
; literál z upstream headeru a z uzlu nešlo poznat, který build na něm je.
+448
View File
@@ -0,0 +1,448 @@
; Library lock for PlatformIO (tools/pio_lock.py; PlatformIO has no lockfile).
; Per env, every library in .pio/libdeps/<env>, transitive ones included:
; `owner/name@version` from the registry, `<remote>#<commit>` of a git library
; (pinned in platformio.ini, only checked here) or a file: URI.
; CI installs these before building and fails when a build resolved anything
; else. Renovate bumps the registry lines; tools/pio_lock.py freeze rewrites
; an env from what it resolved.
[Heltec_t114_companion_radio_ble]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
densaugeo/base64@1.4.0
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Heltec_t114_repeater]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Heltec_v3_companion_radio_ble]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
densaugeo/base64@1.4.0
electroniccats/CayenneLPP@1.6.1
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Heltec_v3_repeater]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bakercp/CRC32@2.0.1
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
esp32async/AsyncTCP@3.6.1
esp32async/ESPAsyncWebServer@3.10.3
file://arch/esp32/AsyncElegantOTA
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[RAK_4631_companion_radio_ble]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
boschsensortec/BSEC Software Library@1.8.1492
densaugeo/base64@1.4.0
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
sparkfun/SparkFun u-blox GNSS Arduino Library@2.2.29
stevemarple/MicroNMEA@2.0.6
[RAK_4631_repeater]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
boschsensortec/BSEC Software Library@1.8.1492
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
sparkfun/SparkFun u-blox GNSS Arduino Library@2.2.29
stevemarple/MicroNMEA@2.0.6
[RAK_4631_room_server]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
boschsensortec/BSEC Software Library@1.8.1492
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
sparkfun/SparkFun u-blox GNSS Arduino Library@2.2.29
stevemarple/MicroNMEA@2.0.6
[SenseCap_Solar_companion_radio_ble]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
densaugeo/base64@1.4.0
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[SenseCap_Solar_repeater]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@1.13.0
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
https://github.com/jgromes/RadioLib.git#6d8934836678d8894e3d556550475b37dce3e2b6
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Xiao_nrf52_companion_radio_ble]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
densaugeo/base64@1.4.0
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Xiao_nrf52_repeater]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Xiao_nrf52_room_server]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[Xiao_nrf52_sensor]
adafruit/Adafruit AHTX0@2.0.6
adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
adafruit/Adafruit INA260 Library@1.5.4
adafruit/Adafruit INA3221 Library@1.0.1
adafruit/Adafruit MLX90614 Library@2.1.7
adafruit/Adafruit NeoPixel@1.15.6
adafruit/Adafruit SH110X@2.1.15
adafruit/Adafruit SHTC3 Library@1.0.2
adafruit/Adafruit SSD1306@2.5.18
adafruit/Adafruit Unified Sensor@1.1.15
adafruit/Adafruit_VL53L0X@1.2.5
adafruit/RTClib@2.1.4
arduino-libraries/Arduino_LPS22HB@1.0.3
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
robtillaart/INA226@0.6.6
rweather/Crypto@0.4.0
sensirion/Sensirion Core@0.7.3
sensirion/Sensirion I2C SHT4x@1.1.2
stevemarple/MicroNMEA@2.0.6
[t1000e_companion_radio_ble]
adafruit/Adafruit BusIO@1.17.4
adafruit/RTClib@2.1.4
bblanchon/ArduinoJson@7.4.3
densaugeo/base64@1.4.0
electroniccats/CayenneLPP@1.6.1
end2endzone/NonBlockingRTTTL@1.4.0
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
rweather/Crypto@0.4.0
stevemarple/MicroNMEA@2.0.6
[t1000e_repeater]
adafruit/Adafruit BusIO@1.17.4
adafruit/RTClib@2.1.4
bblanchon/ArduinoJson@7.4.3
electroniccats/CayenneLPP@1.6.1
https://github.com/oltaco/CustomLFS#b3928ea2d0f46c2533e901c43f471a081c503a3c
jgromes/RadioLib@7.8.1
melopero/Melopero RV3028@1.2.0
rweather/Crypto@0.4.0
stevemarple/MicroNMEA@2.0.6
+1
View File
@@ -44,6 +44,7 @@ a different board.
| `ble_flash_node.sh` | BLE OTA of a node out of reach of a cable, with the checks around it (silence, services, version) |
| `ble_dfu.py` | legacy Nordic DFU over BLE for the Adafruit nRF52 bootloader (buttonless, both phases) |
| `build_version.py` | PlatformIO pre-script: real version and build time for `ver` |
| `pio_lock.py` | library lock for PlatformIO (`platformio.lock`): `install` the locked versions before a build, `check` that nothing else resolved, `freeze` a resolution, `moved` against git |
| `bl_sign_pkg.py` | DFU zip for a board with the signed (`SIGNED_FW`) Adafruit bootloader: `adafruit-nrfutil dfu genpkg --key-file` with its two Python 3 bugs on that path fixed |
| `bl_verify_pkg.py` | checks a DFU zip the way the signed bootloader will (device type, ECDSA P-256 over the init packet, image length and hash) |
| `bl_allowed_key` | the public key the signed bootloader carries (`SIGNED_FW_QX`/`QY`) |
+259
View File
@@ -0,0 +1,259 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
"""Library lock file for PlatformIO, which has none (platformio.lock).
Upstream's lib_deps are ranges (`^2.1.3`) and every library pulls in its own
dependencies, so a build takes whatever is newest that day: the same commit
built twice can differ. platformio.lock records, per env, the exact version of
every library in .pio/libdeps/<env> (direct and transitive). The platform and
the toolchain are pinned in platformio.ini itself.
pio_lock.py install -e ENV [-e ENV ...]
install the locked registry versions into .pio/libdeps/<env> (no
dependencies, nothing saved to platformio.ini). Run it before `pio
run`: PlatformIO keeps an installed library that satisfies lib_deps.
git and file libraries are pinned in platformio.ini and only checked.
pio_lock.py check -e ENV [-e ENV ...]
exit 1 when .pio/libdeps/<env> is not exactly the lock: a library
missing, extra, or of another version (run it after the build).
pio_lock.py freeze -e ENV [-e ENV ...]
write what .pio/libdeps/<env> holds into the lock (replaces those
envs' sections). After `pio pkg install -e ENV` in a clean libdeps
dir this locks today's resolution.
pio_lock.py envs
the envs the lock has a section for, one per line.
pio_lock.py moved [--base REV]
what changed against the lock in git REV (default HEAD), one
`name old -> new` line per registry library (any env).
Lock format: `[env]` sections; one library per line, `owner/name@version`
from the registry, `<remote>#<commit>` of a git library, or a file: URI.
--lock FILE (default: platformio.lock next to platformio.ini);
PLATFORMIO_LIBDEPS_DIR is honoured as by PlatformIO.
"""
from __future__ import annotations
import argparse
import json
import os
import shutil
import subprocess
import sys
from pathlib import Path
REPO = Path(__file__).resolve().parent.parent
HEADER = """\
; Library lock for PlatformIO (tools/pio_lock.py; PlatformIO has no lockfile).
; Per env, every library in .pio/libdeps/<env>, transitive ones included:
; `owner/name@version` from the registry, `<remote>#<commit>` of a git library
; (pinned in platformio.ini, only checked here) or a file: URI.
; CI installs these before building and fails when a build resolved anything
; else. Renovate bumps the registry lines; tools/pio_lock.py freeze rewrites
; an env from what it resolved.
"""
# PlatformIO puts the test framework into an env's libdeps (`pio pkg install`
# in CI did, a local one did not); it is never linked into the firmware.
IGNORED = {"throwtheswitch/Unity"}
def libdeps_dir() -> Path:
d = os.environ.get("PLATFORMIO_LIBDEPS_DIR")
return Path(d) if d else REPO / ".pio" / "libdeps"
def read_lock(path: Path) -> dict[str, list[str]]:
envs: dict[str, list[str]] = {}
cur: list[str] | None = None
if not path.exists():
return envs
for raw in path.read_text().splitlines():
line = raw.strip()
if not line or line.startswith((";", "#")):
continue
if line.startswith("[") and line.endswith("]"):
cur = envs.setdefault(line[1:-1], [])
elif cur is None:
raise SystemExit(f"{path}: library line before any [env]: {line}")
else:
cur.append(line)
return envs
def write_lock(path: Path, envs: dict[str, list[str]]) -> None:
out = [HEADER]
for env in sorted(envs):
out.append(f"[{env}]")
out.extend(sorted(envs[env], key=str.lower))
out.append("")
path.write_text("\n".join(out))
def git_uri(lib: Path) -> str:
"""`<remote>#<commit>` of a library PlatformIO cloned (it leaves no .piopm)."""
def git(*args: str) -> str:
return subprocess.run(
["git", "-C", str(lib), *args], check=True, capture_output=True, text=True
).stdout.strip()
return f"{git('remote', 'get-url', 'origin')}#{git('rev-parse', 'HEAD')}"
def installed(env: str) -> list[str]:
"""Lock lines for what .pio/libdeps/<env> holds."""
d = libdeps_dir() / env
if not d.is_dir():
raise SystemExit(
f"{d}: no such libdeps dir (run `pio pkg install -e {env}` first)"
)
lines = []
for lib in sorted(p for p in d.iterdir() if p.is_dir()):
pm = lib / ".piopm"
if not pm.exists():
if (lib / ".git").exists():
lines.append(git_uri(lib))
continue
raise SystemExit(f"{lib}: neither .piopm nor .git")
meta = json.loads(pm.read_text())
if meta.get("type") != "library":
continue
spec = meta.get("spec") or {}
if spec.get("uri"):
lines.append(spec["uri"])
elif spec.get("owner"):
if f"{spec['owner']}/{spec['name']}" in IGNORED:
continue
lines.append(f"{spec['owner']}/{spec['name']}@{meta['version']}")
else:
raise SystemExit(f"{pm}: neither a registry owner nor a URI")
return lines
def pio() -> str:
exe = shutil.which("pio") or str(Path.home() / ".platformio/penv/bin/pio")
if not Path(exe).exists():
raise SystemExit("pio not found (PATH, ~/.platformio/penv/bin)")
return exe
def cmd_install(lock: dict[str, list[str]], envs: list[str]) -> int:
for env in envs:
if env not in lock:
print(f"{env}: not in the lock", file=sys.stderr)
return 1
# URI libraries (git, file) are pinned in platformio.ini itself and
# come from there; the lock only checks them
reg = [line for line in lock[env] if "://" not in line]
args = [
pio(),
"pkg",
"install",
"-d",
str(REPO),
"-e",
env,
"--no-save",
"--skip-dependencies",
"-s",
]
for line in reg:
args += ["-l", line]
print(f"{env}: installing {len(reg)} locked libraries", flush=True)
subprocess.run(args, check=True)
return 0
def cmd_check(lock: dict[str, list[str]], envs: list[str]) -> int:
bad = 0
for env in envs:
want, have = set(lock.get(env, [])), set(installed(env))
if env not in lock:
print(f"{env}: not in the lock", file=sys.stderr)
bad = 1
continue
if want == have:
print(f"{env}: {len(have)} libraries as locked")
continue
bad = 1
for line in sorted(want - have):
print(f"{env}: locked but not installed: {line}", file=sys.stderr)
for line in sorted(have - want):
print(f"{env}: installed but not locked: {line}", file=sys.stderr)
if bad:
print(
"fix: tools/pio_lock.py freeze -e <env> after a clean `pio pkg install -e <env>`",
file=sys.stderr,
)
return bad
def moved(base: dict[str, list[str]], lock: dict[str, list[str]]) -> list[str]:
def versions(envs: dict[str, list[str]]) -> dict[str, set[str]]:
out: dict[str, set[str]] = {}
for lines in envs.values():
for line in lines:
if "://" not in line:
name, _, ver = line.rpartition("@")
out.setdefault(name, set()).add(ver)
return out
old, new = versions(base), versions(lock)
res = []
for name in sorted(set(old) | set(new), key=str.lower):
o, n = sorted(old.get(name, set())), sorted(new.get(name, set()))
if o != n:
res.append(
f"{name.split('/', 1)[-1]} {', '.join(o) or '-'} -> {', '.join(n) or '-'}"
)
return res
def main() -> None:
ap = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
)
ap.add_argument("command", choices=["install", "check", "freeze", "envs", "moved"])
ap.add_argument(
"-e", "--env", action="append", default=[], help="PlatformIO env (repeat)"
)
ap.add_argument("--lock", type=Path, default=REPO / "platformio.lock")
ap.add_argument(
"--base", default="HEAD", help="moved: git revision to compare with"
)
a = ap.parse_args()
lock = read_lock(a.lock)
if a.command == "envs":
print("\n".join(sorted(lock)))
return
if a.command == "moved":
rel = a.lock.resolve().relative_to(REPO)
old = subprocess.run(
["git", "-C", str(REPO), "show", f"{a.base}:{rel}"],
capture_output=True,
text=True,
check=False,
).stdout
tmp = Path(os.environ.get("TMPDIR", "/tmp")) / f"pio-lock-base-{os.getpid()}"
tmp.write_text(old)
try:
print("\n".join(moved(read_lock(tmp), lock)))
finally:
tmp.unlink()
return
if not a.env:
ap.error("at least one -e ENV")
if a.command == "install":
sys.exit(cmd_install(lock, a.env))
if a.command == "check":
sys.exit(cmd_check(lock, a.env))
for env in a.env:
lock[env] = installed(env)
print(f"{env}: {len(lock[env])} libraries locked")
write_lock(a.lock, lock)
if __name__ == "__main__":
main()
+36 -41
View File
@@ -137,50 +137,45 @@ build_src_filter = ${SenseCap_Solar.build_src_filter}
+<../examples/kiss_modem/>
; CUSTOM (TeTeHacko): EXACT dependency set of the SenseCap Solar repeater --
; PlatformIO has no lockfile, and upstream inherits ranges (`^2.1.5`) and an
; unpinned `platform = nordicnrf52`, so every build resolves whatever is newest
; that day: on 23. 10. 2026 one commit built 271 kB differently from the image
; that had run in the field for a week (platform 11.0.0 instead of 10.12.0,
; Adafruit GFX / INA260 / MLX90614 a patch or minor newer). These are the
; versions proven in the field; the public release builds them too.
;
; RadioLib, CustomLFS and the framework are git pins upstream and copied as is.
; ORDER MATTERS: it is the link order -- same as upstream's inheritance
; (arduino_base, nrf52_base, sensor_base), or the layout of the image changes.
; Moving to a newer upstream: if its platformio.ini changed lib_deps or the
; platform, refresh this list from a clean `pio run` (`.pio/libdeps/<env>`) and
; check the result on the bench before releasing it.
; The masts' dependency set, in upstream's inheritance order (arduino_base,
; nrf52_base, sensor_base) -- ORDER MATTERS, it is the link order -- with the
; transitive libraries listed too. 23. 10. 2026 one commit built 271 kB
; differently from the image in the field because everything floated; since
; 30. 11. 2026 the exact versions are platformio.lock's job (tools/pio_lock.py,
; checked by every CI build) and the daily lock refresh moves them, so the
; versions here are ranges from the ones proven in the field. RadioLib and
; CustomLFS stay git pins.
[sensecap_pinned]
platform = nordicnrf52@10.12.0
platform = ${nrf52_base.platform}
lib_deps =
SPI
Wire
https://github.com/jgromes/RadioLib.git#6d8934836678d8894e3d556550475b37dce3e2b6
rweather/Crypto @ 0.4.0
adafruit/RTClib @ 2.1.4
melopero/Melopero RV3028 @ 1.2.0
electroniccats/CayenneLPP @ 1.6.1
rweather/Crypto @ ^0.4.0
adafruit/RTClib @ ^2.1.4
melopero/Melopero RV3028 @ ^1.2.0
electroniccats/CayenneLPP @ ^1.6.1
https://github.com/oltaco/CustomLFS#0.2.3
adafruit/Adafruit INA3221 Library @ 1.0.1
adafruit/Adafruit INA219 @ 1.2.3
robtillaart/INA226 @ 0.6.6
adafruit/Adafruit INA260 Library @ 1.5.3
adafruit/Adafruit AHTX0 @ 2.0.6
adafruit/Adafruit BME280 Library @ 2.3.0
adafruit/Adafruit BMP280 Library @ 2.6.8
adafruit/Adafruit SHTC3 Library @ 1.0.2
sensirion/Sensirion I2C SHT4x @ 1.1.2
arduino-libraries/Arduino_LPS22HB @ 1.0.3
adafruit/Adafruit MLX90614 Library @ 2.1.6
adafruit/Adafruit_VL53L0X @ 1.2.5
stevemarple/MicroNMEA @ 2.0.6
adafruit/Adafruit BME680 Library @ 2.0.6
adafruit/Adafruit BMP085 Library @ 1.2.4
; transitive (pulled in by the sensor libraries), pinned so they cannot float
adafruit/Adafruit BusIO @ 1.17.4
adafruit/Adafruit Unified Sensor @ 1.1.15
adafruit/Adafruit GFX Library @ 1.12.6
adafruit/Adafruit SSD1306 @ 2.5.17
adafruit/Adafruit SH110X @ 2.1.15
adafruit/Adafruit NeoPixel @ 1.15.5
sensirion/Sensirion Core @ 0.7.3
adafruit/Adafruit INA3221 Library @ ^1.0.1
adafruit/Adafruit INA219 @ ^1.2.3
robtillaart/INA226 @ ^0.6.6
adafruit/Adafruit INA260 Library @ ^1.5.3
adafruit/Adafruit AHTX0 @ ^2.0.6
adafruit/Adafruit BME280 Library @ ^2.3.0
adafruit/Adafruit BMP280 Library @ ^2.6.8
adafruit/Adafruit SHTC3 Library @ ^1.0.2
sensirion/Sensirion I2C SHT4x @ ^1.1.2
arduino-libraries/Arduino_LPS22HB @ ^1.0.3
adafruit/Adafruit MLX90614 Library @ ^2.1.6
adafruit/Adafruit_VL53L0X @ ^1.2.5
stevemarple/MicroNMEA @ ^2.0.6
adafruit/Adafruit BME680 Library @ ^2.0.6
adafruit/Adafruit BMP085 Library @ ^1.2.4
; transitive (pulled in by the sensor libraries), listed for the link order
adafruit/Adafruit BusIO @ ^1.17.4
adafruit/Adafruit Unified Sensor @ ^1.1.15
adafruit/Adafruit GFX Library @ ^1.12.6
adafruit/Adafruit SSD1306 @ ^2.5.17
adafruit/Adafruit SH110X @ ^2.1.15
adafruit/Adafruit NeoPixel @ ^1.15.5
sensirion/Sensirion Core @ ^0.7.3