Trim unused features from the Hazelwood RAK4631 repeater build
Build and deploy Docs site to GitHub Pages / github-pages (push) Canceled after 0s
Run Unit Tests / nrf52-companion-smoke (push) Canceled after 0s
Run Unit Tests / nrf52-sensor-smoke (push) Canceled after 0s
Run Unit Tests / optional-display-smoke (push) Canceled after 0s
Run Unit Tests / esp32-sensor-smoke (push) Canceled after 0s
Run Unit Tests / esp32-ethernet-companion-smoke (push) Canceled after 0s
Run Unit Tests / esp32-classic-companion-smoke (push) Canceled after 0s
Run Unit Tests / esp32-constrained-companion-smoke (push) Canceled after 0s
Run Unit Tests / cross-platform-smoke (push) Canceled after 0s
Run Unit Tests / cardputer-smoke (push) Canceled after 0s
Run Unit Tests / management-reports (push) Canceled after 0s
Run Unit Tests / stm32-companion-smoke (push) Canceled after 0s
Run Unit Tests / stm32-mini-repeater-smoke (push) Canceled after 0s
Run Unit Tests / bootloader-version (push) Canceled after 0s
Run Unit Tests / test (push) Canceled after 0s
Run Unit Tests / hosted-doc-links (push) Canceled after 0s
Build and deploy Docs site to GitHub Pages / github-pages (push) Canceled after 0s
Run Unit Tests / nrf52-companion-smoke (push) Canceled after 0s
Run Unit Tests / nrf52-sensor-smoke (push) Canceled after 0s
Run Unit Tests / optional-display-smoke (push) Canceled after 0s
Run Unit Tests / esp32-sensor-smoke (push) Canceled after 0s
Run Unit Tests / esp32-ethernet-companion-smoke (push) Canceled after 0s
Run Unit Tests / esp32-classic-companion-smoke (push) Canceled after 0s
Run Unit Tests / esp32-constrained-companion-smoke (push) Canceled after 0s
Run Unit Tests / cross-platform-smoke (push) Canceled after 0s
Run Unit Tests / cardputer-smoke (push) Canceled after 0s
Run Unit Tests / management-reports (push) Canceled after 0s
Run Unit Tests / stm32-companion-smoke (push) Canceled after 0s
Run Unit Tests / stm32-mini-repeater-smoke (push) Canceled after 0s
Run Unit Tests / bootloader-version (push) Canceled after 0s
Run Unit Tests / test (push) Canceled after 0s
Run Unit Tests / hosted-doc-links (push) Canceled after 0s
Drop display, GPS, INA, RS232, KISS host and every sensor driver except SHTC3 (RAK1901) from RAK_4631_repeater_unified_lora_ota, keeping the env name and therefore OTA target id 05F5FFAE. The Full image shrinks by about 125 KB, leaving more in-place room for LoRa OTA deltas. check_firmware_capabilities.py accepts capabilities listed in MESHCORE_LOCAL_OMIT_CAPABILITIES as deliberately omitted, and fails if a listed one is still present.
This commit is contained in:
1 parent
bcb5c6a08a
commit
f36852812e
2 files changed
+36
No files matched your search
@@ -37,6 +37,23 @@ case "${2:-}" in
|
||||
*companion*) LOCAL_BUILD_FLAGS="${LOCAL_BUILD_FLAGS} -DBLE_PIN_CODE=123456" ;;
|
||||
esac
|
||||
|
||||
# Hazelwood RAK4631 repeaters (KM-Test, Treebeard): no display, GPS, INA, RS232
|
||||
# or KISS host; Treebeard's only sensor is a RAK1901 (SHTC3). Dropping the rest
|
||||
# shrinks the image by ~100 KB, which leaves more in-place room for LoRa OTA
|
||||
# deltas. The env name must stay as is: it is the OTA target id (05F5FFAE).
|
||||
# Upstream qualification still expects these features from the env name, so
|
||||
# list them for scripts/check_firmware_capabilities.py to accept as omitted.
|
||||
case "${2:-}" in
|
||||
RAK_4631_repeater_unified_lora_ota)
|
||||
LOCAL_BUILD_FLAGS="${LOCAL_BUILD_FLAGS} -UDISPLAY_CLASS -UENV_INCLUDE_GPS -UWITH_RS232_BRIDGE -UMESH_ENABLE_HOST_KISS"
|
||||
for sensor in AHTX0 BME280 BME680 BME680_BSEC BMP085 BMP280 INA219 INA226 INA260 INA3221 LPS22HB MLX90614 RAK12035 SHT4X VL53L0X; do
|
||||
LOCAL_BUILD_FLAGS="${LOCAL_BUILD_FLAGS} -UENV_INCLUDE_${sensor}"
|
||||
done
|
||||
MESHCORE_LOCAL_OMIT_CAPABILITIES="bridge.rs232,bridge.rs232.merged,sensor.gps,sensor.ina219,sensor.ina226,sensor.ina260,sensor.ina3221,radio2.kiss.host,radio2.kiss.usb"
|
||||
export MESHCORE_LOCAL_OMIT_CAPABILITIES
|
||||
;;
|
||||
esac
|
||||
|
||||
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS:+${PLATFORMIO_BUILD_FLAGS} }${LOCAL_BUILD_FLAGS}"
|
||||
|
||||
if [ -d /opt/homebrew/bin ]; then
|
||||
|
||||
@@ -301,6 +301,25 @@ def main() -> int:
|
||||
}
|
||||
)
|
||||
|
||||
# Local builds may deliberately compile features out of an existing OTA
|
||||
# identity. Listed capabilities must then be absent: drop their checks and
|
||||
# record the omission as a reduction. One that is still present means the
|
||||
# trim did not apply, so it fails.
|
||||
omitted = {value.strip() for value in
|
||||
os.environ.get("MESHCORE_LOCAL_OMIT_CAPABILITIES", "").split(",") if value.strip()}
|
||||
kept_checks = []
|
||||
for check in checks:
|
||||
if check["capability"] not in omitted:
|
||||
kept_checks.append(check)
|
||||
elif check["present"]:
|
||||
print(f"capability check failed: {check['capability']} is listed in "
|
||||
"MESHCORE_LOCAL_OMIT_CAPABILITIES but still present", file=sys.stderr)
|
||||
malformed = True
|
||||
else:
|
||||
args.reduction.append(f"locally omitted: {check['capability']}")
|
||||
checks = kept_checks
|
||||
args.capability = [value for value in args.capability if value not in omitted]
|
||||
|
||||
capabilities = stable_unique(
|
||||
args.capability + [check["capability"] for check in checks]
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user