mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-04-04 20:27:53 +03:00
build: split recovery footprint trims into separate config profile
This commit is contained in:
23
build-scripts/build_recovery_size.sh
Normal file
23
build-scripts/build_recovery_size.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
source /opt/esp/idf/export.sh >/dev/null 2>&1
|
||||
|
||||
BUILD_DIR="${1:-build-recovery-trim}"
|
||||
DEFAULTS="sdkconfig.defaults;sdkconfig.recovery.defaults"
|
||||
|
||||
# Build only the recovery ELF (skip squeezelite.elf target).
|
||||
idf.py -B "${BUILD_DIR}" -D SDKCONFIG_DEFAULTS="${DEFAULTS}" recovery.elf
|
||||
|
||||
# Generate a standalone recovery.bin from the built ELF.
|
||||
python /opt/esp/idf/components/esptool_py/esptool/esptool.py \
|
||||
--chip esp32 elf2image -o "${BUILD_DIR}/recovery.bin" "${BUILD_DIR}/recovery.elf" >/dev/null
|
||||
|
||||
# Print recovery image size summary from map.
|
||||
python /opt/esp/idf/tools/idf_size.py "${BUILD_DIR}/recovery.map"
|
||||
|
||||
# Print partition fit/overflow status for recovery.bin.
|
||||
python /opt/esp/idf/components/partition_table/check_sizes.py \
|
||||
--offset 0x8000 partition --type app \
|
||||
"${BUILD_DIR}/partition_table/partition-table.bin" \
|
||||
"${BUILD_DIR}/recovery.bin" || true
|
||||
Reference in New Issue
Block a user