Skip to content

platforms/iq10-rrd: add ufs partition layout - #14

Open
roshs189 wants to merge 5 commits into
mainfrom
add/iq10-rrd
Open

roshs189 wants to merge 5 commits into
mainfrom
add/iq10-rrd

Conversation

@roshs189

Copy link
Copy Markdown
Owner

Summary

  • Add partitions.conf and contents.xml.in for the iq10-rrd board (UFS storage, SA8797P/NORD chipset family)
  • Reverse-mapped from the board's authoritative partition.xml spec (8 physical_partition/LUN blocks); vendor_a excluded as it has no _b counterpart (unpaired A/B label)

Validation

  • make all: generates partitions.xml, GPT images, rawprogram/patch XML, and contents.xml cleanly for this board
  • tests/integration/check-missing-files: 0 Missing (no co-location issues); 25 unique Unknown binaries — all are genuinely new/board-specific boot images not yet in the allowlist, not typos (list available on request; a follow-up PR is expected to extend the allowlist separately)
  • LUN geometry re-verified against source spec: LUN0 7/8 (vendor_a excluded), LUN1-3 16 each, LUN4 83, LUN5 57, LUN6 1, LUN7 empty (no partitions, no rawprogram/LUN counterpart) — all match

Test plan

  • make all succeeds
  • check-missing-files shows 0 Missing
  • LUN partition counts match source partition.xml
  • Only partitions.conf + contents.xml.in committed (generated artifacts cleaned up)

@roshs189
roshs189 force-pushed the add/iq10-rrd branch 2 times, most recently from 874230a to f10899e Compare August 22, 2026 17:40
@roshs189
roshs189 force-pushed the add/iq10-rrd branch 3 times, most recently from 95db71b to 3c8f5b0 Compare August 28, 2026 16:03
roshs189 added a commit to roshs189/meta-qcom that referenced this pull request Aug 29, 2026
Re-points qcom-ptool.inc SRCREV at the current head of roshs189/qcom-ptool#14
(add/iq10-rrd on qcom-ptool) so the build picks up its partition files.

Signed-off-by: Roshan Sivakumar <roshs@qti.qualcomm.com>
Signed-off-by: Roshan Sivakumar <roshs@qti.qualcomm.com>
roshs189 added a commit to roshs189/meta-qcom that referenced this pull request Aug 29, 2026
…sed head

PR roshs189/qcom-ptool#14 was rebased to a single
commit; its head moved to 734ac25a. Reconcile the SRCREV pin to the current
PR head so the ptool source built for iq10-rrd tracks the open PR.
roshs189 and others added 3 commits August 31, 2026 17:13
Auto-correct the generated ufs partitions.conf so it only references
binaries that actually exist at flash time (bootbins union ∪ flat-build
produced), leaving partition.xml / board_partition_meta.yaml read-only.

- substitute stale devcfg name -> shipped binary (devcfg_auto_sgvm.mbn ->
  devcfg_iot.mbn) in both slots, per board_partition_meta.yaml rename_map
- line-drop (comment whole --partition) the 8 firmware-only partitions whose
  payload is neither in the bootbins zips nor produced by the flat build
- token-drop (comment only --filename=, keep the GPT slot) the 34
  absent-payload entries so LUN/GPT geometry is preserved
- rootfs.img / efi.bin / dtb.bin kept (flat-build produced)

Each removal is a "# RECONCILE-DROP(...)" comment (never a silent delete) so
PR review sees exactly what was dropped and why.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion.xml

Regenerate the reconciled UFS partitions.conf directly from the current
spec partition.xml filtered by the flashable set (bootbins union ∪
build_produced), dropping the rename_map concept entirely. partitions.conf
is always derive(partition.xml) — a rename map only papered over a stale
input.

Net effect vs previous commit, all spec-authoritative corrections:
- drop keymaster_a/b + kmvirt_a/b: commented-out (not live) in partition.xml
- correct uefisecapp_a/b to the live spec entry (type-guid + uefi_sec.mbn),
  replacing the stale bare slots
