David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/38671 )
Change subject: programmer: Introduce programmer alias mechanism ......................................................................
Patch Set 1:
Patch Set 1:
What does the patch do? The description only says that it's required for various ChromeOS devices and I would like to understand the background.
This patch alone doesn't quite paint the full picture, I suspect others will be added to the chain.
The idea came about when ECs started appearing on different buses on different platforms - Some had an EC connected via LPC, some via I2C, and some on SPI. The problem was that `-p internal:bus=<lpc|i2c|spi>` became ambiguous and very cumbersome to use when trying to target ECs. Probing an EC could interfere with system operation so we wanted to bail out immediately when the probe function was called if we didn't actually intend to target an EC.
Similarly, this approach helped when host firmware ROMs started using linux_spi and linux_mtd programmer interfaces.
In both cases, this helps eliminate ambiguity (and potentially disruptive behavior) when flashrom is probing and obviates the need for every program and script that calls flashrom to have platform-specific logic to map component (host firmware ROM or EC) to programmer argument.