Partition name in manifest script (#9294)
* Fix up T-Beam 1W HW_MODEL * Add part_name for bin files * app0
This commit is contained in:
@@ -91,8 +91,8 @@ jobs:
|
|||||||
if [[ -f "$manifest" ]]; then
|
if [[ -f "$manifest" ]]; then
|
||||||
echo "Updating $manifest with $OTA_FILE (md5: $OTA_MD5, size: $OTA_SIZE)"
|
echo "Updating $manifest with $OTA_FILE (md5: $OTA_MD5, size: $OTA_SIZE)"
|
||||||
# Add OTA entry to files array if not already present
|
# Add OTA entry to files array if not already present
|
||||||
jq --arg name "$OTA_FILE" --arg md5 "$OTA_MD5" --argjson bytes "$OTA_SIZE" \
|
jq --arg name "$OTA_FILE" --arg md5 "$OTA_MD5" --argjson bytes "$OTA_SIZE" --arg part "app1" \
|
||||||
'if .files | map(select(.name == $name)) | length == 0 then .files += [{"name": $name, "md5": $md5, "bytes": $bytes}] else . end' \
|
'if .files | map(select(.name == $name)) | length == 0 then .files += [{"name": $name, "md5": $md5, "bytes": $bytes, "part_name": $part}] else . end' \
|
||||||
"$manifest" > "${manifest}.tmp" && mv "${manifest}.tmp" "$manifest"
|
"$manifest" > "${manifest}.tmp" && mv "${manifest}.tmp" "$manifest"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -60,6 +60,14 @@ def manifest_gather(source, target, env):
|
|||||||
board_platform = env.BoardConfig().get("platform")
|
board_platform = env.BoardConfig().get("platform")
|
||||||
board_mcu = env.BoardConfig().get("build.mcu").lower()
|
board_mcu = env.BoardConfig().get("build.mcu").lower()
|
||||||
needs_ota_suffix = board_platform == "nordicnrf52"
|
needs_ota_suffix = board_platform == "nordicnrf52"
|
||||||
|
|
||||||
|
# Mapping of bin files to their target partition names
|
||||||
|
# Maps the filename pattern to the partition name where it should be flashed
|
||||||
|
partition_map = {
|
||||||
|
f"{progname}.bin": "app0", # primary application slot (app0 / OTA_0)
|
||||||
|
lfsbin: "spiffs", # filesystem image flashed to spiffs
|
||||||
|
}
|
||||||
|
|
||||||
check_paths = [
|
check_paths = [
|
||||||
progname,
|
progname,
|
||||||
f"{progname}.elf",
|
f"{progname}.elf",
|
||||||
@@ -85,6 +93,9 @@ def manifest_gather(source, target, env):
|
|||||||
"md5": f.get_content_hash(), # Returns MD5 hash
|
"md5": f.get_content_hash(), # Returns MD5 hash
|
||||||
"bytes": f.get_size() # Returns file size in bytes
|
"bytes": f.get_size() # Returns file size in bytes
|
||||||
}
|
}
|
||||||
|
# Add part_name if this file represents a partition that should be flashed
|
||||||
|
if p in partition_map:
|
||||||
|
d["part_name"] = partition_map[p]
|
||||||
out.append(d)
|
out.append(d)
|
||||||
print(d)
|
print(d)
|
||||||
manifest_write(out, env)
|
manifest_write(out, env)
|
||||||
|
|||||||
@@ -195,6 +195,8 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_LINK_32
|
#define HW_VENDOR meshtastic_HardwareModel_LINK_32
|
||||||
#elif defined(T_DECK_PRO)
|
#elif defined(T_DECK_PRO)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_T_DECK_PRO
|
#define HW_VENDOR meshtastic_HardwareModel_T_DECK_PRO
|
||||||
|
#elif defined(T_BEAM_1W)
|
||||||
|
#define HW_VENDOR meshtastic_HardwareModel_TBEAM_1_WATT
|
||||||
#elif defined(T_LORA_PAGER)
|
#elif defined(T_LORA_PAGER)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_T_LORA_PAGER
|
#define HW_VENDOR meshtastic_HardwareModel_T_LORA_PAGER
|
||||||
#elif defined(HELTEC_V4)
|
#elif defined(HELTEC_V4)
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
; LilyGo T-Beam-1W (1 Watt LoRa with external PA)
|
; LilyGo T-Beam-1W (1 Watt LoRa with external PA)
|
||||||
[env:t-beam-1w]
|
[env:t-beam-1w]
|
||||||
|
custom_meshtastic_hw_model = 122
|
||||||
|
custom_meshtastic_hw_model_slug = TBEAM_1_WATT
|
||||||
|
custom_meshtastic_architecture = esp32s3
|
||||||
|
custom_meshtastic_actively_supported = true
|
||||||
|
custom_meshtastic_support_level = 1
|
||||||
|
custom_meshtastic_display_name = LILYGO T-Beam 1W
|
||||||
|
custom_meshtastic_images = tbeam-1w.svg
|
||||||
|
custom_meshtastic_tags = LilyGo
|
||||||
|
|
||||||
extends = esp32s3_base
|
extends = esp32s3_base
|
||||||
board = t-beam-1w
|
board = t-beam-1w
|
||||||
board_build.partitions = default_8MB.csv
|
board_build.partitions = default_8MB.csv
|
||||||
|
|||||||
Reference in New Issue
Block a user