Skip to content

flash: Update search logic to find programmer binaries - #238

Open
kshiruri wants to merge 1 commit into
qualcomm-linux:mainfrom
kshiruri:bootbins-immutable-support
Open

kshiruri wants to merge 1 commit into
qualcomm-linux:mainfrom
kshiruri:bootbins-immutable-support

Conversation

@kshiruri

@kshiruri kshiruri commented Sep 24, 2026 •

Copy link
Copy Markdown

Update search logic to find programmer binaries in order to mirror the logic used in yocto recipe

Changes

flash/gen-flash-dirs.sh

For Spinor targets:

  • spinor/: unchanged — full boot-bin archive contents copied, same as before.
  • nvme/, ufs/, emmc/: instead of using file name, uses "*.melf" pattern to find programmer binaries and copies only those files into the storage dir — mirroring the *.melf match used in the Yocto recipe.

When the target has no spinor storage: behavior is unchanged — the full boot-bin archive is copied into every supported storage dir, as before.

@kshiruri
kshiruri force-pushed the bootbins-immutable-support branch from 5a4fe2d to 928d2fa Compare September 25, 2026 05:31
…r targets

For spinor-equipped targets, gen-flash-dirs.sh now searches for programmer
binaries using the *.melf file pattern instead of searching using file name.

The BOOT_BIN_SRC location is determined by checking in order:
  1. ${BOARD_BOOT_DIR}/partition_${storage}/ — if it exists
  2. ${BOARD_BOOT_DIR}/${storage}/ — if partition_${storage}/ doesn't exist
  3. ${BOARD_BOOT_DIR}/ — fallback to root if neither above exists

Once BOOT_BIN_SRC is determined, for non-spinor storages on spinor targets,
the search uses find to locate *.melf files within BOOT_BIN_SRC and copies
only those programmer binaries, aligning with the search logic used in
Yocto builds (recipes-bsp/firmware-boot/firmware-qcom-boot-common.inc).

Spinor storage continues to receive the full boot-bin archive contents.
Non-spinor targets remain unaffected — the full archive is still copied
to all supported storage directories.

Signed-off-by: Karthik Shiruri <kshiruri@qti.qualcomm.com>
@kshiruri

Copy link
Copy Markdown
Author

Hi Keerthi Gowda (@keerthi-go) Bjordis Collaku (@bjordiscollaku) please help in testing this on hamoa/purva.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant