refactor: streamline Gitea release workflow and remove obsolete OTA data initialization script

This commit is contained in:
2025-02-20 15:41:14 +01:00
parent 6391054c23
commit cce39319d9
4 changed files with 61 additions and 127 deletions

View File

@ -1,22 +0,0 @@
Import("env")
import os
def create_ota_data_initial(source, target, env):
build_dir = env.subst("$BUILD_DIR")
ota_data_path = os.path.join(build_dir, "ota_data_initial.bin")
# WLED-style OTA data initialization
# First 32 bytes are for the first OTA slot
# Next 32 bytes are for the second OTA slot
# Pattern: 0x00 for the running partition, 0x55 for others
ota_data = bytearray([0x00] * 32 + [0x55] * 32)
# Fill the rest with 0xFF
ota_data.extend([0xFF] * (0x2000 - len(ota_data)))
with open(ota_data_path, 'wb') as f:
f.write(ota_data)
print(f"Created ota_data_initial.bin ({len(ota_data)} bytes)")
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", create_ota_data_initial)