Attention is currently required from: David Hendricks, Matt DeVillier.
Anastasia Klimchuk has posted comments on this change by Matt DeVillier. ( https://review.coreboot.org/c/flashrom/+/85160?usp=email )
Change subject: cli_classic: Add option to use first detected chip if multiple found ......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
Adding a couple comments which are probably out-of-scope and non-blocking, though you should check w […]
Thank you David, this is useful!
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/85160/comment/44fb6b68_c05d5b07?usp... : PS2, Line 133: " --use-first-chip in cases where multiple chips are detected, use the first one found\n"
here's my problem: if you're flashing internally, you likely have no idea what chip is actually on t […]
The context is very useful, thank you. This explains more narrowed-down use case that you want to handle: that was meant for internal only.
David made a good point about write-protect feature. Out of several models with the same IDs, some of them won't support WP, some others will. It happened a bunch of times before my eyes that we needed to split "joint" chip definition into two, exactly because newer model supports WP, and people want to use it. And older model, with the same ID, does not support WP.
For your use case, are you interested at all in WP feature? If yes, I am not sure it would work with the strategy of choosing first matching model always.
If no (you don't care about WP), I just thought about one more thing, a different idea :) Please tell me what you think.
If most of chips in this context are new enough to support SFDP, would you consider trying SFDP auto-detection first? Specifically, that's adding `-c "SFDP-capable chip"` to command line, so that instead of going through the full list flashrom only tries to talk to chip as a generic "SFDP-capable chip"? It actually prints the info that is returned in SFDP header (maybe in verbose mode), so maybe some info about chip can be obtained this way. I will check later what exactly is printed.
Like you said
But the vast majority of my users (ChromeOS devices owners) have no idea where the flash chip is on their device, how to access it, etc
but if the info is printed, then maybe no need to access the chip