mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-22 20:01:17 +00:00
Add full Companion OTA source builds
This commit is contained in:
1 parent
1bceda54a6
commit
88ba5b26cb
19 files changed
+1212
-86
No files matched your search
@@ -15,11 +15,20 @@ def parse_flash_size(value):
|
||||
if os.environ.get("MESHCORE_ESP32_FULL_BUILD") == "1":
|
||||
board = env.BoardConfig()
|
||||
flash_size = parse_flash_size(board.get("upload.flash_size", "4MB"))
|
||||
companion_radio_full = (
|
||||
os.environ.get("MESHCORE_COMPANION_RADIO_FULL") == "1"
|
||||
)
|
||||
|
||||
if flash_size >= 16 * 1024 * 1024:
|
||||
partitions = "default_16MB.csv"
|
||||
elif flash_size >= 8 * 1024 * 1024:
|
||||
partitions = "default_8MB.csv"
|
||||
elif flash_size >= 4 * 1024 * 1024 and companion_radio_full:
|
||||
# A classic ESP32 Companion with USB, BLE, WiFi, WebConfig, and the
|
||||
# mOTA seeder can exceed the largest possible pair of 4 MiB OTA
|
||||
# slots. This role cannot install mOTA on itself, so give it one 3 MiB
|
||||
# application slot and retain SPIFFS/coredump.
|
||||
partitions = "huge_app.csv"
|
||||
elif flash_size >= 4 * 1024 * 1024:
|
||||
partitions = "variants/dual_ota_full_4MB.csv"
|
||||
else:
|
||||
@@ -28,8 +37,12 @@ if os.environ.get("MESHCORE_ESP32_FULL_BUILD") == "1":
|
||||
if partitions:
|
||||
board.update("build.partitions", partitions)
|
||||
print(
|
||||
"ESP32 FULL build: using %s for %s flash"
|
||||
% (partitions, board.get("upload.flash_size", "4MB"))
|
||||
"ESP32 FULL build%s: using %s for %s flash"
|
||||
% (
|
||||
" (Companion source-only)" if companion_radio_full else "",
|
||||
partitions,
|
||||
board.get("upload.flash_size", "4MB"),
|
||||
)
|
||||
)
|
||||
else:
|
||||
print(
|
||||
|
||||
Reference in new issue
Block a user