- devcfg_iot.mbn now a direct KEEP from the union (never a substitution)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…er-safe

Two coupled fixes for a flash-time "Failed to Open File adsp2_dtbs.elf"
regression on iq10-rrd.

Root cause: loaders/conf.read_conf only skipped lines whose first
non-space char was '#'; it never stripped *inline* comments. A reconcile
token-drop line of the form

    --partition ... --type-guid=...  # RECONCILE-DROP(no-bootbin): --filename=adsp2_dtbs.elf

therefore survived, and parse_partition_lines' naive line.split(" ")
handed the commented "--filename=adsp2_dtbs.elf" token to getopt, which
re-added the deliberately-dropped filename. gen_partition then emitted a
rawprogram entry for a binary the flat build never produces, so the
flasher failed opening the non-existent file.

Fix 1 (loader, true root cause): split each conf line on the first '#'
before tokenising, so inline comments never leak option tokens. Whole-line
comments and blanks still skip. --disk/--partition values never contain
'#', so this is safe. 107 unit tests pass.

Fix 2 (defense in depth, emit format): regenerate iq10-rrd
partitions.conf so a token-drop emits NO --filename token on the live
--partition line (the canonical stock idiom for an image-less GPT slot)
and moves the reconcile reason to a SEPARATE preceding comment line. This
keeps the committed conf safe even against an unpatched upstream loader.

Verified end-to-end (partitions.conf -> gen_partition -> partition.xml ->
ptool -> rawprogram*.xml): all 20 reconcile-dropped binaries, including
adsp2_dtbs.elf, are absent from every rawprogram[0-9].xml, while kept
binaries (cpucp_dtbs.elf, uefi_dtbs.elf, rootfs.img, efi.bin, dtb.bin)
remain. GPT slots for the dropped audio_dsp/compute_dsp regions are
preserved (token-drop), matching the board layout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roshs189 added a commit to roshs189/meta-qcom that referenced this pull request Sep 1, 2026
… + firmware two-zip rework

Points qcom-ptool.inc at the head of roshs189/qcom-ptool#14
(add/iq10-rrd on qcom-ptool) so the build picks up its partition files.

Reworks firmware-qcom-boot-nord to fetch and deploy the plain and immutable
NORD_bootbinaries zips separately (per spec firmware_boot.notes), replacing
the stale artifactory-las flat bundle with the two versioned zips reconstructed
from FW_ARTIFACTORY/PV, and adds the immutable set's sha256sum alongside the
updated plain-zip sha256sum.

Signed-off-by: Roshan Sivakumar <roshs@qti.qualcomm.com>
shrm_b was placed on LUN5 (per iq10-rrd partition.xml block comments),
which fails the XBL/Sahara pre-load storage read with 0xAE001002. On the
booting NORD reference board (kaanapali-mtp) both shrm_a and shrm_b live
on LUN4. Relocate shrm_b to LUN4 alongside shrm_a via the board spec's
lun_reference opt-in. Only shrm_b moves; every other partition keeps its
block-index LUN, and all RECONCILE-DROP entries are preserved verbatim.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roshs189 added a commit that referenced this pull request Sep 6, 2026
…strip

Two coupled durable fixes pinned together for iq10-rrd flashing:

1. partitions.conf: drop --filename=tools.fv from the toolsfv partition.
   No recipe produces a tools.fv binary and none exists in the qcomflash
   deploy tree; the reference-board template left the filename behind, so
   gen_partition emitted a rawprogram entry for a non-existent file and the
   flasher failed with 'Failed to Open File ... tools.fv: Invalid argument'.
   toolsfv keeps its GPT slot (filename=""), matching its siblings
   quantumcontentfv/quantumfv/quantumsdk.

2. loaders/conf.read_conf: strip inline comments before tokenising (ported
   from PR #14 959845e). The 5ee8fff line this fix was based on predated
   that loader fix; re-pinning without it would silently reopen the
   inline-comment trap (a '# ... --filename=foo' comment leaking a dropped
   filename token back into getopt). 107 unit tests pass.
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