From 8b0f09c43ecc0ad16b5449ae51d9f028fe673969 Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Tue, 7 Jul 2026 20:59:57 -0300 Subject: [PATCH] flash-sync: update only DTBs the image already ships The per-image DTB set is curated by config.xml (the clone image carries boards the original image deliberately leaves out), so the sync must never add files to /flash/dtbs, only refresh the ones present. Caught on the first hardware run: a clean sync on the original image added three clone-only DTBs. Co-Authored-By: Claude Fable 5 --- .../ArchR/packages/archr/sources/scripts/archr-flash-sync | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/ArchR/packages/archr/sources/scripts/archr-flash-sync b/projects/ArchR/packages/archr/sources/scripts/archr-flash-sync index 3b9f1c8684..5f7292c172 100644 --- a/projects/ArchR/packages/archr/sources/scripts/archr-flash-sync +++ b/projects/ArchR/packages/archr/sources/scripts/archr-flash-sync @@ -97,6 +97,11 @@ fi if [ -d "${SRC}/device_trees" ] && [ -d "${BOOT}/dtbs" ]; then for dtb in "${SRC}/device_trees/"*.dtb; do [ -f "${dtb}" ] || continue + # Update only DTBs the image already ships: config.xml curates the + # per-image DTB list (the clone image carries boards the original + # image deliberately leaves out), so adding files here would undo + # that curation. Content never diverges for same-named DTBs. + [ -f "${BOOT}/dtbs/$(basename "${dtb}")" ] || continue sync_file "${dtb}" "${BOOT}/dtbs/$(basename "${dtb}")" done fi