Skip to content

feat(flash): add glymur NVME support#332

Merged
lool merged 4 commits intoqualcomm-linux:mainfrom
gagath:glymur-bootbinaries2
Mar 25, 2026
Merged

feat(flash): add glymur NVME support#332
lool merged 4 commits intoqualcomm-linux:mainfrom
gagath:glymur-bootbinaries2

Conversation

@gagath
Copy link
Copy Markdown
Contributor

@gagath gagath commented Mar 19, 2026

Add support for generating the flash_glymur-crd/ directory. Note that
the "spi-nor" ptool platform, while supported, is not generated as we do
not have spi-nor support yet.

Closes: #273

gagath added 2 commits March 19, 2026 09:59
We need to use the latest qcom-ptool to be able to use the new
glymur-crd platform and its partition.conf.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
Currently when trying to use an "nvme" or "spinor" disk type the flash
recipe fails saying that "esp" is not set. Add a catchall to report
unsupported disk types for easier debugging.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
@gagath gagath requested a review from lool March 19, 2026 09:15
@gagath gagath marked this pull request as draft March 19, 2026 09:59
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 19, 2026

Test Results

 2 files  ±0   6 suites  ±0   4m 18s ⏱️ ±0s
20 tests ±0  20 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ccdd212. ± Comparison against base commit ed8ea44.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

Test jobs for commit 5252229

@nivasnaik
Copy link
Copy Markdown

The boot binaries here contain NHLOS firmware that goes into spi-nor and the corresponding partition.conf support is present in ptool. Can we include that as well to make this flat build bootable on Glymur?
"https://softwarecenter.qualcomm.com/nexus/generic/software/chip/qualcomm_linux-spf-0-0/qualcomm-linux-spf-0-0_test_device_public/r0.0_00009.0/glymur-le-0-0/common/build/bin/Glymur_bootbinaries.zip

Copy link
Copy Markdown
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is still draft, hope it's ok :)

Minor nit about adding the build_glymur var, otherwise this looks ok

Probably also update README for the proper qdl --storage nvme calls?

Could you confirm you've test booted this?

I'm ok to land this and add support for SPI-NOR later

@abickett
Copy link
Copy Markdown
Contributor

CDT also available : https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/SC8480XP/cdt/sc8480xp-crd.zip - I think this would be able to plug in directly with the CDT replacement logic in linux-debian-flash?

@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 19, 2026

Note that this currently does not work because the glymur device-tree is not present in dtbs.tar.gz, leading to a skip. Hence the draft. And also need to boot test yes, and yes to other comments.

@gagath gagath force-pushed the glymur-bootbinaries2 branch from 5252229 to 03b1741 Compare March 19, 2026 15:59
@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 19, 2026

CDT also available : https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/SC8480XP/cdt/sc8480xp-crd.zip - I think this would be able to plug in directly with the CDT replacement logic in linux-debian-flash?

Thanks, added CDT support to the new entry.

@gagath gagath force-pushed the glymur-bootbinaries2 branch 3 times, most recently from 474fba7 to ae280b4 Compare March 20, 2026 12:08
Having quotes around the case/esac matches for operands without any need
for then (ie. no spaces involved) only adds noise. Remove them.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
@gagath gagath force-pushed the glymur-bootbinaries2 branch from ae280b4 to 1e7aefd Compare March 20, 2026 12:12
@github-actions
Copy link
Copy Markdown

Test jobs for commit ae280b4

@github-actions
Copy link
Copy Markdown

Test jobs for commit 1e7aefd

Copy link
Copy Markdown
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok after updates and inclusion of CDT (thanks Adam!)

We can land this as soon as someone tests this manually to make sure the changes are correct (for instance combining rootfs and ESP image from daily glymur build with flash_ dir from this PR build)

Copy link
Copy Markdown
Contributor

@abickett abickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things here after trying to use this to flash Glymur. I needed to add the device programmer xbl_s_devprg_ns.melf (used for Hamoa, Glymur) to the copy. The CDT and the rest of the boot binaries are irrelevant to the NVME (as only spinor partition has CDT, boot binary partitions, DTB...) I tested this in context of also adding spinor support. Should this be added as a new PR - or potentially combine this? See my test branch commits for the proposed spinor addition: https://github.com/abickett/qcom-deb-images/commits/pr-332-glymur/

@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 23, 2026

Couple things here after trying to use this to flash Glymur. I needed to add the device programmer xbl_s_devprg_ns.melf (used for Hamoa, Glymur) to the copy. The CDT and the rest of the boot binaries are irrelevant to the NVME (as only spinor partition has CDT, boot binary partitions, DTB...) I tested this in context of also adding spinor support. Should this be added as a new PR - or potentially combine this? See my test branch commits for the proposed spinor addition: https://github.com/abickett/qcom-deb-images/commits/pr-332-glymur/

Good stuff in that branch, thanks! I've left a few comments there.

Question: how do you flash? With qdl? Which programmer do you use? I didn't see prog_firehose_ddr.elf in the boot binaries, I wonder if we're using a different programmer on Glymur CRD, or if it should be added to boot binaries and CDT like for the other platforms. (Or if we need a doc update to the README for Glymur CRD)

@gagath gagath force-pushed the glymur-bootbinaries2 branch from 1e7aefd to 649fa3e Compare March 24, 2026 08:31
@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 24, 2026

I tried Adam’s branch and was able to generate the flash_glymur-crd_spinor directory, will try to flash that (EDIT: need to find which programmer elf to use). I just pushed a fix for the cdt_filename to consider the subdirectory while we wait for it to disappear in future upstream releases as explained by @lool.

@abickett
Copy link
Copy Markdown
Contributor

abickett commented Mar 24, 2026

After building from (https://github.com/abickett/qcom-deb-images/commits/pr-332-glymur/) - I flashed with created directories flash_glymur-crd_nvme, flash_glymur-crd_spinor both with QDL and on Windows/EMMCDL. Device boots. This required change to add the melf programmer to the copied files. Note that this is the only current file from the boot binaries set that needs to be used both for spinor and nvme flash.

Ubuntu/x86 (qdl snap and building from upstream project - disable ModemManager due to USB conflicts)
(in SPINOR directory): qdl --storage spinor xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml
(In NVME directory): qdl --storage nvme xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml

Windows (the tool can use the linux relative paths)
.\EMMCDL.exe -p -f xbl_s_devprg_ns.melf -memoryname spinor -x rawprogram0.xml
.\EMMCDL.exe -p -f xbl_s_devprg_ns.melf -memoryname nvme -x rawprogram0.xml

@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 25, 2026

@gagath Can you add the melf changes to your branch?

I think I'm ok to add the spinor changes as well, I can tell landing the ptool changes to support "spinor-nvme" will take slightly longer:

  • we can add spinor as an extra ptool platform for now
  • I don't understand why we needed a separate find statement for nvme, I'd rather we continue with the original allowlist and extend with *.melf
  • I don't like the "if storage is nvme skip these parts" changes

Perhaps we can just test if the target files need CDT to decide whether to copy it?

Add support for generating the flash_glymur-crd/ directory. Note that
the "spi-nor" ptool platform, while supported, is not generated as we do
not have spi-nor support yet.

We need to include the *.melf files are they are used as a programmer
replacing the previous *.elf files for this platform.

Closes: qualcomm-linux#273
Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
@gagath gagath force-pushed the glymur-bootbinaries2 branch from 649fa3e to ccdd212 Compare March 25, 2026 11:56
@github-actions
Copy link
Copy Markdown

Test jobs for commit ccdd212

@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 25, 2026

So Adam boot tested this; the CDT and DTB changes in this board block are mostly useless right now, but pave the way for SPINOR later, so I'm ok to have the (useless) metadata.

I'm going to land this now to help with daily CI.

@lool lool marked this pull request as ready for review March 25, 2026 17:35
@lool lool merged commit da30efd into qualcomm-linux:main Mar 25, 2026
17 checks passed
@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 25, 2026

I've kicked daily glymur and qcom-next builds so that you get fresh images with these changes later today.

@gagath gagath deleted the glymur-bootbinaries2 branch March 26, 2026 08:17
@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 26, 2026

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.

Add support for NVMe flashing

4 participants